正在显示
5 个修改的文件
包含
1115 行增加
和
19 行删除
src/api/compliancemanagement/legalStaff.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// 查询【请填写功能名称】列表 | ||
| 4 | +export function listLegalStaff(query) { | ||
| 5 | + return request({ | ||
| 6 | + url: '/system/legalStaff/list', | ||
| 7 | + method: 'get', | ||
| 8 | + params: query | ||
| 9 | + }) | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +// 查询【请填写功能名称】详细 | ||
| 13 | +export function getLegalStaff(id) { | ||
| 14 | + return request({ | ||
| 15 | + url: '/system/legalStaff/' + id, | ||
| 16 | + method: 'get' | ||
| 17 | + }) | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +// 新增【请填写功能名称】 | ||
| 21 | +export function addLegalStaff(data) { | ||
| 22 | + return request({ | ||
| 23 | + url: '/system/legalStaff', | ||
| 24 | + method: 'post', | ||
| 25 | + data: data | ||
| 26 | + }) | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +// 修改【请填写功能名称】 | ||
| 30 | +export function updateLegalStaff(data) { | ||
| 31 | + return request({ | ||
| 32 | + url: '/system/legalStaff', | ||
| 33 | + method: 'put', | ||
| 34 | + data: data | ||
| 35 | + }) | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +// 删除【请填写功能名称】 | ||
| 39 | +export function delLegalStaff(id) { | ||
| 40 | + return request({ | ||
| 41 | + url: '/system/legalStaff/' + id, | ||
| 42 | + method: 'delete' | ||
| 43 | + }) | ||
| 44 | +} |
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// 查询【请填写功能名称】列表 | ||
| 4 | +export function listOutsideCounsel(query) { | ||
| 5 | + return request({ | ||
| 6 | + url: '/system/outsideCounsel/list', | ||
| 7 | + method: 'get', | ||
| 8 | + params: query | ||
| 9 | + }) | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +// 查询【请填写功能名称】详细 | ||
| 13 | +export function getOutsideCounsel(id) { | ||
| 14 | + return request({ | ||
| 15 | + url: '/system/outsideCounsel/' + id, | ||
| 16 | + method: 'get' | ||
| 17 | + }) | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +// 新增【请填写功能名称】 | ||
| 21 | +export function addOutsideCounsel(data) { | ||
| 22 | + return request({ | ||
| 23 | + url: '/system/outsideCounsel', | ||
| 24 | + method: 'post', | ||
| 25 | + data: data | ||
| 26 | + }) | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +// 修改【请填写功能名称】 | ||
| 30 | +export function updateOutsideCounsel(data) { | ||
| 31 | + return request({ | ||
| 32 | + url: '/system/outsideCounsel', | ||
| 33 | + method: 'put', | ||
| 34 | + data: data | ||
| 35 | + }) | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +// 删除【请填写功能名称】 | ||
| 39 | +export function delOutsideCounsel(id) { | ||
| 40 | + return request({ | ||
| 41 | + url: '/system/outsideCounsel/' + id, | ||
| 42 | + method: 'delete' | ||
| 43 | + }) | ||
| 44 | +} |
| @@ -109,8 +109,7 @@ | @@ -109,8 +109,7 @@ | ||
| 109 | <el-table-column label="模板名称" align="center" prop="templatename" /> | 109 | <el-table-column label="模板名称" align="center" prop="templatename" /> |
| 110 | <el-table-column label="模板文件" align="center" prop="templatefile"> | 110 | <el-table-column label="模板文件" align="center" prop="templatefile"> |
| 111 | <template slot-scope="scope"> | 111 | <template slot-scope="scope"> |
| 112 | - | ||
| 113 | - <img src="@/assets/images/PDF.png" @click="openFile(scope.row.templatefile)" width="40px" height="auto" style="cursor: pointer"/> | 112 | + <img v-if="scope.row.templatefile" src="@/assets/images/PDF.png" @click="openFile(scope.row.templatefile)" width="40px" height="auto" style="cursor: pointer"/> |
| 114 | </template> | 113 | </template> |
| 115 | </el-table-column> | 114 | </el-table-column> |
| 116 | <el-table-column | 115 | <el-table-column |
| @@ -145,9 +144,6 @@ | @@ -145,9 +144,6 @@ | ||
| 145 | </el-table-column> | 144 | </el-table-column> |
| 146 | </el-table> | 145 | </el-table> |
| 147 | <!-- 在页面外部定义弹窗组件 --> | 146 | <!-- 在页面外部定义弹窗组件 --> |
| 148 | - <el-dialog :visible.sync="dialogVisible"> | ||
| 149 | - <img :src="dialogImageUrl" alt="图片预览" style="width: 100%" /> | ||
| 150 | - </el-dialog> | ||
| 151 | <pagination | 147 | <pagination |
| 152 | v-show="total > 0" | 148 | v-show="total > 0" |
| 153 | :total="total" | 149 | :total="total" |
| @@ -155,16 +151,13 @@ | @@ -155,16 +151,13 @@ | ||
| 155 | :limit.sync="queryParams.pageSize" | 151 | :limit.sync="queryParams.pageSize" |
| 156 | @pagination="getList" | 152 | @pagination="getList" |
| 157 | /> | 153 | /> |
| 158 | - | ||
| 159 | - <el-dialog :visible.sync="dialogVisible" title="合同预览" width="50%"> | ||
| 160 | - <embed :src="currentFile" /> | ||
| 161 | - <span slot="footer" class="dialog-footer"> | ||
| 162 | - <el-button @click="dialogVisible = false">关闭</el-button> | ||
| 163 | - </span> | 154 | + <el-dialog title="合同预览" :visible.sync="dialogVisible" width="50%" center :before-close="handleClose" > |
| 155 | + <embed :src="currentFile" type="application/pdf" width="100%" height="800px" v-if="currentFile" | ||
| 156 | + /> | ||
| 164 | </el-dialog> | 157 | </el-dialog> |
| 165 | 158 | ||
| 166 | <!-- 添加或修改【请填写功能名称】对话框 --> | 159 | <!-- 添加或修改【请填写功能名称】对话框 --> |
| 167 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | 160 | + <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body> |
| 168 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 161 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 169 | <el-form-item label="模板编号" prop="templateno"> | 162 | <el-form-item label="模板编号" prop="templateno"> |
| 170 | <el-input v-model="form.templateno" placeholder="请输入模板编号" /> | 163 | <el-input v-model="form.templateno" placeholder="请输入模板编号" /> |
| @@ -243,17 +236,15 @@ export default { | @@ -243,17 +236,15 @@ export default { | ||
| 243 | name: "Contracttemplate", | 236 | name: "Contracttemplate", |
| 244 | data() { | 237 | data() { |
| 245 | return { | 238 | return { |
| 246 | - dialogVisible: false, | ||
| 247 | currentFile: '', | 239 | currentFile: '', |
| 248 | // 设置上传的请求头部 | 240 | // 设置上传的请求头部 |
| 249 | headers: { Authorization: "Bearer " + getToken() }, | 241 | headers: { Authorization: "Bearer " + getToken() }, |
| 250 | // 上传的地址 | 242 | // 上传的地址 |
| 251 | url: process.env.VUE_APP_BASE_API + "/common/uploads", | 243 | url: process.env.VUE_APP_BASE_API + "/common/uploads", |
| 252 | // urlhead: "http://joycart.zgftlm.com", | 244 | // urlhead: "http://joycart.zgftlm.com", |
| 253 | - urlhead:process.env.VUE_APP_BASE_API, | 245 | + urlhead:process.env.VUE_APP_BASE_API + "/", |
| 254 | fileList: [], | 246 | fileList: [], |
| 255 | dialogVisible: false, | 247 | dialogVisible: false, |
| 256 | - dialogImageUrl: "", | ||
| 257 | // 按钮loading | 248 | // 按钮loading |
| 258 | buttonLoading: false, | 249 | buttonLoading: false, |
| 259 | // 遮罩层 | 250 | // 遮罩层 |
| @@ -309,6 +300,10 @@ export default { | @@ -309,6 +300,10 @@ export default { | ||
| 309 | this.getList(); | 300 | this.getList(); |
| 310 | }, | 301 | }, |
| 311 | methods: { | 302 | methods: { |
| 303 | + handleClose() { | ||
| 304 | + this.currentFile = ""; | ||
| 305 | + this.dialogVisible = false; | ||
| 306 | + }, | ||
| 312 | openFile(filePath) { | 307 | openFile(filePath) { |
| 313 | 308 | ||
| 314 | this.currentFile = this.urlhead+filePath; | 309 | this.currentFile = this.urlhead+filePath; |
| @@ -365,10 +360,6 @@ export default { | @@ -365,10 +360,6 @@ export default { | ||
| 365 | } | 360 | } |
| 366 | 361 | ||
| 367 | }, | 362 | }, |
| 368 | - showImage(imageUrl) { | ||
| 369 | - this.dialogImageUrl = imageUrl; | ||
| 370 | - this.dialogVisible = true; | ||
| 371 | - }, | ||
| 372 | /** 查询【请填写功能名称】列表 */ | 363 | /** 查询【请填写功能名称】列表 */ |
| 373 | getList() { | 364 | getList() { |
| 374 | this.loading = true; | 365 | this.loading = true; |
| @@ -382,6 +373,7 @@ export default { | @@ -382,6 +373,7 @@ export default { | ||
| 382 | cancel() { | 373 | cancel() { |
| 383 | this.open = false; | 374 | this.open = false; |
| 384 | this.reset(); | 375 | this.reset(); |
| 376 | + this.fileList=[] | ||
| 385 | }, | 377 | }, |
| 386 | // 表单重置 | 378 | // 表单重置 |
| 387 | reset() { | 379 | reset() { |
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||
| 4 | + <el-form-item label="法务人姓名" prop="staffName"> | ||
| 5 | + <el-input | ||
| 6 | + v-model="queryParams.staffName" | ||
| 7 | + placeholder="请输入法务人姓名" | ||
| 8 | + clearable | ||
| 9 | + @keyup.enter.native="handleQuery" | ||
| 10 | + /> | ||
| 11 | + </el-form-item> | ||
| 12 | + <el-form-item label="年龄" prop="ages"> | ||
| 13 | + <el-input | ||
| 14 | + v-model="queryParams.ages" | ||
| 15 | + placeholder="请输入年龄" | ||
| 16 | + clearable | ||
| 17 | + @keyup.enter.native="handleQuery" | ||
| 18 | + /> | ||
| 19 | + </el-form-item> | ||
| 20 | + <el-form-item label="学历" prop="learningExperience"> | ||
| 21 | + <el-input | ||
| 22 | + v-model="queryParams.learningExperience" | ||
| 23 | + placeholder="请输入学历" | ||
| 24 | + clearable | ||
| 25 | + @keyup.enter.native="handleQuery" | ||
| 26 | + /> | ||
| 27 | + </el-form-item> | ||
| 28 | + <el-form-item label="职位" prop="job"> | ||
| 29 | + <el-input | ||
| 30 | + v-model="queryParams.job" | ||
| 31 | + placeholder="请输入职位" | ||
| 32 | + clearable | ||
| 33 | + @keyup.enter.native="handleQuery" | ||
| 34 | + /> | ||
| 35 | + </el-form-item> | ||
| 36 | + <el-form-item label="手机号" prop="phone"> | ||
| 37 | + <el-input | ||
| 38 | + v-model="queryParams.phone" | ||
| 39 | + placeholder="请输入手机号" | ||
| 40 | + clearable | ||
| 41 | + @keyup.enter.native="handleQuery" | ||
| 42 | + /> | ||
| 43 | + </el-form-item> | ||
| 44 | + <el-form-item label="邮箱" prop="email"> | ||
| 45 | + <el-input | ||
| 46 | + v-model="queryParams.email" | ||
| 47 | + placeholder="请输入邮箱" | ||
| 48 | + clearable | ||
| 49 | + @keyup.enter.native="handleQuery" | ||
| 50 | + /> | ||
| 51 | + </el-form-item> | ||
| 52 | + <el-form-item label="公司单位" prop="firmUnit"> | ||
| 53 | + <el-input | ||
| 54 | + v-model="queryParams.firmUnit" | ||
| 55 | + placeholder="请输入公司单位" | ||
| 56 | + clearable | ||
| 57 | + @keyup.enter.native="handleQuery" | ||
| 58 | + /> | ||
| 59 | + </el-form-item> | ||
| 60 | + <el-form-item label="工作经历" prop="workExperience"> | ||
| 61 | + <el-input | ||
| 62 | + v-model="queryParams.workExperience" | ||
| 63 | + placeholder="请输入工作经历" | ||
| 64 | + clearable | ||
| 65 | + @keyup.enter.native="handleQuery" | ||
| 66 | + /> | ||
| 67 | + </el-form-item> | ||
| 68 | + <el-form-item label="专业领域" prop="specialized"> | ||
| 69 | + <el-input | ||
| 70 | + v-model="queryParams.specialized" | ||
| 71 | + placeholder="请输入专业领域" | ||
| 72 | + clearable | ||
| 73 | + @keyup.enter.native="handleQuery" | ||
| 74 | + /> | ||
| 75 | + </el-form-item> | ||
| 76 | + <el-form-item label="资格证书" prop="qualifications"> | ||
| 77 | + <el-input | ||
| 78 | + v-model="queryParams.qualifications" | ||
| 79 | + placeholder="请输入资格证书" | ||
| 80 | + clearable | ||
| 81 | + @keyup.enter.native="handleQuery" | ||
| 82 | + /> | ||
| 83 | + </el-form-item> | ||
| 84 | + <el-form-item> | ||
| 85 | + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 86 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 87 | + </el-form-item> | ||
| 88 | + </el-form> | ||
| 89 | + | ||
| 90 | + <el-row :gutter="10" class="mb8"> | ||
| 91 | + <el-col :span="1.5"> | ||
| 92 | + <el-button | ||
| 93 | + type="primary" | ||
| 94 | + plain | ||
| 95 | + icon="el-icon-plus" | ||
| 96 | + size="mini" | ||
| 97 | + @click="handleAdd" | ||
| 98 | + v-hasPermi="['system:legalStaff:add']" | ||
| 99 | + >新增</el-button> | ||
| 100 | + </el-col> | ||
| 101 | + <el-col :span="1.5"> | ||
| 102 | + <el-button | ||
| 103 | + type="success" | ||
| 104 | + plain | ||
| 105 | + icon="el-icon-edit" | ||
| 106 | + size="mini" | ||
| 107 | + :disabled="single" | ||
| 108 | + @click="handleUpdate" | ||
| 109 | + v-hasPermi="['system:legalStaff:edit']" | ||
| 110 | + >修改</el-button> | ||
| 111 | + </el-col> | ||
| 112 | + <el-col :span="1.5"> | ||
| 113 | + <el-button | ||
| 114 | + type="danger" | ||
| 115 | + plain | ||
| 116 | + icon="el-icon-delete" | ||
| 117 | + size="mini" | ||
| 118 | + :disabled="multiple" | ||
| 119 | + @click="handleDelete" | ||
| 120 | + v-hasPermi="['system:legalStaff:remove']" | ||
| 121 | + >删除</el-button> | ||
| 122 | + </el-col> | ||
| 123 | + <el-col :span="1.5"> | ||
| 124 | + <el-button | ||
| 125 | + type="warning" | ||
| 126 | + plain | ||
| 127 | + icon="el-icon-download" | ||
| 128 | + size="mini" | ||
| 129 | + @click="handleExport" | ||
| 130 | + v-hasPermi="['system:legalStaff:export']" | ||
| 131 | + >导出</el-button> | ||
| 132 | + </el-col> | ||
| 133 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||
| 134 | + </el-row> | ||
| 135 | + | ||
| 136 | + <el-table v-loading="loading" :data="legalStaffList" @selection-change="handleSelectionChange"> | ||
| 137 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 138 | + <el-table-column label="" align="center" prop="id" v-if="true"/> | ||
| 139 | + <el-table-column label="法务人姓名" align="center" prop="staffName" /> | ||
| 140 | + <el-table-column label="年龄" align="center" prop="ages" /> | ||
| 141 | + <el-table-column label="学历" align="center" prop="learningExperience" /> | ||
| 142 | + <el-table-column label="职位" align="center" prop="job" /> | ||
| 143 | + <el-table-column label="手机号" align="center" prop="phone" /> | ||
| 144 | + <el-table-column label="邮箱" align="center" prop="email" /> | ||
| 145 | + <el-table-column label="公司单位" align="center" prop="firmUnit" /> | ||
| 146 | + <el-table-column label="工作经历" align="center" prop="workExperience" /> | ||
| 147 | + <el-table-column label="专业领域" align="center" prop="specialized" /> | ||
| 148 | + <el-table-column label="资格证书" align="center" prop="qualifications" /> | ||
| 149 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||
| 150 | + <template slot-scope="scope"> | ||
| 151 | + <el-button | ||
| 152 | + size="mini" | ||
| 153 | + type="text" | ||
| 154 | + icon="el-icon-edit" | ||
| 155 | + @click="handleUpdate(scope.row)" | ||
| 156 | + v-hasPermi="['system:legalStaff:edit']" | ||
| 157 | + >修改</el-button> | ||
| 158 | + <el-button | ||
| 159 | + size="mini" | ||
| 160 | + type="text" | ||
| 161 | + icon="el-icon-delete" | ||
| 162 | + @click="handleDelete(scope.row)" | ||
| 163 | + v-hasPermi="['system:legalStaff:remove']" | ||
| 164 | + >删除</el-button> | ||
| 165 | + </template> | ||
| 166 | + </el-table-column> | ||
| 167 | + </el-table> | ||
| 168 | + | ||
| 169 | + <pagination | ||
| 170 | + v-show="total>0" | ||
| 171 | + :total="total" | ||
| 172 | + :page.sync="queryParams.pageNum" | ||
| 173 | + :limit.sync="queryParams.pageSize" | ||
| 174 | + @pagination="getList" | ||
| 175 | + /> | ||
| 176 | + | ||
| 177 | + <!-- 添加或修改【请填写功能名称】对话框 --> | ||
| 178 | + <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body> | ||
| 179 | + <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | ||
| 180 | + <el-form-item label="法务人姓名" prop="staffName"> | ||
| 181 | + <el-input v-model="form.staffName" placeholder="请输入法务人姓名" /> | ||
| 182 | + </el-form-item> | ||
| 183 | + <el-form-item label="年龄" prop="ages"> | ||
| 184 | + <el-input v-model="form.ages" placeholder="请输入年龄" /> | ||
| 185 | + </el-form-item> | ||
| 186 | + <el-form-item label="学历" prop="learningExperience"> | ||
| 187 | + <el-input v-model="form.learningExperience" placeholder="请输入学历" /> | ||
| 188 | + </el-form-item> | ||
| 189 | + <el-form-item label="职位" prop="job"> | ||
| 190 | + <el-input v-model="form.job" placeholder="请输入职位" /> | ||
| 191 | + </el-form-item> | ||
| 192 | + <el-form-item label="手机号" prop="phone"> | ||
| 193 | + <el-input v-model="form.phone" placeholder="请输入手机号" /> | ||
| 194 | + </el-form-item> | ||
| 195 | + <el-form-item label="邮箱" prop="email"> | ||
| 196 | + <el-input v-model="form.email" placeholder="请输入邮箱" /> | ||
| 197 | + </el-form-item> | ||
| 198 | + <el-form-item label="公司单位" prop="firmUnit"> | ||
| 199 | + <el-input v-model="form.firmUnit" placeholder="请输入公司单位" /> | ||
| 200 | + </el-form-item> | ||
| 201 | + <el-form-item label="工作经历" prop="workExperience"> | ||
| 202 | + <el-input v-model="form.workExperience" type="textarea" placeholder="请输入内容" /> | ||
| 203 | + </el-form-item> | ||
| 204 | + <el-form-item label="专业领域" prop="specialized"> | ||
| 205 | + <el-input v-model="form.specialized" placeholder="请输入专业领域" /> | ||
| 206 | + </el-form-item> | ||
| 207 | + <el-form-item label="资格证书" prop="qualifications"> | ||
| 208 | + <el-input v-model="form.qualifications" placeholder="请输入资格证书" /> | ||
| 209 | + </el-form-item> | ||
| 210 | + </el-form> | ||
| 211 | + <div slot="footer" class="dialog-footer"> | ||
| 212 | + <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||
| 213 | + <el-button @click="cancel">取 消</el-button> | ||
| 214 | + </div> | ||
| 215 | + </el-dialog> | ||
| 216 | + </div> | ||
| 217 | +</template> | ||
| 218 | + | ||
| 219 | +<script> | ||
| 220 | +import { listLegalStaff, getLegalStaff, delLegalStaff, addLegalStaff, updateLegalStaff } from "@/api/compliancemanagement/legalStaff"; | ||
| 221 | +import { getToken } from "@/utils/auth"; | ||
| 222 | +import VuePdf from 'vue-pdf'; | ||
| 223 | +export default { | ||
| 224 | + components: { | ||
| 225 | + VuePdf | ||
| 226 | + }, | ||
| 227 | + name: "LegalStaff", | ||
| 228 | + data() { | ||
| 229 | + return { | ||
| 230 | + // 按钮loading | ||
| 231 | + buttonLoading: false, | ||
| 232 | + // 遮罩层 | ||
| 233 | + loading: true, | ||
| 234 | + // 选中数组 | ||
| 235 | + ids: [], | ||
| 236 | + // 非单个禁用 | ||
| 237 | + single: true, | ||
| 238 | + // 非多个禁用 | ||
| 239 | + multiple: true, | ||
| 240 | + // 显示搜索条件 | ||
| 241 | + showSearch: true, | ||
| 242 | + // 总条数 | ||
| 243 | + total: 0, | ||
| 244 | + // 【请填写功能名称】表格数据 | ||
| 245 | + legalStaffList: [], | ||
| 246 | + // 弹出层标题 | ||
| 247 | + title: "", | ||
| 248 | + // 是否显示弹出层 | ||
| 249 | + open: false, | ||
| 250 | + // 查询参数 | ||
| 251 | + queryParams: { | ||
| 252 | + pageNum: 1, | ||
| 253 | + pageSize: 10, | ||
| 254 | + staffName: undefined, | ||
| 255 | + ages: undefined, | ||
| 256 | + learningExperience: undefined, | ||
| 257 | + job: undefined, | ||
| 258 | + phone: undefined, | ||
| 259 | + email: undefined, | ||
| 260 | + firmUnit: undefined, | ||
| 261 | + workExperience: undefined, | ||
| 262 | + specialized: undefined, | ||
| 263 | + qualifications: undefined, | ||
| 264 | + }, | ||
| 265 | + // 表单参数 | ||
| 266 | + form: {}, | ||
| 267 | + // 表单校验 | ||
| 268 | + rules: { | ||
| 269 | + id: [ | ||
| 270 | + { required: true, message: "不能为空", trigger: "blur" } | ||
| 271 | + ], | ||
| 272 | + staffName: [ | ||
| 273 | + { required: true, message: "法务人姓名不能为空", trigger: "blur" } | ||
| 274 | + ], | ||
| 275 | + ages: [ | ||
| 276 | + { required: true, message: "年龄不能为空", trigger: "blur" } | ||
| 277 | + ], | ||
| 278 | + learningExperience: [ | ||
| 279 | + { required: true, message: "学历不能为空", trigger: "blur" } | ||
| 280 | + ], | ||
| 281 | + job: [ | ||
| 282 | + { required: true, message: "职位不能为空", trigger: "blur" } | ||
| 283 | + ], | ||
| 284 | + phone: [ | ||
| 285 | + { required: true, message: "手机号不能为空", trigger: "blur" } | ||
| 286 | + ], | ||
| 287 | + email: [ | ||
| 288 | + { required: true, message: "邮箱不能为空", trigger: "blur" } | ||
| 289 | + ], | ||
| 290 | + firmUnit: [ | ||
| 291 | + { required: true, message: "公司单位不能为空", trigger: "blur" } | ||
| 292 | + ], | ||
| 293 | + workExperience: [ | ||
| 294 | + { required: true, message: "工作经历不能为空", trigger: "blur" } | ||
| 295 | + ], | ||
| 296 | + specialized: [ | ||
| 297 | + { required: true, message: "专业领域不能为空", trigger: "blur" } | ||
| 298 | + ], | ||
| 299 | + qualifications: [ | ||
| 300 | + { required: true, message: "资格证书不能为空", trigger: "blur" } | ||
| 301 | + ], | ||
| 302 | + } | ||
| 303 | + }; | ||
| 304 | + }, | ||
| 305 | + created() { | ||
| 306 | + this.getList(); | ||
| 307 | + }, | ||
| 308 | + methods: { | ||
| 309 | + /** 查询【请填写功能名称】列表 */ | ||
| 310 | + getList() { | ||
| 311 | + this.loading = true; | ||
| 312 | + listLegalStaff(this.queryParams).then(response => { | ||
| 313 | + this.legalStaffList = response.rows; | ||
| 314 | + this.total = response.total; | ||
| 315 | + this.loading = false; | ||
| 316 | + }); | ||
| 317 | + }, | ||
| 318 | + // 取消按钮 | ||
| 319 | + cancel() { | ||
| 320 | + this.open = false; | ||
| 321 | + this.reset(); | ||
| 322 | + }, | ||
| 323 | + // 表单重置 | ||
| 324 | + reset() { | ||
| 325 | + this.form = { | ||
| 326 | + id: undefined, | ||
| 327 | + staffName: undefined, | ||
| 328 | + ages: undefined, | ||
| 329 | + learningExperience: undefined, | ||
| 330 | + job: undefined, | ||
| 331 | + phone: undefined, | ||
| 332 | + email: undefined, | ||
| 333 | + firmUnit: undefined, | ||
| 334 | + workExperience: undefined, | ||
| 335 | + specialized: undefined, | ||
| 336 | + qualifications: undefined, | ||
| 337 | + createBy: undefined, | ||
| 338 | + createTime: undefined, | ||
| 339 | + updateBy: undefined, | ||
| 340 | + updateTime: undefined | ||
| 341 | + }; | ||
| 342 | + this.resetForm("form"); | ||
| 343 | + }, | ||
| 344 | + /** 搜索按钮操作 */ | ||
| 345 | + handleQuery() { | ||
| 346 | + this.queryParams.pageNum = 1; | ||
| 347 | + this.getList(); | ||
| 348 | + }, | ||
| 349 | + /** 重置按钮操作 */ | ||
| 350 | + resetQuery() { | ||
| 351 | + this.resetForm("queryForm"); | ||
| 352 | + this.handleQuery(); | ||
| 353 | + }, | ||
| 354 | + // 多选框选中数据 | ||
| 355 | + handleSelectionChange(selection) { | ||
| 356 | + this.ids = selection.map(item => item.id) | ||
| 357 | + this.single = selection.length!==1 | ||
| 358 | + this.multiple = !selection.length | ||
| 359 | + }, | ||
| 360 | + /** 新增按钮操作 */ | ||
| 361 | + handleAdd() { | ||
| 362 | + this.reset(); | ||
| 363 | + this.open = true; | ||
| 364 | + this.title = "添加"; | ||
| 365 | + }, | ||
| 366 | + /** 修改按钮操作 */ | ||
| 367 | + handleUpdate(row) { | ||
| 368 | + this.loading = true; | ||
| 369 | + this.reset(); | ||
| 370 | + const id = row.id || this.ids | ||
| 371 | + getLegalStaff(id).then(response => { | ||
| 372 | + this.loading = false; | ||
| 373 | + this.form = response.data; | ||
| 374 | + this.open = true; | ||
| 375 | + this.title = "修改"; | ||
| 376 | + }); | ||
| 377 | + }, | ||
| 378 | + /** 提交按钮 */ | ||
| 379 | + submitForm() { | ||
| 380 | + this.$refs["form"].validate(valid => { | ||
| 381 | + if (valid) { | ||
| 382 | + this.buttonLoading = true; | ||
| 383 | + if (this.form.id != null) { | ||
| 384 | + updateLegalStaff(this.form).then(response => { | ||
| 385 | + this.$modal.msgSuccess("修改成功"); | ||
| 386 | + this.open = false; | ||
| 387 | + | ||
| 388 | + this.getList(); | ||
| 389 | + }).finally(() => { | ||
| 390 | + this.buttonLoading = false; | ||
| 391 | + }); | ||
| 392 | + } else { | ||
| 393 | + addLegalStaff(this.form).then(response => { | ||
| 394 | + this.$modal.msgSuccess("新增成功"); | ||
| 395 | + this.open = false; | ||
| 396 | + | ||
| 397 | + this.getList(); | ||
| 398 | + }).finally(() => { | ||
| 399 | + this.buttonLoading = false; | ||
| 400 | + }); | ||
| 401 | + } | ||
| 402 | + } | ||
| 403 | + }); | ||
| 404 | + }, | ||
| 405 | + /** 删除按钮操作 */ | ||
| 406 | + handleDelete(row) { | ||
| 407 | + const ids = row.id || this.ids; | ||
| 408 | + this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?').then(() => { | ||
| 409 | + this.loading = true; | ||
| 410 | + return delLegalStaff(ids); | ||
| 411 | + }).then(() => { | ||
| 412 | + this.loading = false; | ||
| 413 | + this.getList(); | ||
| 414 | + this.$modal.msgSuccess("删除成功"); | ||
| 415 | + }).catch(() => { | ||
| 416 | + }).finally(() => { | ||
| 417 | + this.loading = false; | ||
| 418 | + }); | ||
| 419 | + }, | ||
| 420 | + /** 导出按钮操作 */ | ||
| 421 | + handleExport() { | ||
| 422 | + this.download('system/legalStaff/export', { | ||
| 423 | + ...this.queryParams | ||
| 424 | + }, `legalStaff_${new Date().getTime()}.xlsx`) | ||
| 425 | + } | ||
| 426 | + } | ||
| 427 | +}; | ||
| 428 | +</script> |
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||
| 4 | + <el-form-item label="律师事务所名称" prop="lawyerName"> | ||
| 5 | + <el-input | ||
| 6 | + v-model="queryParams.lawyerName" | ||
| 7 | + placeholder="请输入律师事务所名称" | ||
| 8 | + clearable | ||
| 9 | + @keyup.enter.native="handleQuery" | ||
| 10 | + /> | ||
| 11 | + </el-form-item> | ||
| 12 | + <el-form-item label="主办律师" prop="sponsorAttorney"> | ||
| 13 | + <el-input | ||
| 14 | + v-model="queryParams.sponsorAttorney" | ||
| 15 | + placeholder="请输入主办律师" | ||
| 16 | + clearable | ||
| 17 | + @keyup.enter.native="handleQuery" | ||
| 18 | + /> | ||
| 19 | + </el-form-item> | ||
| 20 | + <el-form-item> | ||
| 21 | + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 22 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 23 | + </el-form-item> | ||
| 24 | + </el-form> | ||
| 25 | + | ||
| 26 | + <el-row :gutter="10" class="mb8"> | ||
| 27 | + <el-col :span="1.5"> | ||
| 28 | + <el-button | ||
| 29 | + type="primary" | ||
| 30 | + plain | ||
| 31 | + icon="el-icon-plus" | ||
| 32 | + size="mini" | ||
| 33 | + @click="handleAdd" | ||
| 34 | + v-hasPermi="['system:outsideCounsel:add']" | ||
| 35 | + >新增</el-button> | ||
| 36 | + </el-col> | ||
| 37 | + <el-col :span="1.5"> | ||
| 38 | + <el-button | ||
| 39 | + type="success" | ||
| 40 | + plain | ||
| 41 | + icon="el-icon-edit" | ||
| 42 | + size="mini" | ||
| 43 | + :disabled="single" | ||
| 44 | + @click="handleUpdate" | ||
| 45 | + v-hasPermi="['system:outsideCounsel:edit']" | ||
| 46 | + >修改</el-button> | ||
| 47 | + </el-col> | ||
| 48 | + <el-col :span="1.5"> | ||
| 49 | + <el-button | ||
| 50 | + type="danger" | ||
| 51 | + plain | ||
| 52 | + icon="el-icon-delete" | ||
| 53 | + size="mini" | ||
| 54 | + :disabled="multiple" | ||
| 55 | + @click="handleDelete" | ||
| 56 | + v-hasPermi="['system:outsideCounsel:remove']" | ||
| 57 | + >删除</el-button> | ||
| 58 | + </el-col> | ||
| 59 | + <el-col :span="1.5"> | ||
| 60 | + <el-button | ||
| 61 | + type="warning" | ||
| 62 | + plain | ||
| 63 | + icon="el-icon-download" | ||
| 64 | + size="mini" | ||
| 65 | + @click="handleExport" | ||
| 66 | + v-hasPermi="['system:outsideCounsel:export']" | ||
| 67 | + >导出</el-button> | ||
| 68 | + </el-col> | ||
| 69 | + <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||
| 70 | + </el-row> | ||
| 71 | + | ||
| 72 | + <el-table v-loading="loading" :data="outsideCounselList" @selection-change="handleSelectionChange"> | ||
| 73 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 74 | + <el-table-column label="" align="center" prop="id" v-if="true"/> | ||
| 75 | + <el-table-column label="律师事务所名称" align="center" prop="lawyerName" /> | ||
| 76 | + <el-table-column label="常年/专项(诉讼、非诉)" align="center" prop="special" /> | ||
| 77 | + <el-table-column label="常年/专项(附件)" align="center" prop="specialAttachments"> | ||
| 78 | + <template slot-scope="scope"> | ||
| 79 | + <img v-if="scope.row.specialAttachments" src="@/assets/images/PDF.png" @click="openFile(scope.row.specialAttachments)" width="40px" height="auto" style="cursor: pointer"/> | ||
| 80 | + </template> | ||
| 81 | + </el-table-column> | ||
| 82 | + <el-table-column label="主办律师" align="center" prop="sponsorAttorney"/> | ||
| 83 | + <el-table-column label="协议服务期限" align="center" prop="term" /> | ||
| 84 | + <el-table-column label="协议费用(万元)" align="center" prop="agreementFees" /> | ||
| 85 | + <el-table-column label="费用支付期限" align="center" prop="paymentTerm" /> | ||
| 86 | + <el-table-column label="聘用企业公开选聘/协商" align="center" prop="openOrConsultations" /> | ||
| 87 | + <el-table-column label="简历附件" align="center" prop="oesumeAttachments"> | ||
| 88 | + <template slot-scope="scope"> | ||
| 89 | + <img v-if="scope.row.oesumeAttachments" src="@/assets/images/PDF.png" @click="openFilejl(scope.row.oesumeAttachments)" width="40px" height="auto" style="cursor: pointer"/> | ||
| 90 | + </template> | ||
| 91 | + </el-table-column> | ||
| 92 | + <el-table-column label="考核结果" align="center" prop="result" > | ||
| 93 | + <template slot-scope="scope"> | ||
| 94 | + <el-tag type="warning" v-if="scope.row.result === '未考核'">{{ scope.row.result }}</el-tag> | ||
| 95 | + <el-tag type="success" v-else-if="scope.row.result === '通过'">{{ scope.row.result }}</el-tag> | ||
| 96 | + <el-tag type="danger" v-else-if="scope.row.result === '未通过'">{{ scope.row.result }}</el-tag> | ||
| 97 | + <span v-else>{{ scope.row.result }}</span> | ||
| 98 | + </template> | ||
| 99 | + </el-table-column> | ||
| 100 | + <el-table-column label="备注" align="center" prop="notes" /> | ||
| 101 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||
| 102 | + <template slot-scope="scope"> | ||
| 103 | + <el-button | ||
| 104 | + size="mini" | ||
| 105 | + type="text" | ||
| 106 | + icon="el-icon-edit" | ||
| 107 | + @click="handleUpdate(scope.row)" | ||
| 108 | + v-hasPermi="['system:outsideCounsel:edit']" | ||
| 109 | + >修改</el-button> | ||
| 110 | + <el-button | ||
| 111 | + size="mini" | ||
| 112 | + type="text" | ||
| 113 | + icon="el-icon-delete" | ||
| 114 | + @click="handleDelete(scope.row)" | ||
| 115 | + v-hasPermi="['system:outsideCounsel:remove']" | ||
| 116 | + >删除</el-button> | ||
| 117 | + </template> | ||
| 118 | + </el-table-column> | ||
| 119 | + </el-table> | ||
| 120 | + | ||
| 121 | + <pagination | ||
| 122 | + v-show="total>0" | ||
| 123 | + :total="total" | ||
| 124 | + :page.sync="queryParams.pageNum" | ||
| 125 | + :limit.sync="queryParams.pageSize" | ||
| 126 | + @pagination="getList" | ||
| 127 | + /> | ||
| 128 | + <el-dialog title="合同预览" :visible.sync="dialogVisible" width="50%" center :before-close="handleClose" > | ||
| 129 | + <embed :src="currentFile" type="application/pdf" width="100%" height="800px" v-if="currentFile" | ||
| 130 | + /> | ||
| 131 | + </el-dialog> | ||
| 132 | + <el-dialog title="合同预览" :visible.sync="dialogVisiblejl" width="50%" center :before-close="handleClose" > | ||
| 133 | + <embed :src="currentFilejl" type="application/pdf" width="100%" height="800px" v-if="currentFilejl" | ||
| 134 | + /> | ||
| 135 | + </el-dialog> | ||
| 136 | + | ||
| 137 | + <!-- 添加或修改【请填写功能名称】对话框 --> | ||
| 138 | + <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> | ||
| 139 | + <el-form ref="form" :model="form" :rules="rules" label-width="200px"> | ||
| 140 | + <el-form-item label="律师事务所名称" prop="lawyerName"> | ||
| 141 | + <el-input v-model="form.lawyerName" placeholder="请输入律师事务所名称" /> | ||
| 142 | + </el-form-item> | ||
| 143 | + <el-form-item label="常年/专项(诉讼、非诉)" prop="special"> | ||
| 144 | + <el-select v-model="form.special" placeholder="请选择常年/专项(诉讼、非诉)"> | ||
| 145 | + <el-option label="常年" value="常年"></el-option> | ||
| 146 | + <el-option label="专项" value="专项"></el-option> | ||
| 147 | + </el-select> | ||
| 148 | + </el-form-item> | ||
| 149 | + <el-form-item v-if="form.special==='常年'" label="考核结果" prop="result"> | ||
| 150 | + <el-select v-model="form.result" placeholder="请选择考核结果"> | ||
| 151 | + <el-option label="未考核" value="未考核"></el-option> | ||
| 152 | + <el-option label="通过" value="通过"></el-option> | ||
| 153 | + <el-option label="未通过" value="未通过"></el-option> | ||
| 154 | + </el-select> | ||
| 155 | + </el-form-item> | ||
| 156 | + <el-form-item label="常年/专项(附件)" prop="specialAttachments"> | ||
| 157 | + <el-upload | ||
| 158 | + class="upload-demo" | ||
| 159 | + ref="upload" | ||
| 160 | + :accept="'application/pdf'" | ||
| 161 | + :before-upload="beforeUpload" | ||
| 162 | + :action="this.url" | ||
| 163 | + :headers="this.headers" | ||
| 164 | + :on-preview="handlePreview" | ||
| 165 | + :on-remove="handleRemove" | ||
| 166 | + :on-change="handleChange" | ||
| 167 | + :file-list="this.fileList" | ||
| 168 | + :auto-upload="false" | ||
| 169 | + :limit="1" | ||
| 170 | + :multiple="false" | ||
| 171 | + :on-success="handleSuccess" | ||
| 172 | + :before-remove="beforeRemove" | ||
| 173 | + :on-exceed="handleExceed" | ||
| 174 | + name="files" | ||
| 175 | + > | ||
| 176 | + <el-button slot="trigger" size="small" type="primary" | ||
| 177 | + >选取文件</el-button | ||
| 178 | + > | ||
| 179 | + <el-button | ||
| 180 | + style="margin-left: 10px" | ||
| 181 | + size="small" | ||
| 182 | + type="success" | ||
| 183 | + @click="submitUpload" | ||
| 184 | + >上传到服务器</el-button | ||
| 185 | + > | ||
| 186 | + <div slot="tip" class="el-upload__tip"> | ||
| 187 | + 只能上传大小不超过 5MB 的 PDF 文件 | ||
| 188 | + </div> | ||
| 189 | + </el-upload> | ||
| 190 | + </el-form-item> | ||
| 191 | + <el-form-item label="主办律师" prop="sponsorAttorney"> | ||
| 192 | + <el-input v-model="form.sponsorAttorney" placeholder="请输入主办律师" /> | ||
| 193 | + </el-form-item> | ||
| 194 | + <el-form-item label="协议服务期限" prop="term"> | ||
| 195 | + <el-input v-model="form.term" placeholder="请输入协议服务期限" /> | ||
| 196 | + </el-form-item> | ||
| 197 | + <el-form-item label="协议费用(万元)" prop="agreementFees"> | ||
| 198 | + <el-input v-model="form.agreementFees" placeholder="请输入协议费用" /> | ||
| 199 | + </el-form-item> | ||
| 200 | + <el-form-item label="费用支付期限" prop="paymentTerm"> | ||
| 201 | + <el-input v-model="form.paymentTerm" placeholder="请输入费用支付期限" /> | ||
| 202 | + </el-form-item> | ||
| 203 | + <el-form-item label="聘用企业公开选聘/协商" prop="openOrConsultations"> | ||
| 204 | + <el-input v-model="form.openOrConsultations" placeholder="请输入聘用企业公开选聘/协商" /> | ||
| 205 | + </el-form-item> | ||
| 206 | + <el-form-item label="简历附件" prop="oesumeAttachments"> | ||
| 207 | + <el-upload | ||
| 208 | + class="upload-demo" | ||
| 209 | + ref="uploadjl" | ||
| 210 | + :accept="'application/pdf'" | ||
| 211 | + :before-upload="beforeUpload" | ||
| 212 | + :action="this.url" | ||
| 213 | + :headers="this.headers" | ||
| 214 | + :on-preview="handlePreview" | ||
| 215 | + :on-remove="handleRemovejl" | ||
| 216 | + :on-change="handleChangejl" | ||
| 217 | + :file-list="this.filejianli" | ||
| 218 | + :auto-upload="false" | ||
| 219 | + :limit="1" | ||
| 220 | + :multiple="false" | ||
| 221 | + :on-success="handleSuccessjl" | ||
| 222 | + :before-remove="beforeRemovejl" | ||
| 223 | + :on-exceed="handleExceed" | ||
| 224 | + name="files" | ||
| 225 | + > | ||
| 226 | + <el-button slot="trigger" size="small" type="primary" | ||
| 227 | + >选取文件</el-button | ||
| 228 | + > | ||
| 229 | + <el-button | ||
| 230 | + style="margin-left: 10px" | ||
| 231 | + size="small" | ||
| 232 | + type="success" | ||
| 233 | + @click="submitUploadjl" | ||
| 234 | + >上传到服务器</el-button | ||
| 235 | + > | ||
| 236 | + <div slot="tip" class="el-upload__tip"> | ||
| 237 | + 只能上传大小不超过 5MB 的 PDF 文件 | ||
| 238 | + </div> | ||
| 239 | + </el-upload> | ||
| 240 | + </el-form-item> | ||
| 241 | + | ||
| 242 | + <el-form-item label="备注" prop="notes"> | ||
| 243 | + <el-input v-model="form.notes" placeholder="请输入备注" /> | ||
| 244 | + </el-form-item> | ||
| 245 | + </el-form> | ||
| 246 | + <div slot="footer" class="dialog-footer"> | ||
| 247 | + <el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button> | ||
| 248 | + <el-button @click="cancel">取 消</el-button> | ||
| 249 | + </div> | ||
| 250 | + </el-dialog> | ||
| 251 | + </div> | ||
| 252 | +</template> | ||
| 253 | + | ||
| 254 | +<script> | ||
| 255 | +import { listOutsideCounsel, getOutsideCounsel, delOutsideCounsel, addOutsideCounsel, updateOutsideCounsel } from "@/api/compliancemanagement/outsideCounsel"; | ||
| 256 | +import { getToken } from "@/utils/auth"; | ||
| 257 | +import VuePdf from 'vue-pdf'; | ||
| 258 | +export default { | ||
| 259 | + components: { | ||
| 260 | + VuePdf | ||
| 261 | + }, | ||
| 262 | + name: "OutsideCounsel", | ||
| 263 | + data() { | ||
| 264 | + return { | ||
| 265 | + currentFile: '', | ||
| 266 | + currentFilejl: '', | ||
| 267 | + // 设置上传的请求头部 | ||
| 268 | + headers: { Authorization: "Bearer " + getToken() }, | ||
| 269 | + // 上传的地址 | ||
| 270 | + url: process.env.VUE_APP_BASE_API + "/common/uploads", | ||
| 271 | + // urlhead: "http://joycart.zgftlm.com", | ||
| 272 | + urlhead:process.env.VUE_APP_BASE_API + "/", | ||
| 273 | + fileList:[], | ||
| 274 | + filejianli:[], | ||
| 275 | + dialogVisible: false, | ||
| 276 | + dialogVisiblejl: false, | ||
| 277 | + // 按钮loading | ||
| 278 | + buttonLoading: false, | ||
| 279 | + // 遮罩层 | ||
| 280 | + loading: true, | ||
| 281 | + // 选中数组 | ||
| 282 | + ids: [], | ||
| 283 | + // 非单个禁用 | ||
| 284 | + single: true, | ||
| 285 | + // 非多个禁用 | ||
| 286 | + multiple: true, | ||
| 287 | + // 显示搜索条件 | ||
| 288 | + showSearch: true, | ||
| 289 | + // 总条数 | ||
| 290 | + total: 0, | ||
| 291 | + // 【请填写功能名称】表格数据 | ||
| 292 | + outsideCounselList: [], | ||
| 293 | + // 弹出层标题 | ||
| 294 | + title: "", | ||
| 295 | + // 是否显示弹出层 | ||
| 296 | + open: false, | ||
| 297 | + // 查询参数 | ||
| 298 | + queryParams: { | ||
| 299 | + pageNum: 1, | ||
| 300 | + pageSize: 10, | ||
| 301 | + lawyerName: undefined, | ||
| 302 | + sponsorAttorney: undefined, | ||
| 303 | + term: undefined, | ||
| 304 | + agreementFees: undefined, | ||
| 305 | + paymentTerm: undefined, | ||
| 306 | + openOrConsultations: undefined, | ||
| 307 | + notes: undefined, | ||
| 308 | + }, | ||
| 309 | + // 表单参数 | ||
| 310 | + form: {}, | ||
| 311 | + // 表单校验 | ||
| 312 | + rules: { | ||
| 313 | + id: [ | ||
| 314 | + { required: true, message: "不能为空", trigger: "blur" } | ||
| 315 | + ], | ||
| 316 | + lawyerName: [ | ||
| 317 | + { required: true, message: "律师事务所名称不能为空", trigger: "blur" } | ||
| 318 | + ], | ||
| 319 | + special: [ | ||
| 320 | + { required: true, message: "常年/专项(诉讼、非诉)不能为空", trigger: "blur" } | ||
| 321 | + ], | ||
| 322 | + specialAttachments: [ | ||
| 323 | + { required: true, message: "常年/专项(附件)不能为空", trigger: "blur" } | ||
| 324 | + ], | ||
| 325 | + sponsorAttorney: [ | ||
| 326 | + { required: true, message: "主办律师不能为空", trigger: "blur" } | ||
| 327 | + ], | ||
| 328 | + | ||
| 329 | + term: [ | ||
| 330 | + { required: true, message: "协议服务期限不能为空", trigger: "blur" } | ||
| 331 | + ], | ||
| 332 | + agreementFees: [ | ||
| 333 | + { required: true, message: "协议费用不能为空", trigger: "blur" } | ||
| 334 | + ], | ||
| 335 | + paymentTerm: [ | ||
| 336 | + { required: true, message: "费用支付期限不能为空", trigger: "blur" } | ||
| 337 | + ], | ||
| 338 | + openOrConsultations: [ | ||
| 339 | + { required: true, message: "聘用企业公开选聘/协商不能为空", trigger: "blur" } | ||
| 340 | + ], | ||
| 341 | + oesumeAttachments: [ | ||
| 342 | + { required: true, message: "简历附件不能为空", trigger: "blur" } | ||
| 343 | + ], | ||
| 344 | + result: [ | ||
| 345 | + { required: true, message: "考核结果不能为空", trigger: "blur" } | ||
| 346 | + ], | ||
| 347 | + // notes: [ | ||
| 348 | + // { required: true, message: "备注不能为空", trigger: "blur" } | ||
| 349 | + // ], | ||
| 350 | + } | ||
| 351 | + }; | ||
| 352 | + }, | ||
| 353 | + created() { | ||
| 354 | + this.getList(); | ||
| 355 | + }, | ||
| 356 | + methods: { | ||
| 357 | + handleClose() { | ||
| 358 | + this.currentFile = ""; | ||
| 359 | + this.dialogVisible = false; | ||
| 360 | + this.currentFilejl = ""; | ||
| 361 | + this.dialogVisiblejl = false; | ||
| 362 | + }, | ||
| 363 | + openFile(filePath) { | ||
| 364 | + | ||
| 365 | + this.currentFile = this.urlhead+filePath; | ||
| 366 | + console.log(this.currentFile) | ||
| 367 | + this.dialogVisible = true; | ||
| 368 | + | ||
| 369 | + }, | ||
| 370 | + openFilejl(filePath) { | ||
| 371 | + | ||
| 372 | + this.currentFilejl = this.urlhead+filePath; | ||
| 373 | + console.log(this.currentFile) | ||
| 374 | + this.dialogVisiblejl = true; | ||
| 375 | + | ||
| 376 | + }, | ||
| 377 | + beforeUpload(file) { | ||
| 378 | + const isPDF = file.type === 'application/pdf'; | ||
| 379 | + const isLt5M = file.size / 1024 / 1024 < 5; | ||
| 380 | + | ||
| 381 | + if (!isPDF) { | ||
| 382 | + this.$message.error('只能上传 PDF 文件'); | ||
| 383 | + return false; | ||
| 384 | + } | ||
| 385 | + if (!isLt5M) { | ||
| 386 | + this.$message.error('上传文件大小不能超过 5MB'); | ||
| 387 | + return false; | ||
| 388 | + } | ||
| 389 | + | ||
| 390 | + // 如果需要其他处理,可以在这里添加 | ||
| 391 | + | ||
| 392 | + return true; // 返回 true 允许上传 | ||
| 393 | + }, | ||
| 394 | + handleChange(file, fileList) { | ||
| 395 | + this.fileList = fileList; | ||
| 396 | + }, | ||
| 397 | + handleChangejl(file, fileList) { | ||
| 398 | + this.filejianli = fileList; | ||
| 399 | + }, | ||
| 400 | + handleSuccess(response, file, fileList) { | ||
| 401 | + // response 是上传成功后的响应数据 | ||
| 402 | + // 可以从中获取文件地址或文件名 | ||
| 403 | + // 假设后端返回的数据结构中有一个字段 url 表示文件地址 | ||
| 404 | + const fileUrl = response.data.fileNames; | ||
| 405 | + // 将文件地址或文件名赋值给表单的字段 | ||
| 406 | + this.form.specialAttachments =fileUrl; | ||
| 407 | + }, | ||
| 408 | + handleSuccessjl(response, file, fileList) { | ||
| 409 | + // response 是上传成功后的响应数据 | ||
| 410 | + // 可以从中获取文件地址或文件名 | ||
| 411 | + // 假设后端返回的数据结构中有一个字段 url 表示文件地址 | ||
| 412 | + const fileUrl = response.data.fileNames; | ||
| 413 | + // 将文件地址或文件名赋值给表单的字段 | ||
| 414 | + this.form.oesumeAttachments =fileUrl; | ||
| 415 | + }, | ||
| 416 | + handleRemove(file, fileList) { | ||
| 417 | + this.form.specialAttachments='' | ||
| 418 | + console.log(file, fileList); | ||
| 419 | + }, | ||
| 420 | + handleRemovejl(file, fileList) { | ||
| 421 | + this.form.oesumeAttachments='' | ||
| 422 | + console.log(file, fileList); | ||
| 423 | + }, | ||
| 424 | + handlePreview(file) { | ||
| 425 | + console.log(file); | ||
| 426 | + }, | ||
| 427 | + handleExceed(files, fileList) { | ||
| 428 | + this.$message.warning( | ||
| 429 | + `当前限制上传 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${ | ||
| 430 | + files.length + fileList.length | ||
| 431 | + } 个文件` | ||
| 432 | + ); | ||
| 433 | + }, | ||
| 434 | + beforeRemove(file, fileList) { | ||
| 435 | + this.fileList = fileList; | ||
| 436 | + if (file && file.status==="success") { | ||
| 437 | + return this.$confirm(`确定移除 ${file.name}?`); | ||
| 438 | + } | ||
| 439 | + }, | ||
| 440 | + beforeRemovejl(file, fileList) { | ||
| 441 | + this.filejianli = fileList; | ||
| 442 | + if (file && file.status==="success") { | ||
| 443 | + return this.$confirm(`确定移除 ${file.name}?`); | ||
| 444 | + } | ||
| 445 | + }, | ||
| 446 | + submitUpload() { | ||
| 447 | + // 手动触发上传操作 | ||
| 448 | + // this.$refs.upload.submit() | ||
| 449 | + // 构建 FormData 对象 | ||
| 450 | + this.$refs.upload.submit() | ||
| 451 | + }, | ||
| 452 | + submitUploadjl() { | ||
| 453 | + // 手动触发上传操作 | ||
| 454 | + // this.$refs.upload.submit() | ||
| 455 | + // 构建 FormData 对象 | ||
| 456 | + this.$refs.uploadjl.submit() | ||
| 457 | + }, | ||
| 458 | + /** 查询【请填写功能名称】列表 */ | ||
| 459 | + getList() { | ||
| 460 | + this.loading = true; | ||
| 461 | + listOutsideCounsel(this.queryParams).then(response => { | ||
| 462 | + this.outsideCounselList = response.rows; | ||
| 463 | + this.total = response.total; | ||
| 464 | + this.loading = false; | ||
| 465 | + }); | ||
| 466 | + }, | ||
| 467 | + // 取消按钮 | ||
| 468 | + cancel() { | ||
| 469 | + this.open = false; | ||
| 470 | + this.fileList=[] | ||
| 471 | + this.filejianli=[] | ||
| 472 | + this.reset(); | ||
| 473 | + }, | ||
| 474 | + // 表单重置 | ||
| 475 | + reset() { | ||
| 476 | + this.form = { | ||
| 477 | + id: undefined, | ||
| 478 | + lawyerName: undefined, | ||
| 479 | + special: undefined, | ||
| 480 | + specialAttachments: undefined, | ||
| 481 | + sponsorAttorney: undefined, | ||
| 482 | + term: undefined, | ||
| 483 | + agreementFees: undefined, | ||
| 484 | + paymentTerm: undefined, | ||
| 485 | + openOrConsultations: undefined, | ||
| 486 | + oesumeAttachments: undefined, | ||
| 487 | + result: undefined, | ||
| 488 | + notes: undefined, | ||
| 489 | + createBy: undefined, | ||
| 490 | + createTime: undefined, | ||
| 491 | + updateBy: undefined, | ||
| 492 | + updateTime: undefined | ||
| 493 | + }; | ||
| 494 | + this.resetForm("form"); | ||
| 495 | + }, | ||
| 496 | + /** 搜索按钮操作 */ | ||
| 497 | + handleQuery() { | ||
| 498 | + this.queryParams.pageNum = 1; | ||
| 499 | + this.getList(); | ||
| 500 | + }, | ||
| 501 | + /** 重置按钮操作 */ | ||
| 502 | + resetQuery() { | ||
| 503 | + this.resetForm("queryForm"); | ||
| 504 | + this.handleQuery(); | ||
| 505 | + }, | ||
| 506 | + // 多选框选中数据 | ||
| 507 | + handleSelectionChange(selection) { | ||
| 508 | + this.ids = selection.map(item => item.id) | ||
| 509 | + this.single = selection.length!==1 | ||
| 510 | + this.multiple = !selection.length | ||
| 511 | + }, | ||
| 512 | + /** 新增按钮操作 */ | ||
| 513 | + handleAdd() { | ||
| 514 | + this.reset(); | ||
| 515 | + this.open = true; | ||
| 516 | + this.title = "添加"; | ||
| 517 | + }, | ||
| 518 | + /** 修改按钮操作 */ | ||
| 519 | + handleUpdate(row) { | ||
| 520 | + this.loading = true; | ||
| 521 | + this.reset(); | ||
| 522 | + const id = row.id || this.ids | ||
| 523 | + getOutsideCounsel(id).then(response => { | ||
| 524 | + this.loading = false; | ||
| 525 | + this.form = response.data; | ||
| 526 | + if(this.form.result==='/'){ | ||
| 527 | + this.form.result='' | ||
| 528 | + } | ||
| 529 | + this.open = true; | ||
| 530 | + this.title = "修改"; | ||
| 531 | + }); | ||
| 532 | + }, | ||
| 533 | + /** 提交按钮 */ | ||
| 534 | + submitForm() { | ||
| 535 | + this.$refs["form"].validate(valid => { | ||
| 536 | + if (valid) { | ||
| 537 | + if(this.form.special==='专项'){ | ||
| 538 | + this.form.result="/" | ||
| 539 | + } | ||
| 540 | + this.buttonLoading = true; | ||
| 541 | + if (this.form.id != null) { | ||
| 542 | + updateOutsideCounsel(this.form).then(response => { | ||
| 543 | + this.$modal.msgSuccess("修改成功"); | ||
| 544 | + this.open = false; | ||
| 545 | + this.fileList=[] | ||
| 546 | + this.filejianli=[] | ||
| 547 | + this.getList(); | ||
| 548 | + }).finally(() => { | ||
| 549 | + this.buttonLoading = false; | ||
| 550 | + }); | ||
| 551 | + } else { | ||
| 552 | + addOutsideCounsel(this.form).then(response => { | ||
| 553 | + this.$modal.msgSuccess("新增成功"); | ||
| 554 | + this.open = false; | ||
| 555 | + this.fileList=[] | ||
| 556 | + this.filejianli=[] | ||
| 557 | + this.getList(); | ||
| 558 | + }).finally(() => { | ||
| 559 | + this.buttonLoading = false; | ||
| 560 | + }); | ||
| 561 | + } | ||
| 562 | + } | ||
| 563 | + }); | ||
| 564 | + }, | ||
| 565 | + /** 删除按钮操作 */ | ||
| 566 | + handleDelete(row) { | ||
| 567 | + const ids = row.id || this.ids; | ||
| 568 | + this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?').then(() => { | ||
| 569 | + this.loading = true; | ||
| 570 | + return delOutsideCounsel(ids); | ||
| 571 | + }).then(() => { | ||
| 572 | + this.loading = false; | ||
| 573 | + this.getList(); | ||
| 574 | + this.$modal.msgSuccess("删除成功"); | ||
| 575 | + }).catch(() => { | ||
| 576 | + }).finally(() => { | ||
| 577 | + this.loading = false; | ||
| 578 | + }); | ||
| 579 | + }, | ||
| 580 | + /** 导出按钮操作 */ | ||
| 581 | + handleExport() { | ||
| 582 | + this.download('system/outsideCounsel/export', { | ||
| 583 | + ...this.queryParams | ||
| 584 | + }, `outsideCounsel_${new Date().getTime()}.xlsx`) | ||
| 585 | + } | ||
| 586 | + } | ||
| 587 | +}; | ||
| 588 | +</script> |
-
请 注册 或 登录 后发表评论