diff --git a/src/const/workflow/workorder.js b/src/const/workflow/workorder.js
index 8b2f2f5..1effd63 100644
--- a/src/const/workflow/workorder.js
+++ b/src/const/workflow/workorder.js
@@ -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",
},
],
-}
+};
diff --git a/src/views/maintenance/system.vue b/src/views/maintenance/system.vue
index eb3f5ff..344ea50 100644
--- a/src/views/maintenance/system.vue
+++ b/src/views/maintenance/system.vue
@@ -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) => {
diff --git a/src/views/plugin/workflow/mixins/draft.js b/src/views/plugin/workflow/mixins/draft.js
index 0e33b37..3c1fe7b 100644
--- a/src/views/plugin/workflow/mixins/draft.js
+++ b/src/views/plugin/workflow/mixins/draft.js
@@ -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",
})
- }
- }
-}
\ No newline at end of file
+ .then(() => {
+ submit({
+ processDefId,
+ formKey,
+ variables: JSON.stringify(variables),
+ platform: "pc",
+ }).then(() => {
+ this.handleCloseTag("/plugin/workflow/process/start");
+ });
+ })
+ .catch(() => {});
+ },
+ },
+};
diff --git a/src/views/plugin/workflow/process/components/detail.vue b/src/views/plugin/workflow/process/components/detail.vue
index de852fe..7775ac6 100644
--- a/src/views/plugin/workflow/process/components/detail.vue
+++ b/src/views/plugin/workflow/process/components/detail.vue
@@ -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("处理成功");
diff --git a/src/views/plugin/workflow/process/components/effect.vue b/src/views/plugin/workflow/process/components/effect.vue
index 1d31632..ff0f095 100644
--- a/src/views/plugin/workflow/process/components/effect.vue
+++ b/src/views/plugin/workflow/process/components/effect.vue
@@ -28,12 +28,12 @@
-
+ > -->
diff --git a/src/views/plugin/workflow/process/components/form.vue b/src/views/plugin/workflow/process/components/form.vue
index 1bee625..6606a85 100644
--- a/src/views/plugin/workflow/process/components/form.vue
+++ b/src/views/plugin/workflow/process/components/form.vue
@@ -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)
})
diff --git a/src/views/plugin/workflow/process/workorder.vue b/src/views/plugin/workflow/process/workorder.vue
index d975140..8bbefae 100644
--- a/src/views/plugin/workflow/process/workorder.vue
+++ b/src/views/plugin/workflow/process/workorder.vue
@@ -58,6 +58,19 @@
>
+
+
+
{
+ console.log(res)
+ this.repeatList = res.data.data
+ })
+ },
// 列表
onLoad() {
this.loading = true;