|
@@ -7,9 +7,9 @@
|
|
|
:config="table_config"
|
|
|
:loading="table_loading"
|
|
|
:handle-row="table_handle_row"
|
|
|
- @receiver="handleVisible('receiver')"
|
|
|
+ @principalName="(params) => handleVisible('principalName', params)"
|
|
|
@detail="handleVisible('template')"
|
|
|
- @delete="handleDelete"
|
|
|
+ @withdraw="handleWithdraw"
|
|
|
@edit="handleVisible('template')"
|
|
|
></simple-table>
|
|
|
<simple-pagination
|
|
@@ -37,15 +37,16 @@
|
|
|
</simple-dialog>
|
|
|
<simple-dialog
|
|
|
title="回复详情"
|
|
|
- @cancel="handleVisible('receiver')"
|
|
|
- @confirm="handleVisible('receiver')"
|
|
|
+ width="700px"
|
|
|
+ @cancel="handleVisible('principalName')"
|
|
|
+ @confirm="handleVisible('principalName')"
|
|
|
:visible="receiver_visible"
|
|
|
>
|
|
|
<simple-table
|
|
|
:list="receiver_table_list"
|
|
|
:config="receiver_table_config"
|
|
|
:loading="receiver_table_loading"
|
|
|
- @receiver="handleVisible('receiver')"
|
|
|
+ @receiver="handleVisible('principalName')"
|
|
|
></simple-table>
|
|
|
</simple-dialog>
|
|
|
</div>
|
|
@@ -58,146 +59,105 @@ import simpleTable from "./components/table.vue";
|
|
|
import simpleDialog from "./components/dialog.vue";
|
|
|
import simplePagination from "./components/pagination.vue";
|
|
|
export default {
|
|
|
- components: {
|
|
|
- analysis,
|
|
|
- simpleTable,
|
|
|
- simpleDialog,
|
|
|
- simpleForm,
|
|
|
- simplePagination,
|
|
|
- },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- page: 1,
|
|
|
- rows: 10,
|
|
|
- total: 0,
|
|
|
- template_visible: false,
|
|
|
- receiver_visible: false,
|
|
|
- table_loading: false,
|
|
|
- receiver_table_loading: false,
|
|
|
- table_search: {},
|
|
|
- table_form: [
|
|
|
- {
|
|
|
- label: "模板名称",
|
|
|
- props: "templateName",
|
|
|
- type: "input",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "截止日期",
|
|
|
- props: "endTime",
|
|
|
- type: "date",
|
|
|
- },
|
|
|
- ],
|
|
|
- table_list: [],
|
|
|
- table_handle_row: [
|
|
|
- {
|
|
|
- label: "查看",
|
|
|
- props: "detail",
|
|
|
- },
|
|
|
- // {
|
|
|
- // label: "修改",
|
|
|
- // props: "edit",
|
|
|
- // },
|
|
|
- {
|
|
|
- label: "撤回",
|
|
|
- props: "delete",
|
|
|
- popconfirm: true,
|
|
|
- },
|
|
|
- ],
|
|
|
- table_config: [
|
|
|
- {
|
|
|
- label: "模板名称",
|
|
|
- props: "templateName",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "填报事由",
|
|
|
- props: "reason",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "填报注意事项",
|
|
|
- props: "precautions",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "截止时间",
|
|
|
- props: "date",
|
|
|
- type: "endTime",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "接收人",
|
|
|
- props: "principalName",
|
|
|
- type: "click",
|
|
|
- },
|
|
|
- ],
|
|
|
- receiver_table_list: [
|
|
|
- {
|
|
|
- receiver: "刘洁",
|
|
|
- department: "科室1",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "李方岩",
|
|
|
- department: "科室2",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "吴磊",
|
|
|
- department: "科室2",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "孙震",
|
|
|
- department: "科室2",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "赵洪松",
|
|
|
- department: "科室2",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "孙川",
|
|
|
- department: "科室2",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "韦琳娜",
|
|
|
- department: "科室2",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "吴磊",
|
|
|
- department: "科室2",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "刘洁",
|
|
|
- department: "科室1",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- {
|
|
|
- receiver: "刘洁",
|
|
|
- department: "科室1",
|
|
|
- date: "",
|
|
|
- },
|
|
|
- ],
|
|
|
- receiver_table_config: [
|
|
|
- {
|
|
|
- label: "接收人",
|
|
|
- props: "receiver",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "科室",
|
|
|
- props: "department",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "回复时间",
|
|
|
- props: "date",
|
|
|
- },
|
|
|
- ],
|
|
|
- };
|
|
|
- },
|
|
|
- methods: {
|
|
|
- async handleInit(data) {
|
|
|
- this.$http({
|
|
|
+ components: {
|
|
|
+ analysis,
|
|
|
+ simpleTable,
|
|
|
+ simpleDialog,
|
|
|
+ simpleForm,
|
|
|
+ simplePagination,
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ page: 1,
|
|
|
+ rows: 10,
|
|
|
+ total: 0,
|
|
|
+ template_visible: false,
|
|
|
+ receiver_visible: false,
|
|
|
+ table_loading: false,
|
|
|
+ receiver_table_loading: false,
|
|
|
+ table_search: {},
|
|
|
+ table_form: [
|
|
|
+ {
|
|
|
+ label: "模板名称",
|
|
|
+ props: "templateName",
|
|
|
+ type: "input",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "截止日期",
|
|
|
+ props: "endTime",
|
|
|
+ type: "date",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ table_list: [],
|
|
|
+ table_handle_row: [
|
|
|
+ {
|
|
|
+ label: "查看",
|
|
|
+ props: "detail",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "修改",
|
|
|
+ props: "edit",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "撤回",
|
|
|
+ props: "withdraw",
|
|
|
+ popconfirm: true,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ table_config: [
|
|
|
+ {
|
|
|
+ label: "模板名称",
|
|
|
+ props: "templateName",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "填报事由",
|
|
|
+ props: "reason",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "填报注意事项",
|
|
|
+ props: "precautions",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "截止时间",
|
|
|
+ props: "endTime",
|
|
|
+ type: "date",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "接收人",
|
|
|
+ props: "principalName",
|
|
|
+ type: "click",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ receiver_table_list: [{
|
|
|
+ receiver:'接收人',
|
|
|
+ department:'科室',
|
|
|
+ date:'回复时间',
|
|
|
+ value:'2021.11.4 XXX 同意\n2021.11.4 XXX 同意'
|
|
|
+ }],
|
|
|
+ receiver_table_config: [
|
|
|
+ {
|
|
|
+ label: "接收人",
|
|
|
+ props: "receiver",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "科室",
|
|
|
+ props: "department",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "回复时间",
|
|
|
+ props: "date",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "审批记录",
|
|
|
+ props: "value",
|
|
|
+ type:'textarea'
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async handleInit(data) {
|
|
|
+ this.$http({
|
|
|
url: "/CMKIssued/CMKIssuedList",
|
|
|
method: "post",
|
|
|
headers: {
|
|
@@ -205,74 +165,87 @@ export default {
|
|
|
},
|
|
|
data: data,
|
|
|
}).then((res) => {
|
|
|
- console.log(res);
|
|
|
- res.data = this.table_list
|
|
|
+ console.log(res);
|
|
|
+ res.data = this.table_list;
|
|
|
+ this.table_list.push({
|
|
|
+ templateName: "模板名称",
|
|
|
+ precautions: "填报注意事项",
|
|
|
+ reason: "填报事由",
|
|
|
+ endTime: new Date(),
|
|
|
+ principalName: "接收人",
|
|
|
+ });
|
|
|
});
|
|
|
- // this.table_loading = true;
|
|
|
- // const data = [];
|
|
|
- // let index = 0;
|
|
|
- // while (index < 1) {
|
|
|
- // data.push(
|
|
|
- // ...JSON.parse(sessionStorage.getItem("global_data")).filter(
|
|
|
- // (element) => element.issue_status
|
|
|
- // )
|
|
|
- // );
|
|
|
- // index = index + 1;
|
|
|
- // }
|
|
|
- // this.total = index;
|
|
|
- // this.table_list = data;
|
|
|
- // this.table_loading = false;
|
|
|
- },
|
|
|
- handleSearch(data) {
|
|
|
- this.table_search = data;
|
|
|
- this.handleReset();
|
|
|
- this.handleInit({...data,page:this.page,pagesize:this.rows});
|
|
|
- },
|
|
|
- handleChange(page) {
|
|
|
- this.page = page;
|
|
|
- this.handleInit({...this.table_search,page:this.page,pagesize:this.rows});
|
|
|
- },
|
|
|
- handleVisible(props) {
|
|
|
- switch (props) {
|
|
|
- case "template":
|
|
|
- this.template_visible = !this.template_visible;
|
|
|
- break;
|
|
|
- case "receiver":
|
|
|
- this.receiver_visible = !this.receiver_visible;
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
- handleReset() {
|
|
|
- this.page = 1;
|
|
|
- },
|
|
|
- handleDelete() {
|
|
|
- const array = [
|
|
|
- {
|
|
|
- ...JSON.parse(sessionStorage.global_data)[0],
|
|
|
- issue_status: 0,
|
|
|
- },
|
|
|
- ];
|
|
|
- sessionStorage.setItem("global_data", JSON.stringify(array));
|
|
|
- const process_array = JSON.parse(sessionStorage.global_process);
|
|
|
- process_array.push({
|
|
|
- link: "撤回工单",
|
|
|
- creatperson: `ADMIN ${this.$formatDate(
|
|
|
- new Date(),
|
|
|
- "YYYY-MM-DD"
|
|
|
- )}`,
|
|
|
- explain: "",
|
|
|
- });
|
|
|
- sessionStorage.setItem(
|
|
|
- "global_process",
|
|
|
- JSON.stringify(process_array)
|
|
|
- );
|
|
|
- this.$message.success("撤回成功");
|
|
|
- this.handleInit();
|
|
|
- },
|
|
|
+ // this.table_loading = true;
|
|
|
+ // const data = [];
|
|
|
+ // let index = 0;
|
|
|
+ // while (index < 1) {
|
|
|
+ // data.push(
|
|
|
+ // ...JSON.parse(sessionStorage.getItem("global_data")).filter(
|
|
|
+ // (element) => element.issue_status
|
|
|
+ // )
|
|
|
+ // );
|
|
|
+ // index = index + 1;
|
|
|
+ // }
|
|
|
+ // this.total = index;
|
|
|
+ // this.table_list = data;
|
|
|
+ // this.table_loading = false;
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.handleInit({...this.table_search,page:this.page,pagesize:this.rows});
|
|
|
+ handleSearch(data) {
|
|
|
+ this.table_search = data;
|
|
|
+ this.handleReset();
|
|
|
+ this.handleInit({ ...data, page: this.page, pagesize: this.rows });
|
|
|
+ },
|
|
|
+ handleChange(page) {
|
|
|
+ this.page = page;
|
|
|
+ this.handleInit({
|
|
|
+ ...this.table_search,
|
|
|
+ page: this.page,
|
|
|
+ pagesize: this.rows,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleVisible(props, params) {
|
|
|
+ switch (props) {
|
|
|
+ case "template":
|
|
|
+ this.template_visible = !this.template_visible;
|
|
|
+ break;
|
|
|
+ case "principalName":
|
|
|
+ if (params) {
|
|
|
+ console.log(params);
|
|
|
+ }
|
|
|
+ this.receiver_visible = !this.receiver_visible;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ handleReset() {
|
|
|
+ this.page = 1;
|
|
|
+ },
|
|
|
+ handleWithdraw() {
|
|
|
+ console.log('aaaaaaaaaaaaa')
|
|
|
+ const array = [
|
|
|
+ {
|
|
|
+ ...JSON.parse(sessionStorage.global_data)[0],
|
|
|
+ issue_status: 0,
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ sessionStorage.setItem("global_data", JSON.stringify(array));
|
|
|
+ const process_array = JSON.parse(sessionStorage.global_process);
|
|
|
+ process_array.push({
|
|
|
+ link: "撤回工单",
|
|
|
+ creatperson: `ADMIN ${this.$formatDate(new Date(), "YYYY-MM-DD")}`,
|
|
|
+ explain: "",
|
|
|
+ });
|
|
|
+ sessionStorage.setItem("global_process", JSON.stringify(process_array));
|
|
|
+ this.$message.success("撤回成功");
|
|
|
+ this.handleInit();
|
|
|
},
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.handleInit({
|
|
|
+ ...this.table_search,
|
|
|
+ page: this.page,
|
|
|
+ pagesize: this.rows,
|
|
|
+ });
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|