xy 2 years ago
parent 1a3ca15080
commit 344f2b1194

@ -705,7 +705,7 @@ export default {
})) || []; })) || [];
}, },
submit() { async submit() {
const submitData = this.data.filter( const submitData = this.data.filter(
(i) => i.start_time || i.end_time || i.content (i) => i.start_time || i.end_time || i.content
); );
@ -723,6 +723,24 @@ export default {
return; 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(); const uid = uuid();
let promiseAll = []; let promiseAll = [];
submitData.forEach((i) => { submitData.forEach((i) => {
@ -748,6 +766,7 @@ export default {
end_time: `${j} ${i.end_time}`, end_time: `${j} ${i.end_time}`,
no: uid, no: uid,
status: 1, status: 1,
shifouzouliucheng: isNeed
}, },
false false
) )
@ -763,6 +782,7 @@ export default {
{ {
table_name: "transfers", table_name: "transfers",
...i, ...i,
shifouzouliucheng: isNeed
}, },
false false
) )

@ -266,7 +266,7 @@
<!--$refs['drawer'].setId(row.id); <!--$refs['drawer'].setId(row.id);
$refs['drawer'].show();--> $refs['drawer'].show();-->
<xy-table <xy-table
:btn-width="240" :btn-width="300"
:auths="auths_auth_mixin" :auths="auths_auth_mixin"
:delay-req="true" :delay-req="true"
:destroy-action="destroy" :destroy-action="destroy"
@ -303,6 +303,15 @@
>反馈</Button >反馈</Button
> >
</template> </template>
<template #oa="{ row }">
<Button
v-if="row.shifouzouliucheng"
size="small"
type="primary"
@click="toOa(row)"
>发起流程</Button
>
</template>
<template #distribute="{ row }"> <template #distribute="{ row }">
<Button <Button
v-if="row.status === 1" v-if="row.status === 1"
@ -346,6 +355,7 @@
</template> </template>
<script> <script>
import { getOaToken } from "@/api/other";
import { index as fieldIndex } from "@/api/system/customFormField"; import { index as fieldIndex } from "@/api/system/customFormField";
import { authMixin } from "@/mixin/authMixin"; import { authMixin } from "@/mixin/authMixin";
import { index, destroy, save } from "@/api/system/baseForm"; import { index, destroy, save } from "@/api/system/baseForm";
@ -379,6 +389,13 @@ export default {
}, },
data() { data() {
return { return {
window: {
width: 0,
height: 0,
top: 0,
left: 0
},
oaToken: "",
op, op,
select: { select: {
table_name: "", table_name: "",
@ -401,6 +418,23 @@ export default {
}; };
}, },
methods: { 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 () { async distributeTransfers () {
let promiseAll = this.$refs['xyTable'].getSelection().map(i => { let promiseAll = this.$refs['xyTable'].getSelection().map(i => {
for (let key in i) { for (let key in i) {
@ -694,8 +728,11 @@ export default {
type: "index", type: "index",
width: 60, width: 60,
label: "序号", label: "序号",
prop: "index"
}); });
this.table.unshift({ this.table.unshift({
label: "选择",
prop: "selections",
type: "selection", type: "selection",
width: 46, width: 46,
reserveSelection: true reserveSelection: true
@ -737,6 +774,11 @@ export default {
}, },
}, },
created() { 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(); this.getFormDetail();
}, },
}; };

Loading…
Cancel
Save