Commit 85b2ed01 authored by 仇晓婷's avatar 仇晓婷

分类选择流程

parent 8c242835
...@@ -1733,10 +1733,12 @@ export default { ...@@ -1733,10 +1733,12 @@ export default {
englishName:'英文简称', englishName:'英文简称',
status:'', status:'',
inheritCategoryId:'继承', //继承分类id inheritCategoryId:'继承', //继承分类id
url:'上传模板', //模板路径 // url:'上传模板', //模板路径
template:'', //模板路径 template:'模板Id', //模板路径
templateId:'选择模板', templateId:'选择模板',
status:'状态', status:'状态',
workFlows:'选择流程',
workFlowIds:'流程Id',
description:'备注' description:'备注'
}, },
document_template:{ document_template:{
......
...@@ -66,6 +66,20 @@ ...@@ -66,6 +66,20 @@
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem :label="l('workFlows')" prop="workFlowIds">
<Select
v-model="entity.workFlowIds"
@on-change="setWorkFlows"
clearable
filterable
>
<Option v-for="(t, i) in workFlows" :key="i" :value="t.id">{{
t.name
}}</Option>
</Select>
</FormItem>
</Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('description')" prop="description"> <FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input> <Input v-model="entity.description" type="textarea" :rows="5"></Input>
...@@ -174,6 +188,7 @@ export default { ...@@ -174,6 +188,7 @@ export default {
return { return {
codeList: [], codeList: [],
templates: [], templates: [],
workFlows: [],
entity: { entity: {
creatorUserId: this.$store.state.userInfo.userId, creatorUserId: this.$store.state.userInfo.userId,
name: "", name: "",
...@@ -328,6 +343,7 @@ export default { ...@@ -328,6 +343,7 @@ export default {
mounted() { mounted() {
this.tebleSet(); this.tebleSet();
this.loadTemplate(); this.loadTemplate();
this.loadWorkFlows();
}, },
methods: { methods: {
tebleSet() { tebleSet() {
...@@ -356,6 +372,25 @@ export default { ...@@ -356,6 +372,25 @@ export default {
} }
}); });
}, },
loadWorkFlows() {
let data = {
pageIndex: 1,
pageSize: 100,
conditions: [],
};
Api.getpaged(data).then((r) => {
if (r.result) {
this.workFlows = r.result.items;
}
});
},
setWorkFlows(a) {
this.workFlows.forEach((r) => {
if (a == r.id) {
this.entity.workFlows = r.name;
}
});
},
addNew() { addNew() {
let maxId = 0; let maxId = 0;
this.checkList.map((u) => { this.checkList.map((u) => {
......
...@@ -28,6 +28,11 @@ export default { ...@@ -28,6 +28,11 @@ export default {
return Api.get(`${systemUrl}/Dictionary/getChildren`,params); //字典 return Api.get(`${systemUrl}/Dictionary/getChildren`,params); //字典
}, },
filesList(params){ filesList(params){
return Api.post(`${material}/documenttemplate/paged`,params);//模板列表里获取上传列表 return Api.post(`${material}/documenttemplate/paged`,params);//模板列表
}, },
} getpaged(params) {
\ No newline at end of file return Api.post(`${workflowUrl}/schema/getpaged`, params);//流程列表
},
}
\ No newline at end of file
...@@ -67,7 +67,20 @@ ...@@ -67,7 +67,20 @@
</Select> </Select>
</FormItem> </FormItem>
</Col> </Col>
<Col :span="12">
<FormItem :label="l('workFlows')" prop="workFlowIds">
<Select
v-model="entity.workFlowIds"
@on-change="setWorkFlows"
clearable
filterable
>
<Option v-for="(t, i) in workFlows" :key="i" :value="t.id">{{
t.name
}}</Option>
</Select>
</FormItem>
</Col>
<Col :span="24"> <Col :span="24">
<FormItem :label="l('description')" prop="description"> <FormItem :label="l('description')" prop="description">
<Input v-model="entity.description" type="textarea" :rows="5"></Input> <Input v-model="entity.description" type="textarea" :rows="5"></Input>
...@@ -310,6 +323,7 @@ export default { ...@@ -310,6 +323,7 @@ export default {
mounted() { mounted() {
this.tebleSet(); this.tebleSet();
this.loadTemplate(); this.loadTemplate();
this.loadWorkFlows();
if (this.eid > 0) { if (this.eid > 0) {
this.load(this.eid); this.load(this.eid);
} }
...@@ -334,6 +348,25 @@ export default { ...@@ -334,6 +348,25 @@ export default {
} }
}); });
}, },
loadWorkFlows() {
let data = {
pageIndex: 1,
pageSize: 100,
conditions: [],
};
Api.getpaged(data).then((r) => {
if (r.result) {
this.workFlows = r.result.items;
}
});
},
setWorkFlows(a) {
this.workFlows.forEach((r) => {
if (a == r.id) {
this.entity.workFlows = r.name;
}
});
},
tebleSet() { tebleSet() {
Api.getChildren({ id: 582 }).then((r) => { Api.getChildren({ id: 582 }).then((r) => {
if (r.result) { if (r.result) {
...@@ -341,10 +374,12 @@ export default { ...@@ -341,10 +374,12 @@ export default {
} }
}); });
}, },
load(v) { load(v) {
Api.get({ id: v }).then((r) => { Api.get({ id: v }).then((r) => {
this.entity = r.result; this.entity = r.result;
// this.entity.templateId = r.result.template; this.entity.templateId = parseInt(r.result.templateId);
this.entity.workFlowIds = r.result.workFlowIds;
if (r.result.inheritCategoryId == 0) { if (r.result.inheritCategoryId == 0) {
this.inherit = "0"; this.inherit = "0";
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment