xy 2 years ago
parent 1a3ca15080
commit 344f2b1194

@ -705,7 +705,7 @@ export default {
})) || [];
},
submit() {
async submit() {
const submitData = this.data.filter(
(i) => i.start_time || i.end_time || i.content
);
@ -723,6 +723,24 @@ export default {
return;
}
let isNeed = 0;
try {
await this.$confirm("是否需要走流程?","提示",{
confirmButtonText: "需要",
cancelButtonText: "不需要",
type: "info",
closeOnClickModal: false,
distinguishCancelAndClose: true
})
isNeed = 1;
} catch (e) {
if (e === 'cancel') {
isNeed = 0;
} else {
return
}
}
const uid = uuid();
let promiseAll = [];
submitData.forEach((i) => {
@ -748,6 +766,7 @@ export default {
end_time: `${j} ${i.end_time}`,
no: uid,
status: 1,
shifouzouliucheng: isNeed
},
false
)
@ -763,6 +782,7 @@ export default {
{
table_name: "transfers",
...i,
shifouzouliucheng: isNeed
},
false
)

@ -266,7 +266,7 @@
<!--$refs['drawer'].setId(row.id);
$refs['drawer'].show();-->
<xy-table
:btn-width="240"
:btn-width="300"
:auths="auths_auth_mixin"
:delay-req="true"
:destroy-action="destroy"
@ -303,6 +303,15 @@
>反馈</Button
>
</template>
<template #oa="{ row }">
<Button
v-if="row.shifouzouliucheng"
size="small"
type="primary"
@click="toOa(row)"
>发起流程</Button
>
</template>
<template #distribute="{ row }">
<Button
v-if="row.status === 1"
@ -346,6 +355,7 @@
</template>
<script>
import { getOaToken } from "@/api/other";
import { index as fieldIndex } from "@/api/system/customFormField";
import { authMixin } from "@/mixin/authMixin";
import { index, destroy, save } from "@/api/system/baseForm";
@ -379,6 +389,13 @@ export default {
},
data() {
return {
window: {
width: 0,
height: 0,
top: 0,
left: 0
},
oaToken: "",
op,
select: {
table_name: "",
@ -401,6 +418,23 @@ export default {
};
},
methods: {
async toOa (row) {
if (!this.oaToken) {
this.oaToken = (await getOaToken()).oatoken
}
let jsonInfo = {
'title': row.equipment_id_equipments_id_relation?.name,
'65aa1a59e408c': row.start_time,
'65aa1a7e4109d': row.level,
'65aa1a442705f': row.content
}
let url =
`${process.env.VUE_APP_OA_URL}/admin/flow/create/34?diaoling_oatoken=${this.oaToken}&default_json=${JSON.stringify(jsonInfo)}`
window.open(url, 'diaoling',
`top=${this.window.top},left=${this.window.left},width=${this.window.width},height=${this.window.height},location=0`
)
},
async distributeTransfers () {
let promiseAll = this.$refs['xyTable'].getSelection().map(i => {
for (let key in i) {
@ -694,8 +728,11 @@ export default {
type: "index",
width: 60,
label: "序号",
prop: "index"
});
this.table.unshift({
label: "选择",
prop: "selections",
type: "selection",
width: 46,
reserveSelection: true
@ -737,6 +774,11 @@ export default {
},
},
created() {
this.window.width = screen.availWidth * 0.95
this.window.height = screen.availHeight * 0.95
this.window.top = (window.screen.height - 30 - this.window.height) / 2
this.window.left = (window.screen.width - 10 - this.window.width) / 2
this.getFormDetail();
},
};

Loading…
Cancel
Save