Просмотр исходного кода

Merge branch 'hcb' of SH-Arbitrate/Arbitrate-Frontend into dev

hanchaobo 2 лет назад
Родитель
Сommit
4cb035dcc8

+ 32
- 0
src/api/officialSeal/officialSeal.js Просмотреть файл

@@ -64,4 +64,36 @@ export function sealUpdate(data) {
64 64
         method: 'put',
65 65
         data: data
66 66
     })
67
+}
68
+// 新增模板
69
+export function insertTemplate(data) {
70
+    return request({
71
+        url: '/deptIdentify/insertTemplate',
72
+        method: 'post',
73
+        data: data
74
+    })
75
+}
76
+// 修改模板
77
+export function updateTemplate(data) {
78
+    return request({
79
+        url: '/deptIdentify/updateTemplate',
80
+        method: 'post',
81
+        data: data
82
+    })
83
+}
84
+// 删除模板
85
+export function deleteTemplate(data) {
86
+    return request({
87
+        url: '/deptIdentify/deleteTemplate',
88
+        method: 'delete',
89
+        params: data
90
+    })
91
+}
92
+// 根据机构id查询模板
93
+export function getTemplate(data) {
94
+    return request({
95
+        url: '/deptIdentify/getTemplate',
96
+        method: 'get',
97
+        params: data
98
+    })
67 99
 }

+ 2
- 2
src/views/officialSeal/components/addInstitution.vue Просмотреть файл

@@ -25,7 +25,7 @@ import {
25 25
     insert,
26 26
 } from "@/api/officialSeal/officialSeal.js";
