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

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

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

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

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

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

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

Loading…
Cancel
Save