|
@@ -14,7 +14,7 @@
|
|
|
:loading="table_loading"
|
|
|
:multiple="true"
|
|
|
:handle-row="table_handle_row"
|
|
|
- @selection="handleSlect"
|
|
|
+ @selection="handleSelect"
|
|
|
@check="handleCheck"
|
|
|
@edit="handleEdit"
|
|
|
@approve="handleApprove"
|
|
@@ -102,8 +102,10 @@
|
|
|
<div></div>
|
|
|
</div>
|
|
|
<div v-else-if="title === '发起人处理'">
|
|
|
- <el-button @click="handleSubmit" type="primary">保存</el-button>
|
|
|
- <el-button type="primary">重新提交</el-button>
|
|
|
+ <el-button @click="handleSubmit('save')" type="primary"
|
|
|
+ >保存</el-button
|
|
|
+ >
|
|
|
+ <el-button @click="handleSubmit('add')" type="primary">重新提交</el-button>
|
|
|
<el-button @click="handleVisible('add')" type="default"
|
|
|
>取消</el-button
|
|
|
>
|
|
@@ -243,7 +245,7 @@ export default {
|
|
|
label: "处理",
|
|
|
props: "approve",
|
|
|
visible: {
|
|
|
- sts: ["0"],
|
|
|
+ deal: ["1"],
|
|
|
},
|
|
|
},
|
|
|
],
|
|
@@ -308,42 +310,41 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.handleInit({
|
|
|
- ...this.table_search,
|
|
|
- type: "1",
|
|
|
- page: this.page,
|
|
|
- pageSize: this.rows,
|
|
|
- });
|
|
|
+ this.handleInit();
|
|
|
},
|
|
|
methods: {
|
|
|
// 表格数据初始化
|
|
|
- handleInit(data) {
|
|
|
+ handleInit() {
|
|
|
// this.table_loading = true;
|
|
|
// console.log(data);
|
|
|
+ let reqdata = {
|
|
|
+ ...this.table_search,
|
|
|
+ type: "1",
|
|
|
+ page: this.page,
|
|
|
+ pageSize: this.rows,
|
|
|
+ };
|
|
|
this.$http({
|
|
|
url: "/mkWangge/queryPage",
|
|
|
method: "post",
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
|
},
|
|
|
- data: data,
|
|
|
+ data: reqdata,
|
|
|
}).then(({ data: { count, data } }) => {
|
|
|
this.table_loading = false;
|
|
|
this.total = count;
|
|
|
- this.table_list = data || [];
|
|
|
- console.log(data);
|
|
|
+ this.table_list = data.map((element) => ({
|
|
|
+ ...element,
|
|
|
+ deal: element.draft === "1" && element.sts === "0" ? "1" : "0",
|
|
|
+ }));
|
|
|
+ console.log(this.table_list);
|
|
|
});
|
|
|
},
|
|
|
// 搜索事件
|
|
|
handleSearch(data) {
|
|
|
this.table_search = data;
|
|
|
this.page = 1;
|
|
|
- this.handleInit({
|
|
|
- ...data,
|
|
|
- type: "1",
|
|
|
- page: this.page,
|
|
|
- pageSize: this.rows,
|
|
|
- });
|
|
|
+ this.handleInit();
|
|
|
},
|
|
|
handleVisible(props) {
|
|
|
this.approve_visible = false;
|
|
@@ -381,7 +382,7 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
- handleSlect(val) {
|
|
|
+ handleSelect(val) {
|
|
|
this.summaryIds = val.map((item) => {
|
|
|
return item.id.toString();
|
|
|
});
|
|
@@ -392,8 +393,8 @@ export default {
|
|
|
console.log(v);
|
|
|
this.attList = v;
|
|
|
},
|
|
|
- // 查看按钮
|
|
|
- handleCheck(row) {
|
|
|
+ // 获取模态框信息
|
|
|
+ getDialogData(row) {
|
|
|
let id = row.id;
|
|
|
let type = row.parentId === null ? "1" : "0";
|
|
|
this.$http({
|
|
@@ -409,41 +410,31 @@ export default {
|
|
|
}).then(({ data }) => {
|
|
|
let body = data.body;
|
|
|
console.log(body, "body");
|
|
|
+ this.ids = [body.id.toString()];
|
|
|
this.add_form = {
|
|
|
id: body.id,
|
|
|
- proposer: body.createName,
|
|
|
+ proposer: body.proposer,
|
|
|
telephone: body.telephone,
|
|
|
wanggeText: body.wanggeText,
|
|
|
};
|
|
|
this.table_list_approve = body.bpmTaskList;
|
|
|
});
|
|
|
- this.handleVisible("check");
|
|
|
+ },
|
|
|
+ // 查看按钮
|
|
|
+ handleCheck(row) {
|
|
|
+ if (row.parentLevel === "1") {
|
|
|
+ this.$router.push({
|
|
|
+ path: "/approvalExamination",
|
|
|
+ query: row,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.getDialogData(row)
|
|
|
+ this.handleVisible("check");
|
|
|
+ }
|
|
|
},
|
|
|
// 编辑按钮
|
|
|
handleEdit(row) {
|
|
|
- let id = row.id;
|
|
|
- let type = row.parentId === null ? "1" : "0";
|
|
|
- this.$http({
|
|
|
- url: "/mkWangge/getMkWanggeById",
|
|
|
- method: "get",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
- },
|
|
|
- params: {
|
|
|
- id,
|
|
|
- type,
|
|
|
- },
|
|
|
- }).then(({ data }) => {
|
|
|
- let body = data.body;
|
|
|
- console.log(body, "body");
|
|
|
- this.add_form = {
|
|
|
- id: body.id,
|
|
|
- proposer: body.proposer,
|
|
|
- telephone: body.telephone,
|
|
|
- wanggeText: body.wanggeText,
|
|
|
- };
|
|
|
- this.table_list_approve = body.bpmTaskList;
|
|
|
- });
|
|
|
+ this.getDialogData(row)
|
|
|
this.handleVisible("edit");
|
|
|
},
|
|
|
// 处理按钮
|
|
@@ -452,33 +443,12 @@ export default {
|
|
|
if (row.parentLevel === "1") {
|
|
|
this.$router.push({
|
|
|
path: "/approvalExamination",
|
|
|
- query: row,
|
|
|
- });
|
|
|
- } else {
|
|
|
- let id = row.id;
|
|
|
- let type = row.parentId === null ? "1" : "0";
|
|
|
- this.$http({
|
|
|
- url: "/mkWangge/getMkWanggeById",
|
|
|
- method: "get",
|
|
|
- headers: {
|
|
|
- "Content-Type": "application/json",
|
|
|
+ query: {
|
|
|
+ parentId:row.id.toString(),
|
|
|
},
|
|
|
- params: {
|
|
|
- id,
|
|
|
- type,
|
|
|
- },
|
|
|
- }).then(({ data }) => {
|
|
|
- let body = data.body;
|
|
|
- console.log(body, "body");
|
|
|
- this.ids = [body.id.toString()];
|
|
|
- this.add_form = {
|
|
|
- id: body.id,
|
|
|
- proposer: body.proposer,
|
|
|
- telephone: body.telephone,
|
|
|
- wanggeText: body.wanggeText,
|
|
|
- };
|
|
|
- this.table_list_approve = body.bpmTaskList;
|
|
|
});
|
|
|
+ } else {
|
|
|
+ this.getDialogData(row)
|
|
|
this.handleVisible("approve");
|
|
|
}
|
|
|
},
|
|
@@ -487,9 +457,15 @@ export default {
|
|
|
// let _this = this;
|
|
|
let draft = "";
|
|
|
if (type === "add") {
|
|
|
- draft = '1'
|
|
|
- }else if(type === 'save'){
|
|
|
- draft = '0'
|
|
|
+ draft = "1";
|
|
|
+ } else if (type === "save") {
|
|
|
+ draft = "0";
|
|
|
+ }
|
|
|
+ let isAdopt = "";
|
|
|
+ if (type === "adopt") {
|
|
|
+ isAdopt = "0";
|
|
|
+ } else if (type === "failed") {
|
|
|
+ isAdopt = "1";
|
|
|
}
|
|
|
this.$refs.add_ref.validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -512,19 +488,14 @@ export default {
|
|
|
data: reqdata,
|
|
|
}).then((res) => {
|
|
|
console.log(res);
|
|
|
- this.handleInit({
|
|
|
- ...this.table_search,
|
|
|
- type: "1",
|
|
|
- page: this.page,
|
|
|
- pageSize: this.rows,
|
|
|
- });
|
|
|
+ this.handleInit();
|
|
|
});
|
|
|
} else {
|
|
|
// 审批
|
|
|
let reqdata = {
|
|
|
ids: this.ids,
|
|
|
remark: this.add_form.remark,
|
|
|
- type: "0",
|
|
|
+ type: isAdopt,
|
|
|
};
|
|
|
console.log(reqdata, "reqdata");
|
|
|
this.$http({
|
|
@@ -536,15 +507,11 @@ export default {
|
|
|
data: {
|
|
|
...reqdata,
|
|
|
},
|
|
|
- });
|
|
|
- this.handleInit({
|
|
|
- ...this.table_search,
|
|
|
- type: "1",
|
|
|
- page: this.page,
|
|
|
- pageSize: this.rows,
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.handleInit();
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
this.edit_visible = false;
|
|
|
this.add_visible = false;
|
|
|
}
|
|
@@ -579,24 +546,14 @@ export default {
|
|
|
type: "success",
|
|
|
});
|
|
|
}
|
|
|
- this.handleInit({
|
|
|
- ...this.table_search,
|
|
|
- type: "1",
|
|
|
- page: this.page,
|
|
|
- pageSize: this.rows,
|
|
|
- });
|
|
|
+ this.handleInit();
|
|
|
});
|
|
|
this.handleVisible("summary");
|
|
|
}
|
|
|
},
|
|
|
handleChange(page) {
|
|
|
this.page = page;
|
|
|
- this.handleInit({
|
|
|
- ...this.table_search,
|
|
|
- type: "1",
|
|
|
- page: this.page,
|
|
|
- pageSize: this.rows,
|
|
|
- });
|
|
|
+ this.handleInit();
|
|
|
},
|
|
|
},
|
|
|
};
|