27 27
 export default {
28
-    props: ["operateVisable"],
28
+    props: ["operateVisable","queryParams"],
29 29
     data() {
30 30
         return {
31 31
             title: "新增机构",
@@ -60,7 +60,7 @@ export default {
60 60
             insert(data).then(res => {
61 61
                 this.$modal.msgSuccess("新增成功!");
62 62
                 this.$emit("cancelFilingreview");
63
-                this.$emit('getList');
63
+                this.$emit('getList',this.queryParams);
64 64
             })
65 65
         },
66 66
         // // 编辑

+ 108
- 0
src/views/officialSeal/components/addTemplate.vue Просмотреть файл

@@ -0,0 +1,108 @@
1
+<template>
2
+    <div>
3
+        <el-dialog title="新增模板" :visible="uploadVisable" v-if="uploadVisable" @close="cancel" width="600px" center>
4
+            <el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
5
+                class="demo-ruleForm">
6
+                <el-form-item label="模板名称" prop="temName">
7
+                    <el-input v-model="ruleForm.temName"></el-input>
8
+                </el-form-item>
9
+                <el-form-item label="机构名称" prop="identifyId">
10
+                    <el-select v-model="ruleForm.identifyId" placeholder="请选择">
11
+                        <el-option v-for="item in tempList" :key="item.id" :label="item.identifyName" :value="item.id">
12
+                        </el-option>
13
+                    </el-select>
14
+                </el-form-item>
15
+            </el-form>
16
+            <el-upload class="avatar-uploader" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload"
17
+                :action="UploadUrl()" :headers="headers" :data="filedata" :on-remove="handleRemove"
18
+                :on-change="handleChange" accept=".pdf,.word" :file-list="fileList" :auto-upload="false">
19
+                <el-button size="small" type="primary">点击上传</el-button>
20
+            </el-upload>
21
+            <div slot="footer" class="dialog-footer">
22
+                <el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
23
+                <el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
24
+            </div>
25
+        </el-dialog>
26
+    </div>
27
+</template>
28
+<script>
29
+import { getToken } from "@/utils/auth";
30
+import {
31
+    deptIdentifyList,
32
+} from "@/api/officialSeal/officialSeal.js";
33
+export default {
34
+    props: ["uploadVisable", "uploadData","queryParams"],
35
+    data() {
36
+        return {
37
+            fileList: [],
38
+            data: [],
39
+            tempList:[],
40
+            headers: {
41
+                Authorization: "Bearer " + getToken(),
42
+            },
43
+            filedata: {},
44
+            flagBtn: false,
45
+            ruleForm: {},
46
+            rules: {
47
+                temName: [
48
+                    { required: true, message: '请输入模板名称', trigger: 'blur' },
49
+                ],
50
+            }
51
+        };
52
+    },
53
+    watch: {
54
+        uploadVisable(val) {
55
+            if (val) {
56
+                let queryParams = {
57
+                    pageNum: 1,
58
+                    pageSize: 10000000000000000000000,
59
+                };
60
+                deptIdentifyList(queryParams).then(res => {
61
+                    this.tempList = res.rows;
62
+                })
63
+                this.ruleForm = {}
64
+            }
65
+        }
66
+    },
67
+    created() {
68
+
69
+    },
70
+    methods: {
71
+        cancel() {
72
+            this.$emit("cancelUpload");
73
+        },
74
+        handleChange(file, fileList) {
75
+            // this.imageUrl = URL.createObjectURL(file.raw);
76
+        },
77
+        UploadUrl() {
78
+            return window.location.origin + "/API/deptIdentify/insertTemplate";
79
+        },
80
+        submitUpload() {
81
+            this.$refs['ruleForm'].validate((valid) => {
82
+                if (valid) {
83
+                    this.filedata.identifyId = this.ruleForm.identifyId;
84
+                    this.filedata.temName = this.ruleForm.temName;
85
+                    this.$refs.upload.submit();
86
+                }
87
+            });
88
+        },
89
+        handleRemove(file, fileList) {
90
+            console.log(file, fileList);
91
+        },
92
+        beforeUpload(file) {
93
+            const isImg = file.type === '.pdf' || '.word'
94
+            if (!isImg) {
95
+                this.$message.error('只能上传pdf,word格式的文件')
96
+            }
97
+            return isImg
98
+        },
99
+        handleSuccess() {
100
+            this.$message.success('上传成功');
101
+            this.$emit("cancelUpload");
102
+            this.$emit('getList',this.queryParams);
103
+        }
104
+    },
105
+};
106
+</script>
107
+  
108
+<style lang="scss" scoped></style>

+ 100
- 0
src/views/officialSeal/components/editTemplate.vue Просмотреть файл

@@ -0,0 +1,100 @@
1
+<template>
2
+    <div>
3
+        <el-dialog title="修改模板" :visible="editVisable" v-if="editVisable" @close="cancel" width="600px" center>
4
+            <el-form :model="ruleForm" label-position="left" :rules="rules" ref="ruleForm" label-width="90px"
5
+                class="demo-ruleForm">
6
+                <el-form-item label="模板名称" prop="temName">
7
+                    <el-input v-model="ruleForm.temName"></el-input>
8
+                </el-form-item>
9
+                <el-form-item label="当前模板">
10
+                    <span style="color: #0e5ce3;cursor:pointer" @click="openUrl(editData.temOrigPath)">{{ editData.temOrigPath }}</span>
11
+                </el-form-item>
12
+            </el-form>
13
+            <el-upload class="avatar-uploader" :before-upload="beforeUpload" :on-success="handleSuccess" ref="upload"
14
+                :action="UploadUrl()" :headers="headers" :data="filedata" :on-remove="handleRemove"
15
+                :on-change="handleChange" accept=".pdf,.word" :file-list="fileList" :auto-upload="false">
16
+                <el-button size="small" type="primary">点击上传</el-button>
17
+            </el-upload>
18
+            <div slot="footer" class="dialog-footer">
19
+                <el-button @click="cancel" class="endbutton"><span>取 消</span></el-button>
20
+                <el-button type="primary" @click="submitUpload" class="endbutton"><span>确认</span></el-button>
21
+            </div>
22
+        </el-dialog>
23
+    </div>
24
+</template>
25
+<script>
26
+import { getToken } from "@/utils/auth";
27
+export default {
28
+    props: ["editVisable", "editData","queryParams"],
29
+    data() {
30
+        return {
31
+            fileList: [],
32
+            data: [],
33
+            headers: {
34
+                Authorization: "Bearer " + getToken(),
35
+            },
36
+            filedata: {},
37
+            flagBtn: false,
38
+            ruleForm: {},
39
+            rules: {
40
+                temName: [
41
+                    { required: true, message: '请输入模板名称', trigger: 'blur' },
42
+                ],
43
+            }
44
+        };
45
+    },
46
+    watch: {
47
+        editData(val) {
48
+            if (val) {
49
+                this.ruleForm = val;
50
+            }
51
+        }
52
+    },
53
+    created() {
54
+
55
+    },
56
+    methods: {
57
+        // 打开链接
58
+        openUrl(urlTemp){
59
+            let headPath = window.location.origin + "/API/";
60
+            window.open(headPath + urlTemp);
61
+        },
62
+        cancel() {
63
+            this.$emit("cancelEdit");
64
+        },
65
+        handleChange(file, fileList) {
66
+            // this.imageUrl = URL.createObjectURL(file.raw);
67
+        },
68
+        UploadUrl() {
69
+            return window.location.origin + "/API/deptIdentify/updateTemplate";
70
+        },
71
+        submitUpload() {
72
+            this.$refs['ruleForm'].validate((valid) => {
73
+                if (valid) {
74
+                    this.filedata.id = this.editData.id;
75
+                    this.filedata.temName = this.ruleForm.temName;
76
+                    this.$refs.upload.submit();
77
+                }
78
+            });
79
+        },
80
+        handleRemove(file, fileList) {
81
+            console.log(file, fileList);
82
+        },
83
+        beforeUpload(file) {
84
+            const isImg = file.type === '.pdf' || '.word'
85
+            if (!isImg) {
86
+                this.$message.error('只能上传pdf,word格式的文件')
87
+            }
88
+            return isImg
89
+        },
90
+        handleSuccess() {
91
+            this.$message.success('上传成功');
92
+            this.$emit("cancelEdit");
93
+            this.$emit('getList',this.queryParams);
94
+        }
95
+    },
96
+};
97
+</script>
98
+  
99
+<style lang="scss" scoped>
100
+</style>

+ 2
- 2
src/views/officialSeal/components/eidtInstitution.vue Просмотреть файл

@@ -25,7 +25,7 @@ import {
25 25
     sealUpdate
26 26
 } from "@/api/officialSeal/officialSeal.js";
27 27
 export default {
28
-    props: ["editVisable","editData"],
28
+    props: ["editVisable","editData","queryParams"],
29 29
     data() {
30 30
         return {
31 31
             title: "修改机构",
@@ -60,7 +60,7 @@ export default {
60 60
             sealUpdate(data).then(res => {
61 61
                 this.$modal.msgSuccess("修改成功!");
62 62
                 this.$emit("cancelEdit");
63
-                this.$emit('getList');
63
+                this.$emit('getList',this.queryParams);
64 64
             })
65 65
         },
66 66
         // 提交form表单

+ 4
- 4
src/views/officialSeal/officialSealList.vue Просмотреть файл

@@ -38,13 +38,13 @@
38 38
         </el-table>
39 39
         <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
40 40
             @pagination="getList(queryParams)" />
41
-        <addInstitution :operateVisable="operateVisable" @cancelFilingreview="cancelFilingreview" @getList="getList">
41
+        <addInstitution :operateVisable="operateVisable" @cancelFilingreview="cancelFilingreview" :queryParams="queryParams" @getList="getList">
42 42
         </addInstitution>
43
-        <uploadSeal :uploadVisable="uploadVisable" @cancelUpload="cancelUpload" :uploadData="uploadData" @getList="getList">
43
+        <uploadSeal :uploadVisable="uploadVisable" @cancelUpload="cancelUpload" :queryParams="queryParams" :uploadData="uploadData" @getList="getList">
44 44
         </uploadSeal>
45
-        <sealManage :sealVisable="sealVisable" @cancelSeal="cancelSeal" :sealData="sealData">
45
+        <sealManage :sealVisable="sealVisable" @cancelSeal="cancelSeal" :queryParams="queryParams" :sealData="sealData">
46 46
         </sealManage>
47
-        <eidtInstitution :editVisable="editVisable" @cancelEdit="cancelEdit" @getList="getList" :editData="editData"></eidtInstitution>
47
+        <eidtInstitution :editVisable="editVisable" @cancelEdit="cancelEdit" :queryParams="queryParams" @getList="getList" :editData="editData"></eidtInstitution>
48 48
     </div>
49 49
 </template>
50 50
   

+ 153
- 0
src/views/officialSeal/templateManagement.vue Просмотреть файл

@@ -0,0 +1,153 @@
1
+<template>
2
+    <div class="app-container">
3
+        <el-row :gutter="10" class="mb8">
4
+            <el-col :span="1.5">
5
+                <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="addtemplate">新增裁决书模板</el-button>
6
+                <!-- v-hasPermi="['caseManagement:list:add']" -->
7
+            </el-col>
8
+        </el-row>
9
+        <el-table v-loading="loading" :data="dataList" style="width: 100%">
10
+            <el-table-column label="序号" type="index" align="center">
11
+                <template slot-scope="scope">
12
+                    <span>{{
13
+                        (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1
14
+                    }}</span>
15
+                </template>
16
+            </el-table-column>
17
+            <el-table-column label="仲裁机构名称" align="center" prop="identifyName" :show-overflow-tooltip="true" />
18
+            <el-table-column label="裁决书名称" align="center" prop="temName" :show-overflow-tooltip="true" />
19
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
20
+                <template slot-scope="scope">
21
+                    <el-button size="mini" @click="deleteTemplate(scope.row)" type="text" icon="el-icon-delete">删除</el-button>
22
+                    <el-button size="mini" @click="eidtTemplate(scope.row)" type="text" icon="el-icon-edit">修改模板</el-button>
23
+                </template>
24
+            </el-table-column>
25
+        </el-table>
26
+        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
27
+            @pagination="getList(queryParams)" />
28
+       
29
+        <addTemplate :uploadVisable="uploadVisable" @cancelUpload="cancelUpload" :uploadData="uploadData" @getList="getList" :queryParams="queryParams">
30
+        </addTemplate>
31
+        <sealManage :sealVisable="sealVisable" @cancelSeal="cancelSeal" :sealData="sealData">
32
+        </sealManage>
33
+        <editTemplate :editVisable="editVisable" @cancelEdit="cancelEdit" @getList="getList" :editData="editData" :queryParams="queryParams"></editTemplate>
34
+    </div>
35
+</template>
36
+  
37
+<script>
38
+import {
39
+    getTemplate,
40
+    deleteTemplate
41
+} from "@/api/officialSeal/officialSeal.js";
42
+
43
+import addInstitution from "./components/addInstitution";
44
+import addTemplate from "./components/addTemplate";
45
+import sealManage from "./components/sealManage";
46
+import editTemplate from "./components/editTemplate";
47
+export default {
48
+    name: "paymentList",
49
+    components: {
50
+        addInstitution,
51
+        addTemplate,
52
+        sealManage,
53
+        editTemplate
54
+    },
55
+    data() {
56
+        return {
57
+            queryParams: {
58
+                pageNum: 1,
59
+                pageSize: 10,
60
+            },
61
+            // 遮罩层
62
+            loading: false,
63
+            // 总条数
64
+            total: 0,
65
+            // 表格数据
66
+            form: {},
67
+            // 校验表单
68
+            rules: {},
69
+            dataList: [],
70
+            operateVisable: false,//新增弹窗
71
+            uploadVisable: false,//上传弹窗
72
+            sealVisable: false,//公章列表弹窗
73
+            uploadData: {},
74
+            sealData: {},
75
+            editVisable:false,
76
+            editData:{}
77
+        };
78
+    },
79
+    created() {
80
+        this.getList(this.queryParams)
81
+    },
82
+    methods: {
83
+        // 删除
84
+        deleteTemplate(row) {
85
+            this.$modal
86
+                .confirm("是否删除")
87
+                .then((res) => {
88
+                    this.deleteSealFn({ id: row.id })
89
+                })
90
+        },
91
+        // 删除接口
92
+        deleteSealFn(data) {
93
+            deleteTemplate(data).then(res => {
94
+                this.$modal.msgSuccess("删除成功!");
95
+                this.getList(this.queryParams);
96
+            })
97
+        },
98
+        cancelSeal() {
99
+            this.sealVisable = false;
100
+        },
101
+        // 新增模板
102
+        addtemplate(row) {
103
+            this.uploadVisable = true;
104
+            this.uploadData = row;
105
+        },
106
+        cancelUpload() {
107
+            this.uploadVisable = false;
108
+        },
109
+        // 编辑
110
+        eidtTemplate(row) {
111
+            this.editVisable = true;
112
+            this.editData = row;
113
+        },
114
+        cancelEdit() {
115
+            this.editVisable = false;
116
+        },
117
+        /** 搜索按钮操作 */
118
+        handleQuery() {
119
+            this.queryParams.pageNum = 1;
120
+            this.getList(this.queryParams);
121
+        },
122
+        /** 重置按钮操作 */
123
+        resetQuery() {
124
+            this.resetForm("queryForm");
125
+            this.handleQuery();
126
+        },
127
+        // 查询列表数据
128
+        getList(parms) {
129
+            this.loading = true;
130
+            getTemplate(parms).then((response) => {
131
+                this.dataList = response.rows;
132
+                this.total = response.total;
133
+                this.loading = false;
134
+                console.log(this.dataList,"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL");
135
+                // this.dataList.forEach(item => {
136
+                //     if (item.identifyStatus == 0 || item.identifyStatus == null) {
137
+                //         item.identifyStatus = '未认证'
138
+                //     } else {
139
+                //         item.identifyStatus = '已认证'
140
+                //     }
141
+                //     if (item.isUse == 0 || item.isUse == null) {
142
+                //         item.isUse = '未启用'
143
+                //     } else {
144
+                //         item.isUse = '已启用'
145
+                //     }
146
+                // })
147
+            });
148
+        },
149
+    },
150
+};
151
+</script>
152
+  
153
+<style lang="scss" scoped></style>