1、工单记录详情页面隐藏删除附件按钮 2、存为草稿表单数据回显问题 3、流程中心添加重复模式字段

main
jinna 3 years ago
parent e640d8eb4e
commit 4ae9221882
  1. 17
      src/const/workflow/workorder.js
  2. 38
      src/views/maintenance/system.vue
  3. 39
      src/views/plugin/workflow/mixins/draft.js
  4. 22
      src/views/plugin/workflow/process/components/detail.vue
  5. 4
      src/views/plugin/workflow/process/components/effect.vue
  6. 20
      src/views/plugin/workflow/process/components/form.vue
  7. 22
      src/views/plugin/workflow/process/workorder.vue

@ -1,14 +1,14 @@
export const tableOption = {
index: true,
indexLabel: "序号",
indexWidth:80,
indexWidth: 80,
selection: false,
border: false,
gutter: 60, //设置input的大小
headerAlign: "left",
align: "left",
menuAlign:'left',
menuHeaderAlign:'center',
menuAlign: "left",
menuHeaderAlign: "center",
menuBtn: true,
editBtn: false,
delBtn: false,
@ -19,7 +19,7 @@ export const tableOption = {
refreshBtn: false,
// dialogCustomClass: "custom",
header: false,
menuWidth:210,
menuWidth: 210,
column: [
{
type: "input",
@ -56,6 +56,13 @@ export const tableOption = {
align: "left",
overHidden: true,
},
{
type: "input",
label: "重复模式",
prop: "$chongfumoshi",
align: "left",
overHidden: true,
},
{
type: "input",
label: "运维公司",
@ -102,4 +109,4 @@ export const tableOption = {
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
],
}
};

@ -372,19 +372,31 @@ export default {
row.dataBasePort = row.dataBasePort ? row.dataBasePort : ''
row.dataBaseAlias = row.dataBaseAlias ? row.dataBaseAlias : ''
row.systemName = row.systemName ? row.systemName : '';
addList(row).then(res =>{
const data = res.data.data;
row.id = data.id;
this.$message({ type: "success", message: res.data.msg });
this.onLoad();
this.getDict();
//
done(row);
}).catch(error =>{
window.console.log(error);
loading();
})
// row.moduleDatatables = row.moduleDatatables ? row.moduleDatatables : [
// {
// datatableModuleName: "",
// dataTableAlias:''
// },
// ]
// console.log(row.moduleDatatables)
if(!row.moduleDatatables){
this.$message.error('数据表/系统模块至少有一条数据且不能为空')
loading();
}else{
addList(row).then(res =>{
const data = res.data.data;
row.id = data.id;
this.$message({ type: "success", message: res.data.msg });
this.onLoad();
this.getDict();
//
done(row);
}).catch(error =>{
window.console.log(error);
loading();
})
}
// add(row).then(
// (res) => {

@ -1,24 +1,31 @@
import { getDetail, submit } from '@/api/plugin/workflow/draft'
import { getDetail, submit } from "@/api/plugin/workflow/draft";
export default {
methods: {
initDraft(processDefId) {
return new Promise((resolve) => {
getDetail({ processDefId, platform: 'pc' }).then(res => {
const { data } = res.data
if (data && data.variables && Object.keys(data.variables).length > 0) resolve(data.variables)
})
})
getDetail({ processDefId, platform: "pc" }).then((res) => {
const { data } = res.data;
if (data && data.variables && Object.keys(data.variables).length > 0)
resolve(data.variables);
});
});
},
handleDraft(processDefId, formKey, variables) {
this.$confirm('保存至草稿箱并关闭?', '提示', {
type: 'warning'
}).then(() => {
submit({ processDefId, formKey, variables: JSON.stringify(variables), platform: 'pc' }).then(() => {
this.handleCloseTag('/plugin/workflow/process/start')
})
}).catch(() => {
this.$confirm("保存至草稿箱并关闭?", "提示", {
type: "warning",
})
}
}
}
.then(() => {
submit({
processDefId,
formKey,
variables: JSON.stringify(variables),
platform: "pc",
}).then(() => {
this.handleCloseTag("/plugin/workflow/process/start");
});
})
.catch(() => {});
},
},
};

@ -216,6 +216,7 @@ import {
getDatabasePro,
getDatabaseTab
} from "@/api/plugin/workflow/form.js";
import {repeatMode} from "@/api/plugin/workflow/workorder.js";
import WfExamineForm from "./examForm.vue";
import WfButton from "./button.vue";
import WfFlow from "./flow.vue";
@ -270,6 +271,7 @@ export default {
parentDisabled:false,//
sqlDisabled:false,///
kindDisabled:false, //
repeatList:[],//
};
},
computed: {
@ -283,7 +285,15 @@ export default {
}
},
},
created() {
this.getRepeat()
},
methods: {
getRepeat(){
repeatMode().then(res =>{
this.repeatList = res.data.data
})
},
//
uploadAfter(res, done, loading, column) {
if (typeof this.form.uploadrecord == "string") {
@ -633,6 +643,7 @@ export default {
},
//
handleExamine(pass) {
console.log(this.findObject(this.option.column, "guanlibumen").dicData)
this.submitLoading = true;
const { form, summaryForm } = this.$refs;
if (form) {
@ -647,6 +658,17 @@ export default {
variables.xitongmokuaishujubiao = this.form.xitongmokuaishujubiao ?
this.form.xitongmokuaishujubiao : '';
variables.$renwuzhonglei = this.kindList.find(item => item.id == this.form.renwuzhonglei) ? this.kindList.find(item => item.id == this.form.renwuzhonglei).taskTypeName : ''
variables.$chongfumoshi = this.repeatList.find(item => item.id == this.form.chongfumoshi) ? this.repeatList.find(item => item.id == this.form.chongfumoshi).dictValue : ''
variables.$guanlibumen =
this.findObject(this.option.column, "guanlibumen").dicData.find(item => item.id == this.form.guanlibumen) ?
this.findObject(this.option.column, "guanlibumen").dicData.find(item => item.id == this.form.guanlibumen).deptName : ''
variables.$renwudengji = this.findObject(this.option.column,"renwudengji").dicData.find(item => item.id == this.form.renwudengji) ?
this.findObject(this.option.column,"renwudengji").dicData.find(item => item.id == this.form.renwudengji).dictValue : ''
variables.$xitongmokuaishujubiao = this.findObject(this.option.column,"xitongmokuaishujubiao").dicData.find(item => item.id == this.form.xitongmokuaishujubiao) ? this.findObject(
this.option.column,
"xitongmokuaishujubiao"
).dicData.find(item => item.id == this.form.xitongmokuaishujubiao).datatableModuleName : ''
console.log(variables)
this.handleCompleteTask(pass, variables)
.then(() => {
this.$message.success("处理成功");

@ -28,12 +28,12 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<i
<!-- <i
v-if="userInfo.real_name === scope.row.createUser && form.isFinish!==1"
class="el-icon-delete"
style="cursor: pointer"
@click="deleteFile(scope.$index)"
></i>
></i> -->
</template>
</el-table-column>
</el-table>

@ -200,6 +200,9 @@ export default {
//
"form.renwuzhonglei"(val) {
if (val) {
if(!this.isDraft){
// this.form.renwudengji = this.form.renwudengji
// }else{
const renwuzhonglei = this.findObject(
this.option.column,
"renwuzhonglei"
@ -209,6 +212,7 @@ export default {
this.form.renwudengji = renwuzhonglei.dicData[i].taskLevel;
}
}
}
}
},
},
@ -304,9 +308,15 @@ export default {
},
//
taskParentChange(id) {
if(this.isDraft){
getTaskTypeData({ parentId: id,isDetail:0 }).then((res) => {
const renwuzhonglei = this.option.column[3];
renwuzhonglei.dicData = res.data.data;
})
}else{
getTaskTypeData({ parentId: id,isDetail:0 }).then((res) => {
// this.form.renwuzhonglei = "";
// this.form.renwudengji = "";
this.form.renwuzhonglei = "";
this.form.renwudengji = "";
const renwuzhonglei = this.option.column[3];
renwuzhonglei.dicData = res.data.data;
if(res.data.data.length != 0){
@ -316,6 +326,7 @@ export default {
this.form.renwudengji = "";
}
});
}
},
systemChange(id, index) {
let obj = this.taskAndDataBaseList.find(function (i) {
@ -463,10 +474,11 @@ export default {
this.isDraft = true
const form = JSON.parse(data);
// this.systemChange(form.xitongmingchengshujuku, 1);
this.companyChange(form.yunweigongsi)
// this.systemChange(form.xitongmingchengshujuku, 1);
this.form = form;
this.companyChange(form.yunweigongsi)
this.taskParentChange(form.renwufulei)
})

@ -58,6 +58,19 @@
>
</el-option>
</el-select>
<el-select
v-model="searchForm.repeatMode"
placeholder="重复模式"
class="search-select"
clearable
>
<el-option
v-for="item in repeatList"
:key="item.dictValue"
:label="item.dictValue"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="searchForm.taskLevel"
placeholder="任务级别"
@ -169,6 +182,7 @@ import {
getList,
conditionalData,
exportExcel,
repeatMode
} from "@/api/plugin/workflow/workorder.js";
import exForm from "../mixins/ex-form";
import { tableOption } from "@/const/workflow/workorder.js";
@ -191,6 +205,7 @@ export default {
depts: [],
users: [],
taskLevel: [],
repeatList:[],
statusList: [
{
label: "审批中",
@ -212,6 +227,7 @@ export default {
};
},
created() {
this.getRepeat();
this.dictBiz();
this.onLoad();
},
@ -227,6 +243,12 @@ export default {
this.taskLevel = taskLevel;
});
},
getRepeat(){
repeatMode().then(res =>{
console.log(res)
this.repeatList = res.data.data
})
},
//
onLoad() {
this.loading = true;

Loading…
Cancel
Save