正在显示
8 个修改的文件
包含
810 行增加
和
279 行删除
| @@ -63,6 +63,15 @@ export function queryResult(params) { | @@ -63,6 +63,15 @@ export function queryResult(params) { | ||
| 63 | }) | 63 | }) |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | +// 查询作废备注 | ||
| 67 | +export function queryDefeatContent(params) { | ||
| 68 | + return request({ | ||
| 69 | + url: '/registration/monitor/getComment', | ||
| 70 | + method: 'get', | ||
| 71 | + params | ||
| 72 | + }) | ||
| 73 | +} | ||
| 74 | + | ||
| 66 | // 获取待办任务 | 75 | // 获取待办任务 |
| 67 | export function queryMyList(params) { | 76 | export function queryMyList(params) { |
| 68 | return request({ | 77 | return request({ |
| @@ -84,7 +93,7 @@ export function disposeUser(data, taskId) { | @@ -84,7 +93,7 @@ export function disposeUser(data, taskId) { | ||
| 84 | // 转办 | 93 | // 转办 |
| 85 | export function transfer(data, taskId) { | 94 | export function transfer(data, taskId) { |
| 86 | return request({ | 95 | return request({ |
| 87 | - url: `/registratiom/transferTask/${taskId}`, | 96 | + url: `/registration/transferTask/${taskId}`, |
| 88 | method: 'post', | 97 | method: 'post', |
| 89 | data | 98 | data |
| 90 | }) | 99 | }) |
| @@ -107,3 +116,10 @@ export function getUserList() { | @@ -107,3 +116,10 @@ export function getUserList() { | ||
| 107 | }) | 116 | }) |
| 108 | } | 117 | } |
| 109 | 118 | ||
| 119 | +// 根据ID查车辆登记详情 | ||
| 120 | +export function getCarDetail(id) { | ||
| 121 | + return request({ | ||
| 122 | + url: `registration/${id}`, | ||
| 123 | + method: 'get' | ||
| 124 | + }) | ||
| 125 | +} |
| @@ -44,12 +44,7 @@ | @@ -44,12 +44,7 @@ | ||
| 44 | </el-form> | 44 | </el-form> |
| 45 | 45 | ||
| 46 | <!-- 表格数据 --> | 46 | <!-- 表格数据 --> |
| 47 | - <el-table | ||
| 48 | - v-loading="loading" | ||
| 49 | - :data="policyList" | ||
| 50 | - @selection-change="handleSelectionChange" | ||
| 51 | - @row-click="handleUpdate" | ||
| 52 | - > | 47 | + <el-table v-loading="loading" :data="policyList" @row-click="handleUpdate"> |
| 53 | <el-table-column type="selection" width="55" align="center" /> | 48 | <el-table-column type="selection" width="55" align="center" /> |
| 54 | <el-table-column | 49 | <el-table-column |
| 55 | label="序号" | 50 | label="序号" |
| @@ -60,16 +55,16 @@ | @@ -60,16 +55,16 @@ | ||
| 60 | <el-table-column | 55 | <el-table-column |
| 61 | label="登记时间" | 56 | label="登记时间" |
| 62 | prop="createTime" | 57 | prop="createTime" |
| 63 | - width="150" | 58 | + width="160" |
| 64 | align="center" | 59 | align="center" |
| 65 | /> | 60 | /> |
| 66 | <el-table-column | 61 | <el-table-column |
| 67 | label="车牌号" | 62 | label="车牌号" |
| 68 | - prop="carNum" | 63 | + prop="licensePlateNumber" |
| 69 | width="150" | 64 | width="150" |
| 70 | align="center" | 65 | align="center" |
| 71 | /> | 66 | /> |
| 72 | - <el-table-column label="车架号" prop="frameNum" align="center" /> | 67 | + <el-table-column label="车架号" prop="frameNumber" align="center" /> |
| 73 | <el-table-column | 68 | <el-table-column |
| 74 | label="车主姓名" | 69 | label="车主姓名" |
| 75 | prop="name" | 70 | prop="name" |
| @@ -85,13 +80,13 @@ | @@ -85,13 +80,13 @@ | ||
| 85 | <el-table-column | 80 | <el-table-column |
| 86 | label="操作时间" | 81 | label="操作时间" |
| 87 | align="center" | 82 | align="center" |
| 88 | - prop="authTime" | ||
| 89 | - width="150" | 83 | + prop="distributionTime" |
| 84 | + width="160" | ||
| 90 | /> | 85 | /> |
| 91 | <el-table-column | 86 | <el-table-column |
| 92 | label="操作人员" | 87 | label="操作人员" |
| 93 | align="center" | 88 | align="center" |
| 94 | - prop="editAuth" | 89 | + prop="associationEmployeeUserName" |
| 95 | width="120" | 90 | width="120" |
| 96 | /> | 91 | /> |
| 97 | <el-table-column label="作废备注" fixed="right" width="120" prop="remark"> | 92 | <el-table-column label="作废备注" fixed="right" width="120" prop="remark"> |
| @@ -113,18 +108,18 @@ | @@ -113,18 +108,18 @@ | ||
| 113 | <el-form :model="form" ref="policyRef" label-width="100px"> | 108 | <el-form :model="form" ref="policyRef" label-width="100px"> |
| 114 | <el-row> | 109 | <el-row> |
| 115 | <el-col :span="12"> | 110 | <el-col :span="12"> |
| 116 | - <el-form-item label="车牌号" prop="carNum"> | 111 | + <el-form-item label="车牌号" prop="licensePlateNumber"> |
| 117 | <el-input | 112 | <el-input |
| 118 | - v-model="form.carNum" | 113 | + v-model="form.licensePlateNumber" |
| 119 | placeholder="请输入车牌号" | 114 | placeholder="请输入车牌号" |
| 120 | disabled | 115 | disabled |
| 121 | /> | 116 | /> |
| 122 | </el-form-item> | 117 | </el-form-item> |
| 123 | </el-col> | 118 | </el-col> |
| 124 | <el-col :span="12"> | 119 | <el-col :span="12"> |
| 125 | - <el-form-item label="车架号" prop="frameNum"> | 120 | + <el-form-item label="车架号" prop="frameNumber"> |
| 126 | <el-input | 121 | <el-input |
| 127 | - v-model="form.frameNum" | 122 | + v-model="form.frameNumber" |
| 128 | disabled | 123 | disabled |
| 129 | placeholder="请输入车架号" | 124 | placeholder="请输入车架号" |
| 130 | /> | 125 | /> |
| @@ -153,18 +148,18 @@ | @@ -153,18 +148,18 @@ | ||
| 153 | </el-row> | 148 | </el-row> |
| 154 | <el-row> | 149 | <el-row> |
| 155 | <el-col :span="12"> | 150 | <el-col :span="12"> |
| 156 | - <el-form-item label="操作时间" prop="authTime"> | 151 | + <el-form-item label="操作时间" prop="distributionTime"> |
| 157 | <el-input | 152 | <el-input |
| 158 | - v-model="form.authTime" | 153 | + v-model="form.distributionTime" |
| 159 | disabled | 154 | disabled |
| 160 | placeholder="请输入操作时间" | 155 | placeholder="请输入操作时间" |
| 161 | /> | 156 | /> |
| 162 | </el-form-item> | 157 | </el-form-item> |
| 163 | </el-col> | 158 | </el-col> |
| 164 | <el-col :span="12"> | 159 | <el-col :span="12"> |
| 165 | - <el-form-item label="操作人员" prop="editAuth"> | 160 | + <el-form-item label="操作人员" prop="associationEmployeeUserName"> |
| 166 | <el-input | 161 | <el-input |
| 167 | - v-model="form.editAuth" | 162 | + v-model="form.associationEmployeeUserName" |
| 168 | disabled | 163 | disabled |
| 169 | placeholder="请输入操作人员" | 164 | placeholder="请输入操作人员" |
| 170 | /> | 165 | /> |
| @@ -197,7 +192,7 @@ | @@ -197,7 +192,7 @@ | ||
| 197 | </template> | 192 | </template> |
| 198 | 193 | ||
| 199 | <script setup> | 194 | <script setup> |
| 200 | -import { queryDeprecatedList } from "@/api/policy"; | 195 | +import { queryDeprecatedList, queryDefeatContent } from "@/api/policy"; |
| 201 | const { proxy } = getCurrentInstance(); | 196 | const { proxy } = getCurrentInstance(); |
| 202 | const loading = ref(false); | 197 | const loading = ref(false); |
| 203 | const total = ref(5); | 198 | const total = ref(5); |
| @@ -214,25 +209,21 @@ const queryParams = reactive({ | @@ -214,25 +209,21 @@ const queryParams = reactive({ | ||
| 214 | 209 | ||
| 215 | const policyList = ref([]); | 210 | const policyList = ref([]); |
| 216 | 211 | ||
| 217 | -/** 多选框选中数据 */ | ||
| 218 | -function handleSelectionChange(selection) { | ||
| 219 | - // ids.value = selection.map(item => item.roleId); | ||
| 220 | - // single.value = selection.length != 1; | ||
| 221 | - // multiple.value = !selection.length; | ||
| 222 | - console.log(selection); | ||
| 223 | -} | ||
| 224 | - | ||
| 225 | /** 重置操作表单 */ | 212 | /** 重置操作表单 */ |
| 226 | function reset() { | 213 | function reset() { |
| 227 | proxy.resetForm("policyRef"); | 214 | proxy.resetForm("policyRef"); |
| 228 | } | 215 | } |
| 229 | 216 | ||
| 230 | /** 修改按钮操作 */ | 217 | /** 修改按钮操作 */ |
| 231 | -function handleUpdate(row) { | 218 | +const handleUpdate = async (row) => { |
| 232 | reset(); | 219 | reset(); |
| 233 | form.value = row; | 220 | form.value = row; |
| 221 | + const { data } = await queryDefeatContent({ | ||
| 222 | + processInstanceId: row.processInstanceId, | ||
| 223 | + }); | ||
| 224 | + form.value.deprecatedReason = data.message; | ||
| 234 | open.value = true; | 225 | open.value = true; |
| 235 | -} | 226 | +}; |
| 236 | const getList = async () => { | 227 | const getList = async () => { |
| 237 | loading.value = true; | 228 | loading.value = true; |
| 238 | const res = await queryDeprecatedList(queryParams); | 229 | const res = await queryDeprecatedList(queryParams); |
| @@ -59,12 +59,7 @@ | @@ -59,12 +59,7 @@ | ||
| 59 | </el-form> | 59 | </el-form> |
| 60 | 60 | ||
| 61 | <!-- 表格数据 --> | 61 | <!-- 表格数据 --> |
| 62 | - <el-table | ||
| 63 | - v-loading="loading" | ||
| 64 | - :data="policyList" | ||
| 65 | - @selection-change="handleSelectionChange" | ||
| 66 | - @row-click="handleUpdate" | ||
| 67 | - > | 62 | + <el-table v-loading="loading" :data="policyList"> |
| 68 | <el-table-column label="登记时间" width="160" align="center"> | 63 | <el-table-column label="登记时间" width="160" align="center"> |
| 69 | <template #default="{ row }"> | 64 | <template #default="{ row }"> |
| 70 | <span>{{ row.initialRegistration || row.createTime }}</span> | 65 | <span>{{ row.initialRegistration || row.createTime }}</span> |
| @@ -87,13 +82,7 @@ | @@ -87,13 +82,7 @@ | ||
| 87 | }}</span> | 82 | }}</span> |
| 88 | </template> | 83 | </template> |
| 89 | </el-table-column> | 84 | </el-table-column> |
| 90 | - <el-table-column label="操作时间" width="170"> | ||
| 91 | - <template #default="{ row }"> | ||
| 92 | - <span>{{ | ||
| 93 | - row.companyEmployeeUndertakeTime || row.distributionTime | ||
| 94 | - }}</span> | ||
| 95 | - </template> | ||
| 96 | - </el-table-column> | 85 | + <el-table-column label="操作时间" prop="policyTime" width="160" /> |
| 97 | <el-table-column | 86 | <el-table-column |
| 98 | label="办理人" | 87 | label="办理人" |
| 99 | prop="companyEmployeeUserName" | 88 | prop="companyEmployeeUserName" |
| @@ -115,8 +104,8 @@ | @@ -115,8 +104,8 @@ | ||
| 115 | show-overflow-tooltip | 104 | show-overflow-tooltip |
| 116 | prop="Feedback" | 105 | prop="Feedback" |
| 117 | > | 106 | > |
| 118 | - <template #default> | ||
| 119 | - <el-button type="primary">查阅</el-button> | 107 | + <template #default="{ row }"> |
| 108 | + <el-button type="primary" @click="lookRemark(row)">查阅</el-button> | ||
| 120 | </template> | 109 | </template> |
| 121 | </el-table-column> | 110 | </el-table-column> |
| 122 | </el-table> | 111 | </el-table> |
| @@ -128,7 +117,7 @@ | @@ -128,7 +117,7 @@ | ||
| 128 | v-model:limit="queryParams.pageSize" | 117 | v-model:limit="queryParams.pageSize" |
| 129 | @pagination="getList" | 118 | @pagination="getList" |
| 130 | /> | 119 | /> |
| 131 | - | 120 | + <!-- 查看回馈弹出框 --> |
| 132 | <el-dialog v-model="open" title="保单信息" width="700" append-to-body> | 121 | <el-dialog v-model="open" title="保单信息" width="700" append-to-body> |
| 133 | <el-form :model="form" ref="policyRef" label-width="100px"> | 122 | <el-form :model="form" ref="policyRef" label-width="100px"> |
| 134 | <el-row> | 123 | <el-row> |
| @@ -266,7 +255,7 @@ | @@ -266,7 +255,7 @@ | ||
| 266 | <el-input | 255 | <el-input |
| 267 | v-model="form.policyNumber" | 256 | v-model="form.policyNumber" |
| 268 | :disabled="hasRole" | 257 | :disabled="hasRole" |
| 269 | - placeholder="请输入办理人" | 258 | + placeholder="请输入承保单号" |
| 270 | /> | 259 | /> |
| 271 | </el-form-item> | 260 | </el-form-item> |
| 272 | </el-col> | 261 | </el-col> |
| @@ -331,8 +320,8 @@ function reset() { | @@ -331,8 +320,8 @@ function reset() { | ||
| 331 | proxy.resetForm("policyRef"); | 320 | proxy.resetForm("policyRef"); |
| 332 | } | 321 | } |
| 333 | 322 | ||
| 334 | -/** 修改按钮操作 */ | ||
| 335 | -function handleUpdate(row) { | 323 | +/**查看保单回馈 */ |
| 324 | +function lookRemark(row) { | ||
| 336 | reset(); | 325 | reset(); |
| 337 | queryResult({ processInstanceId: row.processInstanceId }).then((res) => { | 326 | queryResult({ processInstanceId: row.processInstanceId }).then((res) => { |
| 338 | form.value = row; | 327 | form.value = row; |
| @@ -6,8 +6,8 @@ | @@ -6,8 +6,8 @@ | ||
| 6 | <el-table-column label="序号" width="55" type="index" /> | 6 | <el-table-column label="序号" width="55" type="index" /> |
| 7 | <el-table-column | 7 | <el-table-column |
| 8 | label="登记时间" | 8 | label="登记时间" |
| 9 | - prop="initialRegistrationTime" | ||
| 10 | - width="150" | 9 | + prop="createTime" |
| 10 | + width="160" | ||
| 11 | align="center" | 11 | align="center" |
| 12 | /> | 12 | /> |
| 13 | <el-table-column | 13 | <el-table-column |
| @@ -16,7 +16,12 @@ | @@ -16,7 +16,12 @@ | ||
| 16 | width="150" | 16 | width="150" |
| 17 | align="center" | 17 | align="center" |
| 18 | /> | 18 | /> |
| 19 | - <el-table-column label="车架号" prop="frameNumber" align="center" /> | 19 | + <el-table-column |
| 20 | + label="车架号" | ||
| 21 | + width="250" | ||
| 22 | + prop="frameNumber" | ||
| 23 | + align="center" | ||
| 24 | + /> | ||
| 20 | <el-table-column | 25 | <el-table-column |
| 21 | label="车主姓名" | 26 | label="车主姓名" |
| 22 | prop="name" | 27 | prop="name" |
| @@ -388,7 +393,7 @@ function handleUpdate(row) { | @@ -388,7 +393,7 @@ function handleUpdate(row) { | ||
| 388 | function submitForm() { | 393 | function submitForm() { |
| 389 | const data = { | 394 | const data = { |
| 390 | associationapprove: companyForm.value.associationapprove, | 395 | associationapprove: companyForm.value.associationapprove, |
| 391 | - deptId: companyForm.value.deptId, | 396 | + deptId: companyForm.value.deptId.toString(), |
| 392 | }; | 397 | }; |
| 393 | const taskId = companyForm.value.taskId; | 398 | const taskId = companyForm.value.taskId; |
| 394 | disposeUser(data, taskId).then((res) => { | 399 | disposeUser(data, taskId).then((res) => { |
| 1 | <template> | 1 | <template> |
| 2 | <div class="app-container"> | 2 | <div class="app-container"> |
| 3 | <!-- 表格数据 --> | 3 | <!-- 表格数据 --> |
| 4 | - <el-table v-loading="loading" :data="policyList" @row-click="handleUpdate"> | ||
| 5 | - <el-table-column type="selection" width="55" align="center" /> | 4 | + <el-table v-loading="loading" :data="policyList"> |
| 6 | <el-table-column label="序号" width="55" type="index" /> | 5 | <el-table-column label="序号" width="55" type="index" /> |
| 7 | <el-table-column label="登记时间" width="160" align="center"> | 6 | <el-table-column label="登记时间" width="160" align="center"> |
| 8 | <template #default="{ row }"> | 7 | <template #default="{ row }"> |
| @@ -67,15 +66,22 @@ | @@ -67,15 +66,22 @@ | ||
| 67 | /> | 66 | /> |
| 68 | <el-table-column | 67 | <el-table-column |
| 69 | v-show="hasCompanyadmin" | 68 | v-show="hasCompanyadmin" |
| 70 | - label="承接人" | 69 | + label="分配人" |
| 71 | prop="associationEmployeeUserName" | 70 | prop="associationEmployeeUserName" |
| 72 | width="150" | 71 | width="150" |
| 73 | align="center" | 72 | align="center" |
| 74 | /> | 73 | /> |
| 75 | <el-table-column | 74 | <el-table-column |
| 75 | + v-show="hasCompanyadmin" | ||
| 76 | + label="承接人" | ||
| 77 | + prop="companyEmployeeUserName" | ||
| 78 | + width="150" | ||
| 79 | + align="center" | ||
| 80 | + /> | ||
| 81 | + <el-table-column | ||
| 76 | label="操作" | 82 | label="操作" |
| 77 | align="center" | 83 | align="center" |
| 78 | - min-width="240" | 84 | + min-width="380" |
| 79 | fixed="right" | 85 | fixed="right" |
| 80 | > | 86 | > |
| 81 | <template #default="{ row }"> | 87 | <template #default="{ row }"> |
| @@ -89,6 +95,15 @@ | @@ -89,6 +95,15 @@ | ||
| 89 | > | 95 | > |
| 90 | <el-button | 96 | <el-button |
| 91 | type="primary" | 97 | type="primary" |
| 98 | + v-show=" | ||
| 99 | + row.policyStatus !== '疑难件' && row.orderProgress === '已承接' | ||
| 100 | + " | ||
| 101 | + v-hasPermi="['policy:pending:troubleshooting']" | ||
| 102 | + @click.stop="handleTroubleshooting(row.taskId)" | ||
| 103 | + >疑难件</el-button | ||
| 104 | + > | ||
| 105 | + <el-button | ||
| 106 | + type="primary" | ||
| 92 | v-hasPermi="['policy:pending:sharing']" | 107 | v-hasPermi="['policy:pending:sharing']" |
| 93 | @click.stop="handleSharing(row.taskId)" | 108 | @click.stop="handleSharing(row.taskId)" |
| 94 | >分配</el-button | 109 | >分配</el-button |
| @@ -115,6 +130,12 @@ | @@ -115,6 +130,12 @@ | ||
| 115 | <el-button | 130 | <el-button |
| 116 | type="primary" | 131 | type="primary" |
| 117 | v-show="hasRole" | 132 | v-show="hasRole" |
| 133 | + @click.stop="handleUpdate(row)" | ||
| 134 | + >修改</el-button | ||
| 135 | + > | ||
| 136 | + <el-button | ||
| 137 | + type="primary" | ||
| 138 | + v-show="hasRole" | ||
| 118 | @click.stop="handleVoid('2', row.taskId)" | 139 | @click.stop="handleVoid('2', row.taskId)" |
| 119 | >作废</el-button | 140 | >作废</el-button |
| 120 | > | 141 | > |
| @@ -122,7 +143,7 @@ | @@ -122,7 +143,7 @@ | ||
| 122 | type="primary" | 143 | type="primary" |
| 123 | v-show="hasRole" | 144 | v-show="hasRole" |
| 124 | @click.stop="handleAuthCompany('0', row.taskId)" | 145 | @click.stop="handleAuthCompany('0', row.taskId)" |
| 125 | - >分配承保公司</el-button | 146 | + >分配</el-button |
| 126 | > | 147 | > |
| 127 | </template> | 148 | </template> |
| 128 | </el-table-column> | 149 | </el-table-column> |
| @@ -143,12 +164,9 @@ | @@ -143,12 +164,9 @@ | ||
| 143 | width="500" | 164 | width="500" |
| 144 | append-to-body | 165 | append-to-body |
| 145 | > | 166 | > |
| 146 | - <el-input | ||
| 147 | - v-model="deprecatedForm.deprecatedReason" | ||
| 148 | - style="width: 240px" | ||
| 149 | - :rows="2" | ||
| 150 | - type="textarea" | ||
| 151 | - placeholder="请输入作废原因" | 167 | + <QuillEditor |
| 168 | + :value="deprecatedForm.deprecatedReason" | ||
| 169 | + @updateValue="getReason" | ||
| 152 | /> | 170 | /> |
| 153 | <template #footer> | 171 | <template #footer> |
| 154 | <div class="dialog-footer"> | 172 | <div class="dialog-footer"> |
| @@ -217,6 +235,33 @@ | @@ -217,6 +235,33 @@ | ||
| 217 | </template> | 235 | </template> |
| 218 | </el-dialog> | 236 | </el-dialog> |
| 219 | 237 | ||
| 238 | + <!-- 承接回馈对话框 --> | ||
| 239 | + <el-dialog | ||
| 240 | + v-model="showFeedback" | ||
| 241 | + title="填写承接回馈" | ||
| 242 | + width="500" | ||
| 243 | + append-to-body | ||
| 244 | + > | ||
| 245 | + <el-form :model="FeedbackForm" ref="policyRef" label-width="100px"> | ||
| 246 | + <el-form-item label="保单回馈" prop="progress"> | ||
| 247 | + <el-input | ||
| 248 | + v-model="FeedbackForm.policynumber" | ||
| 249 | + placeholder="请输入保单号" | ||
| 250 | + :disabled="hasRole" | ||
| 251 | + /> | ||
| 252 | + </el-form-item> | ||
| 253 | + <el-form-item label="保单回馈" prop="progress"> | ||
| 254 | + <QuillEditor :value="FeedbackForm.message" @updateValue="getMsg" /> | ||
| 255 | + </el-form-item> | ||
| 256 | + </el-form> | ||
| 257 | + <template #footer> | ||
| 258 | + <div class="dialog-footer"> | ||
| 259 | + <el-button @click="showFeedback = false">取消</el-button> | ||
| 260 | + <el-button type="primary" @click="submit">提交回馈</el-button> | ||
| 261 | + </div> | ||
| 262 | + </template> | ||
| 263 | + </el-dialog> | ||
| 264 | + | ||
| 220 | <!-- 编辑对话框 --> | 265 | <!-- 编辑对话框 --> |
| 221 | <el-dialog v-model="open" title="保单信息" width="700" append-to-body> | 266 | <el-dialog v-model="open" title="保单信息" width="700" append-to-body> |
| 222 | <el-form :model="form" ref="policyRef" label-width="100px"> | 267 | <el-form :model="form" ref="policyRef" label-width="100px"> |
| @@ -263,20 +308,26 @@ | @@ -263,20 +308,26 @@ | ||
| 263 | <el-row> | 308 | <el-row> |
| 264 | <el-col :span="12"> | 309 | <el-col :span="12"> |
| 265 | <el-form-item label="车辆类型" prop="vehicleType"> | 310 | <el-form-item label="车辆类型" prop="vehicleType"> |
| 266 | - <el-input | ||
| 267 | - v-model="form.vehicleType" | ||
| 268 | - :disabled="hasRole" | ||
| 269 | - placeholder="请输入登记时间" | 311 | + <el-select v-model="form.vehicleTypeId" style="width: 230px"> |
| 312 | + <el-option | ||
| 313 | + v-for="item in carTypeOption" | ||
| 314 | + :key="item.id" | ||
| 315 | + :label="item.name" | ||
| 316 | + :value="item.id" | ||
| 270 | /> | 317 | /> |
| 318 | + </el-select> | ||
| 271 | </el-form-item> | 319 | </el-form-item> |
| 272 | </el-col> | 320 | </el-col> |
| 273 | <el-col :span="12"> | 321 | <el-col :span="12"> |
| 274 | <el-form-item label="车辆使用性质" prop="vehicleNature"> | 322 | <el-form-item label="车辆使用性质" prop="vehicleNature"> |
| 275 | - <el-input | ||
| 276 | - v-model="form.vehicleNature" | ||
| 277 | - :disabled="hasRole" | ||
| 278 | - placeholder="请输入办理人" | 323 | + <el-select v-model="form.vehicleNatureId" style="width: 230px"> |
| 324 | + <el-option | ||
| 325 | + v-for="item in carNatureOption" | ||
| 326 | + :key="item.id" | ||
| 327 | + :label="item.name" | ||
| 328 | + :value="item.id" | ||
| 279 | /> | 329 | /> |
| 330 | + </el-select> | ||
| 280 | </el-form-item> | 331 | </el-form-item> |
| 281 | </el-col> | 332 | </el-col> |
| 282 | </el-row> | 333 | </el-row> |
| @@ -286,7 +337,7 @@ | @@ -286,7 +337,7 @@ | ||
| 286 | <el-input | 337 | <el-input |
| 287 | v-model="form.passengersNumber" | 338 | v-model="form.passengersNumber" |
| 288 | :disabled="hasRole" | 339 | :disabled="hasRole" |
| 289 | - placeholder="请输入办理人" | 340 | + placeholder="请输入核定载客数" |
| 290 | /> | 341 | /> |
| 291 | </el-form-item> | 342 | </el-form-item> |
| 292 | </el-col> | 343 | </el-col> |
| @@ -295,7 +346,7 @@ | @@ -295,7 +346,7 @@ | ||
| 295 | <el-input | 346 | <el-input |
| 296 | v-model="form.passengerCapacity" | 347 | v-model="form.passengerCapacity" |
| 297 | :disabled="hasRole" | 348 | :disabled="hasRole" |
| 298 | - placeholder="请输入承保公司" | 349 | + placeholder="请输入核定载质量" |
| 299 | /> | 350 | /> |
| 300 | </el-form-item> | 351 | </el-form-item> |
| 301 | </el-col> | 352 | </el-col> |
| @@ -310,23 +361,35 @@ | @@ -310,23 +361,35 @@ | ||
| 310 | /> | 361 | /> |
| 311 | </el-form-item> | 362 | </el-form-item> |
| 312 | </el-col> | 363 | </el-col> |
| 313 | - <el-col :span="12"> | 364 | + <el-col v-if="isCustom" :span="12"> |
| 365 | + <el-form-item label="中文品牌" prop="vehicleBrand"> | ||
| 366 | + <el-select v-model="form.vehicleBrandId" style="width: 230px"> | ||
| 367 | + <el-option | ||
| 368 | + v-for="item in carBrandOption" | ||
| 369 | + :key="item.id" | ||
| 370 | + :label="item.name" | ||
| 371 | + :value="item.id" | ||
| 372 | + /> | ||
| 373 | + </el-select> | ||
| 374 | + </el-form-item> | ||
| 375 | + </el-col> | ||
| 376 | + <el-col v-else :span="12"> | ||
| 314 | <el-form-item label="中文品牌" prop="vehicleBrand"> | 377 | <el-form-item label="中文品牌" prop="vehicleBrand"> |
| 315 | <el-input | 378 | <el-input |
| 316 | - v-model="form.vehicleBrand" | 379 | + v-model="form.customizeVehicleBrand" |
| 317 | :disabled="hasRole" | 380 | :disabled="hasRole" |
| 318 | - placeholder="请输入办理人" | 381 | + placeholder="中文品牌" |
| 319 | /> | 382 | /> |
| 320 | </el-form-item> | 383 | </el-form-item> |
| 321 | </el-col> | 384 | </el-col> |
| 322 | </el-row> | 385 | </el-row> |
| 323 | <el-row> | 386 | <el-row> |
| 324 | <el-col :span="12"> | 387 | <el-col :span="12"> |
| 325 | - <el-form-item label="车辆型号" prop="vehicleModel"> | 388 | + <el-form-item label="车辆型号" prop="customizeVehicleModel"> |
| 326 | <el-input | 389 | <el-input |
| 327 | - v-model="form.vehicleModel" | 390 | + v-model="form.customizeVehicleModel" |
| 328 | :disabled="hasRole" | 391 | :disabled="hasRole" |
| 329 | - placeholder="请输入办理人" | 392 | + placeholder="请输入车辆型号" |
| 330 | /> | 393 | /> |
| 331 | </el-form-item> | 394 | </el-form-item> |
| 332 | </el-col> | 395 | </el-col> |
| @@ -342,32 +405,38 @@ | @@ -342,32 +405,38 @@ | ||
| 342 | </el-row> | 405 | </el-row> |
| 343 | <el-row> | 406 | <el-row> |
| 344 | <el-col :span="12"> | 407 | <el-col :span="12"> |
| 345 | - <el-form-item label="保险需求" prop="requirements"> | ||
| 346 | - <el-input | ||
| 347 | - v-model="form.requirements" | ||
| 348 | - :disabled="hasRole" | ||
| 349 | - placeholder="请输入办理人" | 408 | + <el-form-item label="号牌种类" prop="customizeVehicleModel"> |
| 409 | + <el-select | ||
| 410 | + v-model="form.lincensePlateTypeId" | ||
| 411 | + style="width: 230px" | ||
| 412 | + > | ||
| 413 | + <el-option | ||
| 414 | + v-for="item in carNumOption" | ||
| 415 | + :key="item.id" | ||
| 416 | + :label="item.name" | ||
| 417 | + :value="item.id" | ||
| 350 | /> | 418 | /> |
| 419 | + </el-select> | ||
| 351 | </el-form-item> | 420 | </el-form-item> |
| 352 | </el-col> | 421 | </el-col> |
| 353 | <el-col :span="12"> | 422 | <el-col :span="12"> |
| 354 | - <el-form-item label="承保单号" prop="policyNumber"> | ||
| 355 | - <el-input | ||
| 356 | - v-model="form.policyNumber" | ||
| 357 | - :disabled="hasRole" | ||
| 358 | - placeholder="请输入承保单号" | 423 | + <el-form-item label="保险需求" prop="requirements"> |
| 424 | + <el-select v-model="form.requirementsId" style="width: 230px"> | ||
| 425 | + <el-option | ||
| 426 | + v-for="item in needOption" | ||
| 427 | + :key="item.id" | ||
| 428 | + :label="item.name" | ||
| 429 | + :value="item.id" | ||
| 359 | /> | 430 | /> |
| 431 | + </el-select> | ||
| 360 | </el-form-item> | 432 | </el-form-item> |
| 361 | </el-col> | 433 | </el-col> |
| 362 | </el-row> | 434 | </el-row> |
| 363 | - <el-form-item label="保单回馈" prop="progress"> | ||
| 364 | - <QuillEditor :value="form.comment" @updateValue="getMsg" /> | ||
| 365 | - </el-form-item> | ||
| 366 | </el-form> | 435 | </el-form> |
| 367 | <template #footer> | 436 | <template #footer> |
| 368 | <div class="dialog-footer"> | 437 | <div class="dialog-footer"> |
| 369 | <el-button @click="open = false">取消</el-button> | 438 | <el-button @click="open = false">取消</el-button> |
| 370 | - <el-button type="primary" @click="submit">提交回馈</el-button> | 439 | + <el-button type="primary" @click="submitUpdate">提交修改</el-button> |
| 371 | </div> | 440 | </div> |
| 372 | </template> | 441 | </template> |
| 373 | </el-dialog> | 442 | </el-dialog> |
| @@ -380,42 +449,35 @@ import { | @@ -380,42 +449,35 @@ import { | ||
| 380 | disposeUser, | 449 | disposeUser, |
| 381 | transfer, | 450 | transfer, |
| 382 | getUserList, | 451 | getUserList, |
| 452 | + updateCarInfo, | ||
| 453 | + getCarDetail, | ||
| 383 | } from "@/api/policy/index"; | 454 | } from "@/api/policy/index"; |
| 455 | +import { queryCarType } from "@/api/configurationCenter/carType.js"; | ||
| 456 | +import { queryCarNature } from "@/api/configurationCenter/carNature.js"; | ||
| 457 | +import { queryCarBrand } from "@/api/configurationCenter/carBrand.js"; | ||
| 458 | +import { queryCarNum } from "@/api/configurationCenter/carNum.js"; | ||
| 459 | +import { queryNeed } from "@/api/configurationCenter/need.js"; | ||
| 384 | import { listDept } from "@/api/system/dept"; | 460 | import { listDept } from "@/api/system/dept"; |
| 385 | import { ref } from "vue"; | 461 | import { ref } from "vue"; |
| 386 | const { proxy } = getCurrentInstance(); | 462 | const { proxy } = getCurrentInstance(); |
| 387 | const loading = ref(false); | 463 | const loading = ref(false); |
| 388 | const total = ref(0); | 464 | const total = ref(0); |
| 389 | -const title = ref("保单信息"); | 465 | +const isCustom = ref(false); |
| 390 | const open = ref(false); | 466 | const open = ref(false); |
| 391 | const timer = ref(null); | 467 | const timer = ref(null); |
| 468 | +const timerReason = ref(null); | ||
| 392 | const form = ref({}); | 469 | const form = ref({}); |
| 470 | +const showFeedback = ref(false); | ||
| 393 | const transferShow = ref(false); | 471 | const transferShow = ref(false); |
| 394 | const transferForm = ref({}); | 472 | const transferForm = ref({}); |
| 395 | -const hasRole = computed(() => { | ||
| 396 | - return proxy.$auth.hasRole("associationemployee"); | ||
| 397 | -}); | ||
| 398 | - | ||
| 399 | -const hasCompanyadmin = computed(() => { | ||
| 400 | - return proxy.$auth.hasRole("companyadmin"); | ||
| 401 | -}); | ||
| 402 | -const rules = ref({ | ||
| 403 | - carNum: [{ required: true, message: "车牌号不能为空", trigger: "blur" }], | ||
| 404 | - frameNum: [{ required: true, message: "车架号不能为空", trigger: "blur" }], | ||
| 405 | - name: [{ required: true, message: "车主姓名不能为空", trigger: "blur" }], | ||
| 406 | - createTime: [{ required: true, message: "日期不能为空", trigger: "blur" }], | ||
| 407 | - phone: [ | ||
| 408 | - { | ||
| 409 | - pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, | ||
| 410 | - message: "请输入正确的手机号码", | ||
| 411 | - trigger: "blur", | ||
| 412 | - }, | ||
| 413 | - ], | 473 | +const FeedbackForm = ref({}); |
| 474 | +const getParams = reactive({ | ||
| 475 | + pageNum: 1, | ||
| 476 | + pageSize: 100, | ||
| 414 | }); | 477 | }); |
| 415 | const companyShow = ref(false); | 478 | const companyShow = ref(false); |
| 416 | const deptOptions = ref([]); | 479 | const deptOptions = ref([]); |
| 417 | const transferOptions = ref([]); | 480 | const transferOptions = ref([]); |
| 418 | -const company = ref(2); | ||
| 419 | const deprecatedShow = ref(false); | 481 | const deprecatedShow = ref(false); |
| 420 | const deprecatedForm = ref({}); | 482 | const deprecatedForm = ref({}); |
| 421 | const companyForm = ref({}); | 483 | const companyForm = ref({}); |
| @@ -429,6 +491,52 @@ const companyQueryParams = reactive({ | @@ -429,6 +491,52 @@ const companyQueryParams = reactive({ | ||
| 429 | }); | 491 | }); |
| 430 | const policyList = ref([]); | 492 | const policyList = ref([]); |
| 431 | 493 | ||
| 494 | +// 判断是否有权限 | ||
| 495 | +const hasRole = computed(() => { | ||
| 496 | + return proxy.$auth.hasRole("associationemployee"); | ||
| 497 | +}); | ||
| 498 | + | ||
| 499 | +const hasCompanyadmin = computed(() => { | ||
| 500 | + return proxy.$auth.hasRole("companyadmin"); | ||
| 501 | +}); | ||
| 502 | + | ||
| 503 | +// 号牌种类 | ||
| 504 | +const carNumOption = ref([]); | ||
| 505 | +const getCarNumOption = async () => { | ||
| 506 | + const { data } = await queryCarNum(getParams); | ||
| 507 | + carNumOption.value = data.records; | ||
| 508 | +}; | ||
| 509 | +getCarNumOption(); | ||
| 510 | +// 车辆类型 | ||
| 511 | +const carTypeOption = ref([]); | ||
| 512 | +const getCarTypeOption = async () => { | ||
| 513 | + const { data } = await queryCarType(getParams); | ||
| 514 | + carTypeOption.value = data.records; | ||
| 515 | +}; | ||
| 516 | +getCarTypeOption(); | ||
| 517 | +// 车辆使用性质 | ||
| 518 | +const carNatureOption = ref([]); | ||
| 519 | +const getcarNatureOption = async () => { | ||
| 520 | + const { data } = await queryCarNature(getParams); | ||
| 521 | + carNatureOption.value = data.records; | ||
| 522 | +}; | ||
| 523 | +getcarNatureOption(); | ||
| 524 | +// 中文品牌 | ||
| 525 | +const carBrandOption = ref([]); | ||
| 526 | +const getCarBrandOption = async () => { | ||
| 527 | + const { data } = await queryCarBrand(getParams); | ||
| 528 | + carBrandOption.value = data.records; | ||
| 529 | +}; | ||
| 530 | +getCarBrandOption(); | ||
| 531 | + | ||
| 532 | +// 保险需求 | ||
| 533 | +const needOption = ref([]); | ||
| 534 | +const getNeedOption = async () => { | ||
| 535 | + const { data } = await queryNeed(getParams); | ||
| 536 | + needOption.value = data.records; | ||
| 537 | +}; | ||
| 538 | +getNeedOption(); | ||
| 539 | + | ||
| 432 | const getList = async () => { | 540 | const getList = async () => { |
| 433 | loading.value = true; | 541 | loading.value = true; |
| 434 | const { data } = await queryMyList(queryParams); | 542 | const { data } = await queryMyList(queryParams); |
| @@ -453,11 +561,20 @@ const handleContinue = (row) => { | @@ -453,11 +561,20 @@ const handleContinue = (row) => { | ||
| 453 | }); | 561 | }); |
| 454 | } else { | 562 | } else { |
| 455 | reset(); | 563 | reset(); |
| 456 | - form.value = row; | ||
| 457 | - open.value = true; | 564 | + FeedbackForm.value.taskId = row.taskId; |
| 565 | + showFeedback.value = true; | ||
| 458 | } | 566 | } |
| 459 | }; | 567 | }; |
| 460 | - | 568 | +// 疑难件 |
| 569 | +const handleTroubleshooting = (taskId) => { | ||
| 570 | + const data = { | ||
| 571 | + policystatus: "1", | ||
| 572 | + }; | ||
| 573 | + disposeUser(data, taskId).then((res) => { | ||
| 574 | + getList(); | ||
| 575 | + proxy.$modal.msgSuccess("处理成功"); | ||
| 576 | + }); | ||
| 577 | +}; | ||
| 461 | // 通过保单 | 578 | // 通过保单 |
| 462 | const handleSuccess = (associationapprove, taskId) => { | 579 | const handleSuccess = (associationapprove, taskId) => { |
| 463 | proxy.$modal | 580 | proxy.$modal |
| @@ -506,6 +623,7 @@ const sunmitDeprecated = () => { | @@ -506,6 +623,7 @@ const sunmitDeprecated = () => { | ||
| 506 | const taskId = deprecatedForm.value.taskId; | 623 | const taskId = deprecatedForm.value.taskId; |
| 507 | disposeUser(data, taskId).then((res) => { | 624 | disposeUser(data, taskId).then((res) => { |
| 508 | getList(); | 625 | getList(); |
| 626 | + deprecatedShow.value = false; | ||
| 509 | proxy.$modal.msgSuccess("保单已作废"); | 627 | proxy.$modal.msgSuccess("保单已作废"); |
| 510 | }); | 628 | }); |
| 511 | }; | 629 | }; |
| @@ -554,17 +672,18 @@ function reset() { | @@ -554,17 +672,18 @@ function reset() { | ||
| 554 | } | 672 | } |
| 555 | 673 | ||
| 556 | /** 修改按钮操作 */ | 674 | /** 修改按钮操作 */ |
| 557 | -function handleUpdate(row) { | 675 | +const handleUpdate = async (row) => { |
| 558 | reset(); | 676 | reset(); |
| 559 | - form.value = row; | ||
| 560 | - form.value.comment = ""; | 677 | + const { data } = await getCarDetail(row.businessKey); |
| 678 | + form.value = data; | ||
| 679 | + isCustom.value = data.isCustomizeBrandAndModel == "0"; | ||
| 561 | open.value = true; | 680 | open.value = true; |
| 562 | -} | 681 | +}; |
| 563 | /** 提交通过分配承保公司 */ | 682 | /** 提交通过分配承保公司 */ |
| 564 | function submitForm() { | 683 | function submitForm() { |
| 565 | const data = { | 684 | const data = { |
| 566 | associationapprove: companyForm.value.associationapprove, | 685 | associationapprove: companyForm.value.associationapprove, |
| 567 | - deptId: companyForm.value.deptId, | 686 | + deptid: companyForm.value.deptId.toString(), |
| 568 | }; | 687 | }; |
| 569 | const taskId = companyForm.value.taskId; | 688 | const taskId = companyForm.value.taskId; |
| 570 | disposeUser(data, taskId).then((res) => { | 689 | disposeUser(data, taskId).then((res) => { |
| @@ -591,22 +710,39 @@ function submitTransfer() { | @@ -591,22 +710,39 @@ function submitTransfer() { | ||
| 591 | const submit = () => { | 710 | const submit = () => { |
| 592 | const data = { | 711 | const data = { |
| 593 | policystatus: "2", | 712 | policystatus: "2", |
| 594 | - message: form.value.comment, | ||
| 595 | - policynumber: form.value.policyNumber, | 713 | + message: FeedbackForm.value.comment, |
| 714 | + policynumber: FeedbackForm.value.policynumber, | ||
| 596 | }; | 715 | }; |
| 597 | - disposeUser(data, form.value.taskId).then((res) => { | 716 | + disposeUser(data, FeedbackForm.value.taskId).then((res) => { |
| 598 | getList(); | 717 | getList(); |
| 599 | proxy.$modal.msgSuccess("回馈成功"); | 718 | proxy.$modal.msgSuccess("回馈成功"); |
| 719 | + showFeedback.value = false; | ||
| 600 | }); | 720 | }); |
| 601 | }; | 721 | }; |
| 602 | 722 | ||
| 603 | const getMsg = (val) => { | 723 | const getMsg = (val) => { |
| 604 | clearTimeout(timer.value); | 724 | clearTimeout(timer.value); |
| 605 | timer.value = setTimeout(() => { | 725 | timer.value = setTimeout(() => { |
| 606 | - form.value.message = val; | 726 | + FeedbackForm.value.comment = val; |
| 607 | }, 1000); | 727 | }, 1000); |
| 608 | }; | 728 | }; |
| 609 | 729 | ||
| 730 | +// 获取作废原因 | ||
| 731 | +const getReason = (val) => { | ||
| 732 | + clearTimeout(timerReason.value); | ||
| 733 | + timerReason.value = setTimeout(() => { | ||
| 734 | + deprecatedForm.value.deprecatedReaso = val; | ||
| 735 | + }, 1000); | ||
| 736 | +}; | ||
| 737 | +// 提交修改 | ||
| 738 | +const submitUpdate = () => { | ||
| 739 | + updateCarInfo(form.value).then((response) => { | ||
| 740 | + proxy.$modal.msgSuccess("修改成功"); | ||
| 741 | + open.value = false; | ||
| 742 | + getList(); | ||
| 743 | + }); | ||
| 744 | +}; | ||
| 745 | + | ||
| 610 | getList(); | 746 | getList(); |
| 611 | </script> | 747 | </script> |
| 612 | 748 |
| @@ -50,6 +50,21 @@ | @@ -50,6 +50,21 @@ | ||
| 50 | /> | 50 | /> |
| 51 | </el-select> | 51 | </el-select> |
| 52 | </el-form-item> | 52 | </el-form-item> |
| 53 | + <el-form-item label="处理状态" prop="associationapprove"> | ||
| 54 | + <el-select | ||
| 55 | + v-model="queryParams.associationapprove" | ||
| 56 | + placeholder="选择处理状态" | ||
| 57 | + clearable | ||
| 58 | + style="width: 200px" | ||
| 59 | + > | ||
| 60 | + <el-option | ||
| 61 | + v-for="dict in associationapproveOptions" | ||
| 62 | + :key="dict.value" | ||
| 63 | + :label="dict.label" | ||
| 64 | + :value="dict.value" | ||
| 65 | + /> | ||
| 66 | + </el-select> | ||
| 67 | + </el-form-item> | ||
| 53 | <el-form-item> | 68 | <el-form-item> |
| 54 | <el-button | 69 | <el-button |
| 55 | type="primary" | 70 | type="primary" |
| @@ -70,15 +85,12 @@ | @@ -70,15 +85,12 @@ | ||
| 70 | @row-click="handleUpdate" | 85 | @row-click="handleUpdate" |
| 71 | > | 86 | > |
| 72 | <el-table-column label="序号" type="index" width="55" /> | 87 | <el-table-column label="序号" type="index" width="55" /> |
| 73 | - <el-table-column | ||
| 74 | - label="登记时间" | ||
| 75 | - prop="initialRegistrationTime" | ||
| 76 | - width="150" | ||
| 77 | - /> | 88 | + <el-table-column label="登记时间" prop="createTime" width="160" /> |
| 78 | <el-table-column label="车牌号" prop="licensePlateNumber" width="150" /> | 89 | <el-table-column label="车牌号" prop="licensePlateNumber" width="150" /> |
| 79 | <el-table-column label="车架号" prop="frameNumber" width="240" /> | 90 | <el-table-column label="车架号" prop="frameNumber" width="240" /> |
| 80 | <el-table-column label="车主姓名" prop="name" width="100" /> | 91 | <el-table-column label="车主姓名" prop="name" width="100" /> |
| 81 | <el-table-column label="联系电话" prop="phone" width="180" /> | 92 | <el-table-column label="联系电话" prop="phone" width="180" /> |
| 93 | + <el-table-column label="处理状态" prop="policyStatus" width="150" /> | ||
| 82 | <el-table-column label="上年承保公司" prop="sysDeptName" width="150" /> | 94 | <el-table-column label="上年承保公司" prop="sysDeptName" width="150" /> |
| 83 | <el-table-column label="操作人员" width="150"> | 95 | <el-table-column label="操作人员" width="150"> |
| 84 | <template #default="{ row }"> | 96 | <template #default="{ row }"> |
| @@ -87,7 +99,7 @@ | @@ -87,7 +99,7 @@ | ||
| 87 | }}</span> | 99 | }}</span> |
| 88 | </template> | 100 | </template> |
| 89 | </el-table-column> | 101 | </el-table-column> |
| 90 | - <el-table-column label="操作时间" width="170"> | 102 | + <el-table-column label="操作时间" width="160"> |
| 91 | <template #default="{ row }"> | 103 | <template #default="{ row }"> |
| 92 | <span>{{ | 104 | <span>{{ |
| 93 | row.companyEmployeeUndertakeTime || row.distributionTime | 105 | row.companyEmployeeUndertakeTime || row.distributionTime |
| @@ -243,6 +255,7 @@ const queryParams = reactive({ | @@ -243,6 +255,7 @@ const queryParams = reactive({ | ||
| 243 | licensePlate: "", | 255 | licensePlate: "", |
| 244 | association: "", | 256 | association: "", |
| 245 | associationapprovetype: "", | 257 | associationapprovetype: "", |
| 258 | + associationapprove: "", | ||
| 246 | }); | 259 | }); |
| 247 | 260 | ||
| 248 | const options = [ | 261 | const options = [ |
| @@ -256,6 +269,17 @@ const options = [ | @@ -256,6 +269,17 @@ const options = [ | ||
| 256 | }, | 269 | }, |
| 257 | ]; | 270 | ]; |
| 258 | 271 | ||
| 272 | +const associationapproveOptions = [ | ||
| 273 | + { | ||
| 274 | + value: 0, | ||
| 275 | + label: "通过", | ||
| 276 | + }, | ||
| 277 | + { | ||
| 278 | + value: 1, | ||
| 279 | + label: "退回", | ||
| 280 | + }, | ||
| 281 | +]; | ||
| 282 | + | ||
| 259 | const policyList = ref([]); | 283 | const policyList = ref([]); |
| 260 | 284 | ||
| 261 | /** 多选框选中数据 */ | 285 | /** 多选框选中数据 */ |
| @@ -115,22 +115,14 @@ | @@ -115,22 +115,14 @@ | ||
| 115 | <el-button icon="Refresh" @click="resetQuery">重置</el-button> | 115 | <el-button icon="Refresh" @click="resetQuery">重置</el-button> |
| 116 | </el-form-item> | 116 | </el-form-item> |
| 117 | </el-form> | 117 | </el-form> |
| 118 | - <!-- 数据统计 --> | ||
| 119 | - <!-- <div class="total_line"> | ||
| 120 | - <span>统计:平安保险公司(10条)</span> | ||
| 121 | - <span>已办结:3</span> | ||
| 122 | - <span>未办结:3</span> | ||
| 123 | - <span>待承接:2</span> | ||
| 124 | - <span>已承接:2</span> | ||
| 125 | - </div> --> | ||
| 126 | 118 | ||
| 127 | <!-- 表格数据 --> | 119 | <!-- 表格数据 --> |
| 128 | <el-table v-loading="loading" :data="policyList"> | 120 | <el-table v-loading="loading" :data="policyList"> |
| 129 | - <el-table-column label="序号" type="index" /> | 121 | + <el-table-column label="序号" width="55" type="index" /> |
| 130 | <el-table-column | 122 | <el-table-column |
| 131 | label="登记时间" | 123 | label="登记时间" |
| 132 | - prop="initialRegistrationTime" | ||
| 133 | - width="150" | 124 | + prop="createTime" |
| 125 | + width="160" | ||
| 134 | align="center" | 126 | align="center" |
| 135 | /> | 127 | /> |
| 136 | <el-table-column | 128 | <el-table-column |
| @@ -169,12 +161,13 @@ | @@ -169,12 +161,13 @@ | ||
| 169 | width="150" | 161 | width="150" |
| 170 | align="center" | 162 | align="center" |
| 171 | /> | 163 | /> |
| 172 | - <el-table-column | ||
| 173 | - label="办理人" | ||
| 174 | - prop="companyEmployeeUserName" | ||
| 175 | - width="100" | ||
| 176 | - align="center" | ||
| 177 | - /> | 164 | + <el-table-column label="办理人" width="100" align="center"> |
| 165 | + <template #default="{ row }"> | ||
| 166 | + <span>{{ | ||
| 167 | + row.associationEmployeeUserName ?? row.companyEmployeeUserName | ||
| 168 | + }}</span> | ||
| 169 | + </template> | ||
| 170 | + </el-table-column> | ||
| 178 | <el-table-column label="保单进度" width="100" prop="orderProgress" /> | 171 | <el-table-column label="保单进度" width="100" prop="orderProgress" /> |
| 179 | <el-table-column label="保单状态" width="100" prop="policyStatus" /> | 172 | <el-table-column label="保单状态" width="100" prop="policyStatus" /> |
| 180 | <el-table-column | 173 | <el-table-column |
| @@ -184,7 +177,14 @@ | @@ -184,7 +177,14 @@ | ||
| 184 | prop="Feedback" | 177 | prop="Feedback" |
| 185 | > | 178 | > |
| 186 | <template #default="{ row }"> | 179 | <template #default="{ row }"> |
| 187 | - <el-button type="primary" @click="handleUpdate(row)">查阅</el-button> | 180 | + <el-button |
| 181 | + v-show=" | ||
| 182 | + row.policyStatus === '已作废' || row.policyStatus === '已办结' | ||
| 183 | + " | ||
| 184 | + type="primary" | ||
| 185 | + @click="queryRemark(row)" | ||
| 186 | + >查阅</el-button | ||
| 187 | + > | ||
| 188 | </template> | 188 | </template> |
| 189 | </el-table-column> | 189 | </el-table-column> |
| 190 | </el-table> | 190 | </el-table> |
| @@ -197,6 +197,7 @@ | @@ -197,6 +197,7 @@ | ||
| 197 | @pagination="getList" | 197 | @pagination="getList" |
| 198 | /> | 198 | /> |
| 199 | 199 | ||
| 200 | + <!-- 查阅信息弹出框 --> | ||
| 200 | <el-dialog v-model="open" title="保单信息" width="700" append-to-body> | 201 | <el-dialog v-model="open" title="保单信息" width="700" append-to-body> |
| 201 | <el-form :model="form" ref="policyRef" label-width="100px"> | 202 | <el-form :model="form" ref="policyRef" label-width="100px"> |
| 202 | <el-row> | 203 | <el-row> |
| @@ -242,20 +243,34 @@ | @@ -242,20 +243,34 @@ | ||
| 242 | <el-row> | 243 | <el-row> |
| 243 | <el-col :span="12"> | 244 | <el-col :span="12"> |
| 244 | <el-form-item label="车辆类型" prop="vehicleType"> | 245 | <el-form-item label="车辆类型" prop="vehicleType"> |
| 245 | - <el-input | ||
| 246 | - v-model="form.vehicleType" | 246 | + <el-select |
| 247 | + v-model="form.vehicleTypeId" | ||
| 247 | :disabled="hasRole" | 248 | :disabled="hasRole" |
| 248 | - placeholder="请输入登记时间" | 249 | + style="width: 230px" |
| 250 | + > | ||
| 251 | + <el-option | ||
| 252 | + v-for="item in carTypeOption" | ||
| 253 | + :key="item.id" | ||
| 254 | + :label="item.name" | ||
| 255 | + :value="item.id" | ||
| 249 | /> | 256 | /> |
| 257 | + </el-select> | ||
| 250 | </el-form-item> | 258 | </el-form-item> |
| 251 | </el-col> | 259 | </el-col> |
| 252 | <el-col :span="12"> | 260 | <el-col :span="12"> |
| 253 | <el-form-item label="车辆使用性质" prop="vehicleNature"> | 261 | <el-form-item label="车辆使用性质" prop="vehicleNature"> |
| 254 | - <el-input | ||
| 255 | - v-model="form.vehicleNature" | 262 | + <el-select |
| 263 | + v-model="form.vehicleNatureId" | ||
| 256 | :disabled="hasRole" | 264 | :disabled="hasRole" |
| 257 | - placeholder="请输入办理人" | 265 | + style="width: 230px" |
| 266 | + > | ||
| 267 | + <el-option | ||
| 268 | + v-for="item in carNatureOption" | ||
| 269 | + :key="item.id" | ||
| 270 | + :label="item.name" | ||
| 271 | + :value="item.id" | ||
| 258 | /> | 272 | /> |
| 273 | + </el-select> | ||
| 259 | </el-form-item> | 274 | </el-form-item> |
| 260 | </el-col> | 275 | </el-col> |
| 261 | </el-row> | 276 | </el-row> |
| @@ -265,7 +280,7 @@ | @@ -265,7 +280,7 @@ | ||
| 265 | <el-input | 280 | <el-input |
| 266 | v-model="form.passengersNumber" | 281 | v-model="form.passengersNumber" |
| 267 | :disabled="hasRole" | 282 | :disabled="hasRole" |
| 268 | - placeholder="请输入办理人" | 283 | + placeholder="请输入核定载客数" |
| 269 | /> | 284 | /> |
| 270 | </el-form-item> | 285 | </el-form-item> |
| 271 | </el-col> | 286 | </el-col> |
| @@ -274,7 +289,7 @@ | @@ -274,7 +289,7 @@ | ||
| 274 | <el-input | 289 | <el-input |
| 275 | v-model="form.passengerCapacity" | 290 | v-model="form.passengerCapacity" |
| 276 | :disabled="hasRole" | 291 | :disabled="hasRole" |
| 277 | - placeholder="请输入承保公司" | 292 | + placeholder="请输入核定载质量" |
| 278 | /> | 293 | /> |
| 279 | </el-form-item> | 294 | </el-form-item> |
| 280 | </el-col> | 295 | </el-col> |
| @@ -289,23 +304,39 @@ | @@ -289,23 +304,39 @@ | ||
| 289 | /> | 304 | /> |
| 290 | </el-form-item> | 305 | </el-form-item> |
| 291 | </el-col> | 306 | </el-col> |
| 292 | - <el-col :span="12"> | 307 | + <el-col v-if="isCustom" :span="12"> |
| 308 | + <el-form-item label="中文品牌" prop="vehicleBrand"> | ||
| 309 | + <el-select | ||
| 310 | + v-model="form.vehicleBrandId" | ||
| 311 | + :disabled="hasRole" | ||
| 312 | + style="width: 230px" | ||
| 313 | + > | ||
| 314 | + <el-option | ||
| 315 | + v-for="item in carBrandOption" | ||
| 316 | + :key="item.id" | ||
| 317 | + :label="item.name" | ||
| 318 | + :value="item.id" | ||
| 319 | + /> | ||
| 320 | + </el-select> | ||
| 321 | + </el-form-item> | ||
| 322 | + </el-col> | ||
| 323 | + <el-col v-else :span="12"> | ||
| 293 | <el-form-item label="中文品牌" prop="vehicleBrand"> | 324 | <el-form-item label="中文品牌" prop="vehicleBrand"> |
| 294 | <el-input | 325 | <el-input |
| 295 | - v-model="form.vehicleBrand" | 326 | + v-model="form.customizeVehicleBrand" |
| 296 | :disabled="hasRole" | 327 | :disabled="hasRole" |
| 297 | - placeholder="请输入办理人" | 328 | + placeholder="中文品牌" |
| 298 | /> | 329 | /> |
| 299 | </el-form-item> | 330 | </el-form-item> |
| 300 | </el-col> | 331 | </el-col> |
| 301 | </el-row> | 332 | </el-row> |
| 302 | <el-row> | 333 | <el-row> |
| 303 | <el-col :span="12"> | 334 | <el-col :span="12"> |
| 304 | - <el-form-item label="车辆型号" prop="vehicleModel"> | 335 | + <el-form-item label="车辆型号" prop="customizeVehicleModel"> |
| 305 | <el-input | 336 | <el-input |
| 306 | - v-model="form.vehicleModel" | 337 | + v-model="form.customizeVehicleModel" |
| 307 | :disabled="hasRole" | 338 | :disabled="hasRole" |
| 308 | - placeholder="请输入办理人" | 339 | + placeholder="请输入车辆型号" |
| 309 | /> | 340 | /> |
| 310 | </el-form-item> | 341 | </el-form-item> |
| 311 | </el-col> | 342 | </el-col> |
| @@ -321,25 +352,50 @@ | @@ -321,25 +352,50 @@ | ||
| 321 | </el-row> | 352 | </el-row> |
| 322 | <el-row> | 353 | <el-row> |
| 323 | <el-col :span="12"> | 354 | <el-col :span="12"> |
| 324 | - <el-form-item label="保险需求" prop="requirements"> | ||
| 325 | - <el-input | ||
| 326 | - v-model="form.requirements" | 355 | + <el-form-item label="号牌种类" prop="customizeVehicleModel"> |
| 356 | + <el-select | ||
| 357 | + v-model="form.lincensePlateTypeId" | ||
| 327 | :disabled="hasRole" | 358 | :disabled="hasRole" |
| 328 | - placeholder="请输入办理人" | 359 | + style="width: 230px" |
| 360 | + > | ||
| 361 | + <el-option | ||
| 362 | + v-for="item in carNumOption" | ||
| 363 | + :key="item.id" | ||
| 364 | + :label="item.name" | ||
| 365 | + :value="item.id" | ||
| 329 | /> | 366 | /> |
| 367 | + </el-select> | ||
| 330 | </el-form-item> | 368 | </el-form-item> |
| 331 | </el-col> | 369 | </el-col> |
| 332 | <el-col :span="12"> | 370 | <el-col :span="12"> |
| 371 | + <el-form-item label="保险需求" prop="requirements"> | ||
| 372 | + <el-select | ||
| 373 | + v-model="form.requirementsId" | ||
| 374 | + :disabled="hasRole" | ||
| 375 | + style="width: 230px" | ||
| 376 | + > | ||
| 377 | + <el-option | ||
| 378 | + v-for="item in needOption" | ||
| 379 | + :key="item.id" | ||
| 380 | + :label="item.name" | ||
| 381 | + :value="item.id" | ||
| 382 | + /> | ||
| 383 | + </el-select> | ||
| 384 | + </el-form-item> | ||
| 385 | + </el-col> | ||
| 386 | + </el-row> | ||
| 387 | + <el-row> | ||
| 388 | + <el-col v-if="form.policyNumber" :span="12"> | ||
| 333 | <el-form-item label="承保单号" prop="policyNumber"> | 389 | <el-form-item label="承保单号" prop="policyNumber"> |
| 334 | <el-input | 390 | <el-input |
| 335 | v-model="form.policyNumber" | 391 | v-model="form.policyNumber" |
| 336 | :disabled="hasRole" | 392 | :disabled="hasRole" |
| 337 | - placeholder="请输入办理人" | 393 | + placeholder="请输入承保单号" |
| 338 | /> | 394 | /> |
| 339 | </el-form-item> | 395 | </el-form-item> |
| 340 | </el-col> | 396 | </el-col> |
| 341 | </el-row> | 397 | </el-row> |
| 342 | - <el-form-item label="保单回馈" prop="progress"> | 398 | + <el-form-item :label="labelTitle" prop="progress"> |
| 343 | <QuillEditor :value="form.comment" @updateValue="getMsg" /> | 399 | <QuillEditor :value="form.comment" @updateValue="getMsg" /> |
| 344 | </el-form-item> | 400 | </el-form-item> |
| 345 | </el-form> | 401 | </el-form> |
| @@ -349,8 +405,8 @@ | @@ -349,8 +405,8 @@ | ||
| 349 | <el-button | 405 | <el-button |
| 350 | type="primary" | 406 | type="primary" |
| 351 | v-hasPermi="['policy:info:edit']" | 407 | v-hasPermi="['policy:info:edit']" |
| 352 | - @click="submit" | ||
| 353 | - >提交</el-button | 408 | + @click="open = false" |
| 409 | + >确认</el-button | ||
| 354 | > | 410 | > |
| 355 | </div> | 411 | </div> |
| 356 | </template> | 412 | </template> |
| @@ -359,13 +415,51 @@ | @@ -359,13 +415,51 @@ | ||
| 359 | </template> | 415 | </template> |
| 360 | 416 | ||
| 361 | <script setup> | 417 | <script setup> |
| 362 | -import { queryList, queryResult, updateCarInfo } from "@/api/policy"; | 418 | +import { |
| 419 | + queryList, | ||
| 420 | + queryResult, | ||
| 421 | + updateCarInfo, | ||
| 422 | + queryDefeatContent, | ||
| 423 | + getCarDetail, | ||
| 424 | +} from "@/api/policy"; | ||
| 425 | +import { queryCarType } from "@/api/configurationCenter/carType.js"; | ||
| 426 | +import { queryCarNature } from "@/api/configurationCenter/carNature.js"; | ||
| 427 | +import { queryCarBrand } from "@/api/configurationCenter/carBrand.js"; | ||
| 428 | +import { queryCarNum } from "@/api/configurationCenter/carNum.js"; | ||
| 429 | +import { queryNeed } from "@/api/configurationCenter/need.js"; | ||
| 430 | +import { reactive } from "vue"; | ||
| 363 | const { proxy } = getCurrentInstance(); | 431 | const { proxy } = getCurrentInstance(); |
| 364 | const loading = ref(false); | 432 | const loading = ref(false); |
| 365 | -const total = ref(5); | 433 | +const total = ref(0); |
| 366 | const open = ref(false); | 434 | const open = ref(false); |
| 367 | -const form = ref({}); | 435 | +const isCustom = ref(false); |
| 436 | +const labelTitle = ref("保单回馈"); | ||
| 437 | +const form = ref({ | ||
| 438 | + name: "", | ||
| 439 | + identificationNumber: "", | ||
| 440 | + sysDeptId: "", | ||
| 441 | + customizeVehicleBrand: "", | ||
| 442 | + customizeVehicleModel: "", | ||
| 443 | + licensePlateNumber: "", | ||
| 444 | + lincensePlateTypeId: "", | ||
| 445 | + isCustomizeBrandAndModel: "1", | ||
| 446 | + frameNumber: "", | ||
| 447 | + engineNumber: "", | ||
| 448 | + vehicleTypeId: "", | ||
| 449 | + vehicleNatureId: "", | ||
| 450 | + passengersNumber: "", | ||
| 451 | + passengerCapacity: "", | ||
| 452 | + emissions: "", | ||
| 453 | + vehicleModelId: "", | ||
| 454 | + vehicleBrandId: "", | ||
| 455 | + tractionMass: "", | ||
| 456 | + requirementsId: "", | ||
| 457 | +}); | ||
| 368 | const showSearch = ref(true); | 458 | const showSearch = ref(true); |
| 459 | +const getParams = reactive({ | ||
| 460 | + pageNum: 1, | ||
| 461 | + pageSize: 100, | ||
| 462 | +}); | ||
| 369 | const queryParams = reactive({ | 463 | const queryParams = reactive({ |
| 370 | pageNum: 1, | 464 | pageNum: 1, |
| 371 | pageSize: 10, | 465 | pageSize: 10, |
| @@ -397,6 +491,14 @@ const statusOption = ref([ | @@ -397,6 +491,14 @@ const statusOption = ref([ | ||
| 397 | value: 2, | 491 | value: 2, |
| 398 | label: "已办结", | 492 | label: "已办结", |
| 399 | }, | 493 | }, |
| 494 | + { | ||
| 495 | + value: 6, | ||
| 496 | + label: "协会退回", | ||
| 497 | + }, | ||
| 498 | + { | ||
| 499 | + value: 7, | ||
| 500 | + label: "放弃登记", | ||
| 501 | + }, | ||
| 400 | ]); | 502 | ]); |
| 401 | 503 | ||
| 402 | const progressOption = ref([ | 504 | const progressOption = ref([ |
| @@ -422,6 +524,42 @@ const options = [ | @@ -422,6 +524,42 @@ const options = [ | ||
| 422 | ]; | 524 | ]; |
| 423 | 525 | ||
| 424 | const policyList = ref([]); | 526 | const policyList = ref([]); |
| 527 | +// 号牌种类 | ||
| 528 | +const carNumOption = ref([]); | ||
| 529 | +const getCarNumOption = async () => { | ||
| 530 | + const { data } = await queryCarNum(getParams); | ||
| 531 | + carNumOption.value = data.records; | ||
| 532 | +}; | ||
| 533 | +getCarNumOption(); | ||
| 534 | +// 车辆类型 | ||
| 535 | +const carTypeOption = ref([]); | ||
| 536 | +const getCarTypeOption = async () => { | ||
| 537 | + const { data } = await queryCarType(getParams); | ||
| 538 | + carTypeOption.value = data.records; | ||
| 539 | +}; | ||
| 540 | +getCarTypeOption(); | ||
| 541 | +// 车辆使用性质 | ||
| 542 | +const carNatureOption = ref([]); | ||
| 543 | +const getcarNatureOption = async () => { | ||
| 544 | + const { data } = await queryCarNature(getParams); | ||
| 545 | + carNatureOption.value = data.records; | ||
| 546 | +}; | ||
| 547 | +getcarNatureOption(); | ||
| 548 | +// 中文品牌 | ||
| 549 | +const carBrandOption = ref([]); | ||
| 550 | +const getCarBrandOption = async () => { | ||
| 551 | + const { data } = await queryCarBrand(getParams); | ||
| 552 | + carBrandOption.value = data.records; | ||
| 553 | +}; | ||
| 554 | +getCarBrandOption(); | ||
| 555 | + | ||
| 556 | +// 保险需求 | ||
| 557 | +const needOption = ref([]); | ||
| 558 | +const getNeedOption = async () => { | ||
| 559 | + const { data } = await queryNeed(getParams); | ||
| 560 | + needOption.value = data.records; | ||
| 561 | +}; | ||
| 562 | +getNeedOption(); | ||
| 425 | 563 | ||
| 426 | const handleTime = (valu) => { | 564 | const handleTime = (valu) => { |
| 427 | queryParams.startTime = proxy.parseTime(valu[0]); | 565 | queryParams.startTime = proxy.parseTime(valu[0]); |
| @@ -440,21 +578,26 @@ function reset() { | @@ -440,21 +578,26 @@ function reset() { | ||
| 440 | proxy.resetForm("policyRef"); | 578 | proxy.resetForm("policyRef"); |
| 441 | } | 579 | } |
| 442 | 580 | ||
| 443 | -/** 修改按钮操作 */ | ||
| 444 | -function handleUpdate(row) { | ||
| 445 | - reset(); | 581 | +/** 查询备注或回馈 */ |
| 582 | +const queryRemark = async (row) => { | ||
| 583 | + const { data } = await getCarDetail(row.businessKey); | ||
| 584 | + form.value = data; | ||
| 585 | + isCustom.value = data.isCustomizeBrandAndModel == "0"; | ||
| 446 | if (row.policyStatus === "已作废") { | 586 | if (row.policyStatus === "已作废") { |
| 447 | - form.value = row; | 587 | + labelTitle.value = "作废备注"; |
| 588 | + const { data } = await queryDefeatContent({ | ||
| 589 | + processInstanceId: row.processInstanceId, | ||
| 590 | + }); | ||
| 591 | + form.value.comment = data.message; | ||
| 448 | open.value = true; | 592 | open.value = true; |
| 449 | } else { | 593 | } else { |
| 450 | queryResult({ processInstanceId: row.processInstanceId }).then((res) => { | 594 | queryResult({ processInstanceId: row.processInstanceId }).then((res) => { |
| 451 | - form.value = row; | ||
| 452 | form.value.policyNumber = res?.data?.policyNumber; | 595 | form.value.policyNumber = res?.data?.policyNumber; |
| 453 | form.value.comment = res?.data?.message; | 596 | form.value.comment = res?.data?.message; |
| 454 | open.value = true; | 597 | open.value = true; |
| 455 | }); | 598 | }); |
| 456 | } | 599 | } |
| 457 | -} | 600 | +}; |
| 458 | 601 | ||
| 459 | const getMsg = (val) => { | 602 | const getMsg = (val) => { |
| 460 | form.value.comment = val; | 603 | form.value.comment = val; |
| @@ -28,7 +28,13 @@ | @@ -28,7 +28,13 @@ | ||
| 28 | </el-col> | 28 | </el-col> |
| 29 | <!--用户数据--> | 29 | <!--用户数据--> |
| 30 | <el-col :span="20" :xs="24"> | 30 | <el-col :span="20" :xs="24"> |
| 31 | - <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> | 31 | + <el-form |
| 32 | + :model="queryParams" | ||
| 33 | + ref="queryRef" | ||
| 34 | + :inline="true" | ||
| 35 | + v-show="showSearch" | ||
| 36 | + label-width="68px" | ||
| 37 | + > | ||
| 32 | <el-form-item label="用户名称" prop="userName"> | 38 | <el-form-item label="用户名称" prop="userName"> |
| 33 | <el-input | 39 | <el-input |
| 34 | v-model="queryParams.userName" | 40 | v-model="queryParams.userName" |
| @@ -62,7 +68,7 @@ | @@ -62,7 +68,7 @@ | ||
| 62 | /> | 68 | /> |
| 63 | </el-select> | 69 | </el-select> |
| 64 | </el-form-item> | 70 | </el-form-item> |
| 65 | - <el-form-item label="创建时间" style="width: 308px;"> | 71 | + <el-form-item label="创建时间" style="width: 308px"> |
| 66 | <el-date-picker | 72 | <el-date-picker |
| 67 | v-model="dateRange" | 73 | v-model="dateRange" |
| 68 | value-format="YYYY-MM-DD" | 74 | value-format="YYYY-MM-DD" |
| @@ -73,7 +79,9 @@ | @@ -73,7 +79,9 @@ | ||
| 73 | ></el-date-picker> | 79 | ></el-date-picker> |
| 74 | </el-form-item> | 80 | </el-form-item> |
| 75 | <el-form-item> | 81 | <el-form-item> |
| 76 | - <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button> | 82 | + <el-button type="primary" icon="Search" @click="handleQuery" |
| 83 | + >搜索</el-button | ||
| 84 | + > | ||
| 77 | <el-button icon="Refresh" @click="resetQuery">重置</el-button> | 85 | <el-button icon="Refresh" @click="resetQuery">重置</el-button> |
| 78 | </el-form-item> | 86 | </el-form-item> |
| 79 | </el-form> | 87 | </el-form> |
| @@ -86,7 +94,8 @@ | @@ -86,7 +94,8 @@ | ||
| 86 | icon="Plus" | 94 | icon="Plus" |
| 87 | @click="handleAdd" | 95 | @click="handleAdd" |
| 88 | v-hasPermi="['system:user:add']" | 96 | v-hasPermi="['system:user:add']" |
| 89 | - >新增</el-button> | 97 | + >新增</el-button |
| 98 | + > | ||
| 90 | </el-col> | 99 | </el-col> |
| 91 | <el-col :span="1.5"> | 100 | <el-col :span="1.5"> |
| 92 | <el-button | 101 | <el-button |
| @@ -96,7 +105,8 @@ | @@ -96,7 +105,8 @@ | ||
| 96 | :disabled="single" | 105 | :disabled="single" |
| 97 | @click="handleUpdate" | 106 | @click="handleUpdate" |
| 98 | v-hasPermi="['system:user:edit']" | 107 | v-hasPermi="['system:user:edit']" |
| 99 | - >修改</el-button> | 108 | + >修改</el-button |
| 109 | + > | ||
| 100 | </el-col> | 110 | </el-col> |
| 101 | <el-col :span="1.5"> | 111 | <el-col :span="1.5"> |
| 102 | <el-button | 112 | <el-button |
| @@ -106,7 +116,8 @@ | @@ -106,7 +116,8 @@ | ||
| 106 | :disabled="multiple" | 116 | :disabled="multiple" |
| 107 | @click="handleDelete" | 117 | @click="handleDelete" |
| 108 | v-hasPermi="['system:user:remove']" | 118 | v-hasPermi="['system:user:remove']" |
| 109 | - >删除</el-button> | 119 | + >删除</el-button |
| 120 | + > | ||
| 110 | </el-col> | 121 | </el-col> |
| 111 | <el-col :span="1.5"> | 122 | <el-col :span="1.5"> |
| 112 | <el-button | 123 | <el-button |
| @@ -115,7 +126,8 @@ | @@ -115,7 +126,8 @@ | ||
| 115 | icon="Upload" | 126 | icon="Upload" |
| 116 | @click="handleImport" | 127 | @click="handleImport" |
| 117 | v-hasPermi="['system:user:import']" | 128 | v-hasPermi="['system:user:import']" |
| 118 | - >导入</el-button> | 129 | + >导入</el-button |
| 130 | + > | ||
| 119 | </el-col> | 131 | </el-col> |
| 120 | <el-col :span="1.5"> | 132 | <el-col :span="1.5"> |
| 121 | <el-button | 133 | <el-button |
| @@ -124,19 +136,67 @@ | @@ -124,19 +136,67 @@ | ||
| 124 | icon="Download" | 136 | icon="Download" |
| 125 | @click="handleExport" | 137 | @click="handleExport" |
| 126 | v-hasPermi="['system:user:export']" | 138 | v-hasPermi="['system:user:export']" |
| 127 | - >导出</el-button> | 139 | + >导出</el-button |
| 140 | + > | ||
| 128 | </el-col> | 141 | </el-col> |
| 129 | - <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | 142 | + <right-toolbar |
| 143 | + v-model:showSearch="showSearch" | ||
| 144 | + @queryTable="getList" | ||
| 145 | + :columns="columns" | ||
| 146 | + ></right-toolbar> | ||
| 130 | </el-row> | 147 | </el-row> |
| 131 | 148 | ||
| 132 | - <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange"> | 149 | + <el-table |
| 150 | + v-loading="loading" | ||
| 151 | + :data="userList" | ||
| 152 | + @selection-change="handleSelectionChange" | ||
| 153 | + > | ||
| 133 | <el-table-column type="selection" width="50" align="center" /> | 154 | <el-table-column type="selection" width="50" align="center" /> |
| 134 | - <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> | ||
| 135 | - <el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" /> | ||
| 136 | - <el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" /> | ||
| 137 | - <el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" /> | ||
| 138 | - <el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" /> | ||
| 139 | - <el-table-column label="状态" align="center" key="status" v-if="columns[5].visible"> | 155 | + <el-table-column |
| 156 | + label="用户编号" | ||
| 157 | + align="center" | ||
| 158 | + key="userId" | ||
| 159 | + prop="userId" | ||
| 160 | + v-if="columns[0].visible" | ||
| 161 | + /> | ||
| 162 | + <el-table-column | ||
| 163 | + label="用户名称" | ||
| 164 | + align="center" | ||
| 165 | + key="userName" | ||
| 166 | + prop="userName" | ||
| 167 | + v-if="columns[1].visible" | ||
| 168 | + :show-overflow-tooltip="true" | ||
| 169 | + /> | ||
| 170 | + <el-table-column | ||
| 171 | + label="用户昵称" | ||
| 172 | + align="center" | ||
| 173 | + key="nickName" | ||
| 174 | + prop="nickName" | ||
| 175 | + v-if="columns[2].visible" | ||
| 176 | + :show-overflow-tooltip="true" | ||
| 177 | + /> | ||
| 178 | + <el-table-column | ||
| 179 | + label="部门" | ||
| 180 | + align="center" | ||
| 181 | + key="deptName" | ||
| 182 | + prop="dept.deptName" | ||
| 183 | + v-if="columns[3].visible" | ||
| 184 | + :show-overflow-tooltip="true" | ||
| 185 | + /> | ||
| 186 | + <el-table-column | ||
| 187 | + label="手机号码" | ||
| 188 | + align="center" | ||
| 189 | + key="phonenumber" | ||
| 190 | + prop="phonenumber" | ||
| 191 | + v-if="columns[4].visible" | ||
| 192 | + width="120" | ||
| 193 | + /> | ||
| 194 | + <el-table-column | ||
| 195 | + label="状态" | ||
| 196 | + align="center" | ||
| 197 | + key="status" | ||
| 198 | + v-if="columns[5].visible" | ||
| 199 | + > | ||
| 140 | <template #default="scope"> | 200 | <template #default="scope"> |
| 141 | <el-switch | 201 | <el-switch |
| 142 | v-model="scope.row.status" | 202 | v-model="scope.row.status" |
| @@ -146,24 +206,75 @@ | @@ -146,24 +206,75 @@ | ||
| 146 | ></el-switch> | 206 | ></el-switch> |
| 147 | </template> | 207 | </template> |
| 148 | </el-table-column> | 208 | </el-table-column> |
| 149 | - <el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[6].visible" width="160"> | 209 | + <el-table-column |
| 210 | + label="创建时间" | ||
| 211 | + align="center" | ||
| 212 | + prop="createTime" | ||
| 213 | + v-if="columns[6].visible" | ||
| 214 | + width="160" | ||
| 215 | + > | ||
| 150 | <template #default="scope"> | 216 | <template #default="scope"> |
| 151 | <span>{{ parseTime(scope.row.createTime) }}</span> | 217 | <span>{{ parseTime(scope.row.createTime) }}</span> |
| 152 | </template> | 218 | </template> |
| 153 | </el-table-column> | 219 | </el-table-column> |
| 154 | - <el-table-column label="操作" align="center" width="150" class-name="small-padding fixed-width"> | 220 | + <el-table-column |
| 221 | + label="操作" | ||
| 222 | + align="center" | ||
| 223 | + width="150" | ||
| 224 | + class-name="small-padding fixed-width" | ||
| 225 | + > | ||
| 155 | <template #default="scope"> | 226 | <template #default="scope"> |
| 156 | - <el-tooltip content="修改" placement="top" v-if="scope.row.userId !== 1"> | ||
| 157 | - <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']"></el-button> | 227 | + <el-tooltip |
| 228 | + content="修改" | ||
| 229 | + placement="top" | ||
| 230 | + v-if="scope.row.userId !== 1" | ||
| 231 | + > | ||
| 232 | + <el-button | ||
| 233 | + link | ||
| 234 | + type="primary" | ||
| 235 | + icon="Edit" | ||
| 236 | + @click="handleUpdate(scope.row)" | ||
| 237 | + v-hasPermi="['system:user:edit']" | ||
| 238 | + ></el-button> | ||
| 158 | </el-tooltip> | 239 | </el-tooltip> |
| 159 | - <el-tooltip content="删除" placement="top" v-if="scope.row.userId !== 1"> | ||
| 160 | - <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']"></el-button> | 240 | + <el-tooltip |
| 241 | + content="删除" | ||
| 242 | + placement="top" | ||
| 243 | + v-if="scope.row.userId !== 1" | ||
| 244 | + > | ||
| 245 | + <el-button | ||
| 246 | + link | ||
| 247 | + type="primary" | ||
| 248 | + icon="Delete" | ||
| 249 | + @click="handleDelete(scope.row)" | ||
| 250 | + v-hasPermi="['system:user:remove']" | ||
| 251 | + ></el-button> | ||
| 161 | </el-tooltip> | 252 | </el-tooltip> |
| 162 | - <el-tooltip content="重置密码" placement="top" v-if="scope.row.userId !== 1"> | ||
| 163 | - <el-button link type="primary" icon="Key" @click="handleResetPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button> | 253 | + <el-tooltip |
| 254 | + content="重置密码" | ||
| 255 | + placement="top" | ||
| 256 | + v-if="scope.row.userId !== 1" | ||
| 257 | + > | ||
| 258 | + <el-button | ||
| 259 | + link | ||
| 260 | + type="primary" | ||
| 261 | + icon="Key" | ||
| 262 | + @click="handleResetPwd(scope.row)" | ||
| 263 | + v-hasPermi="['system:user:resetPwd']" | ||
| 264 | + ></el-button> | ||
| 164 | </el-tooltip> | 265 | </el-tooltip> |
| 165 | - <el-tooltip content="分配角色" placement="top" v-if="scope.row.userId !== 1"> | ||
| 166 | - <el-button link type="primary" icon="CircleCheck" @click="handleAuthRole(scope.row)" v-hasPermi="['system:user:edit']"></el-button> | 266 | + <el-tooltip |
| 267 | + content="分配角色" | ||
| 268 | + placement="top" | ||
| 269 | + v-if="scope.row.userId !== 1" | ||
| 270 | + > | ||
| 271 | + <el-button | ||
| 272 | + link | ||
| 273 | + type="primary" | ||
| 274 | + icon="CircleCheck" | ||
| 275 | + @click="handleAuthRole(scope.row)" | ||
| 276 | + v-hasPermi="['system:user:edit']" | ||
| 277 | + ></el-button> | ||
| 167 | </el-tooltip> | 278 | </el-tooltip> |
| 168 | </template> | 279 | </template> |
| 169 | </el-table-column> | 280 | </el-table-column> |
| @@ -184,7 +295,11 @@ | @@ -184,7 +295,11 @@ | ||
| 184 | <el-row> | 295 | <el-row> |
| 185 | <el-col :span="12"> | 296 | <el-col :span="12"> |
| 186 | <el-form-item label="用户昵称" prop="nickName"> | 297 | <el-form-item label="用户昵称" prop="nickName"> |
| 187 | - <el-input v-model="form.nickName" placeholder="请输入用户昵称" maxlength="30" /> | 298 | + <el-input |
| 299 | + v-model="form.nickName" | ||
| 300 | + placeholder="请输入用户昵称" | ||
| 301 | + maxlength="30" | ||
| 302 | + /> | ||
| 188 | </el-form-item> | 303 | </el-form-item> |
| 189 | </el-col> | 304 | </el-col> |
| 190 | <el-col :span="12"> | 305 | <el-col :span="12"> |
| @@ -203,24 +318,50 @@ | @@ -203,24 +318,50 @@ | ||
| 203 | <el-row> | 318 | <el-row> |
| 204 | <el-col :span="12"> | 319 | <el-col :span="12"> |
| 205 | <el-form-item label="手机号码" prop="phonenumber"> | 320 | <el-form-item label="手机号码" prop="phonenumber"> |
| 206 | - <el-input v-model="form.phonenumber" placeholder="请输入手机号码" maxlength="11" /> | 321 | + <el-input |
| 322 | + v-model="form.phonenumber" | ||
| 323 | + placeholder="请输入手机号码" | ||
| 324 | + maxlength="11" | ||
| 325 | + /> | ||
| 207 | </el-form-item> | 326 | </el-form-item> |
| 208 | </el-col> | 327 | </el-col> |
| 209 | <el-col :span="12"> | 328 | <el-col :span="12"> |
| 210 | <el-form-item label="邮箱" prop="email"> | 329 | <el-form-item label="邮箱" prop="email"> |
| 211 | - <el-input v-model="form.email" placeholder="请输入邮箱" maxlength="50" /> | 330 | + <el-input |
| 331 | + v-model="form.email" | ||
| 332 | + placeholder="请输入邮箱" | ||
| 333 | + maxlength="50" | ||
| 334 | + /> | ||
| 212 | </el-form-item> | 335 | </el-form-item> |
| 213 | </el-col> | 336 | </el-col> |
| 214 | </el-row> | 337 | </el-row> |
| 215 | <el-row> | 338 | <el-row> |
| 216 | <el-col :span="12"> | 339 | <el-col :span="12"> |
| 217 | - <el-form-item v-if="form.userId == undefined" label="用户名称" prop="userName"> | ||
| 218 | - <el-input v-model="form.userName" placeholder="请输入用户名称" maxlength="30" /> | 340 | + <el-form-item |
| 341 | + v-if="form.userId == undefined" | ||
| 342 | + label="用户名" | ||
| 343 | + prop="userName" | ||
| 344 | + > | ||
| 345 | + <el-input | ||
| 346 | + v-model="form.userName" | ||
| 347 | + placeholder="请填写用户名" | ||
| 348 | + maxlength="30" | ||
| 349 | + /> | ||
| 219 | </el-form-item> | 350 | </el-form-item> |
| 220 | </el-col> | 351 | </el-col> |
| 221 | <el-col :span="12"> | 352 | <el-col :span="12"> |
| 222 | - <el-form-item v-if="form.userId == undefined" label="用户密码" prop="password"> | ||
| 223 | - <el-input v-model="form.password" placeholder="请输入用户密码" type="password" maxlength="20" show-password /> | 353 | + <el-form-item |
| 354 | + v-if="form.userId == undefined" | ||
| 355 | + label="用户密码" | ||
| 356 | + prop="password" | ||
| 357 | + > | ||
| 358 | + <el-input | ||
| 359 | + v-model="form.password" | ||
| 360 | + placeholder="请输入用户密码" | ||
| 361 | + type="password" | ||
| 362 | + maxlength="20" | ||
| 363 | + show-password | ||
| 364 | + /> | ||
| 224 | </el-form-item> | 365 | </el-form-item> |
| 225 | </el-col> | 366 | </el-col> |
| 226 | </el-row> | 367 | </el-row> |
| @@ -244,7 +385,8 @@ | @@ -244,7 +385,8 @@ | ||
| 244 | v-for="dict in sys_normal_disable" | 385 | v-for="dict in sys_normal_disable" |
| 245 | :key="dict.value" | 386 | :key="dict.value" |
| 246 | :label="dict.value" | 387 | :label="dict.value" |
| 247 | - >{{ dict.label }}</el-radio> | 388 | + >{{ dict.label }}</el-radio |
| 389 | + > | ||
| 248 | </el-radio-group> | 390 | </el-radio-group> |
| 249 | </el-form-item> | 391 | </el-form-item> |
| 250 | </el-col> | 392 | </el-col> |
| @@ -280,7 +422,11 @@ | @@ -280,7 +422,11 @@ | ||
| 280 | <el-row> | 422 | <el-row> |
| 281 | <el-col :span="24"> | 423 | <el-col :span="24"> |
| 282 | <el-form-item label="备注"> | 424 | <el-form-item label="备注"> |
| 283 | - <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input> | 425 | + <el-input |
| 426 | + v-model="form.remark" | ||
| 427 | + type="textarea" | ||
| 428 | + placeholder="请输入内容" | ||
| 429 | + ></el-input> | ||
| 284 | </el-form-item> | 430 | </el-form-item> |
| 285 | </el-col> | 431 | </el-col> |
| 286 | </el-row> | 432 | </el-row> |
| @@ -294,7 +440,12 @@ | @@ -294,7 +440,12 @@ | ||
| 294 | </el-dialog> | 440 | </el-dialog> |
| 295 | 441 | ||
| 296 | <!-- 用户导入对话框 --> | 442 | <!-- 用户导入对话框 --> |
| 297 | - <el-dialog :title="upload.title" v-model="upload.open" width="400px" append-to-body> | 443 | + <el-dialog |
| 444 | + :title="upload.title" | ||
| 445 | + v-model="upload.open" | ||
| 446 | + width="400px" | ||
| 447 | + append-to-body | ||
| 448 | + > | ||
| 298 | <el-upload | 449 | <el-upload |
| 299 | ref="uploadRef" | 450 | ref="uploadRef" |
| 300 | :limit="1" | 451 | :limit="1" |
| @@ -312,10 +463,18 @@ | @@ -312,10 +463,18 @@ | ||
| 312 | <template #tip> | 463 | <template #tip> |
| 313 | <div class="el-upload__tip text-center"> | 464 | <div class="el-upload__tip text-center"> |
| 314 | <div class="el-upload__tip"> | 465 | <div class="el-upload__tip"> |
| 315 | - <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据 | 466 | + <el-checkbox |
| 467 | + v-model="upload.updateSupport" | ||
| 468 | + />是否更新已经存在的用户数据 | ||
| 316 | </div> | 469 | </div> |
| 317 | <span>仅允许导入xls、xlsx格式文件。</span> | 470 | <span>仅允许导入xls、xlsx格式文件。</span> |
| 318 | - <el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link> | 471 | + <el-link |
| 472 | + type="primary" | ||
| 473 | + :underline="false" | ||
| 474 | + style="font-size: 12px; vertical-align: baseline" | ||
| 475 | + @click="importTemplate" | ||
| 476 | + >下载模板</el-link | ||
| 477 | + > | ||
| 319 | </div> | 478 | </div> |
| 320 | </template> | 479 | </template> |
| 321 | </el-upload> | 480 | </el-upload> |
| @@ -331,11 +490,23 @@ | @@ -331,11 +490,23 @@ | ||
| 331 | 490 | ||
| 332 | <script setup name="User"> | 491 | <script setup name="User"> |
| 333 | import { getToken } from "@/utils/auth"; | 492 | import { getToken } from "@/utils/auth"; |
| 334 | -import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser, addUser, deptTreeSelect } from "@/api/system/user"; | 493 | +import { |
| 494 | + changeUserStatus, | ||
| 495 | + listUser, | ||
| 496 | + resetUserPwd, | ||
| 497 | + delUser, | ||
| 498 | + getUser, | ||
| 499 | + updateUser, | ||
| 500 | + addUser, | ||
| 501 | + deptTreeSelect, | ||
| 502 | +} from "@/api/system/user"; | ||
| 335 | 503 | ||
| 336 | const router = useRouter(); | 504 | const router = useRouter(); |
| 337 | const { proxy } = getCurrentInstance(); | 505 | const { proxy } = getCurrentInstance(); |
| 338 | -const { sys_normal_disable, sys_user_sex } = proxy.useDict("sys_normal_disable", "sys_user_sex"); | 506 | +const { sys_normal_disable, sys_user_sex } = proxy.useDict( |
| 507 | + "sys_normal_disable", | ||
| 508 | + "sys_user_sex" | ||
| 509 | +); | ||
| 339 | 510 | ||
| 340 | const userList = ref([]); | 511 | const userList = ref([]); |
| 341 | const open = ref(false); | 512 | const open = ref(false); |
| @@ -365,7 +536,7 @@ const upload = reactive({ | @@ -365,7 +536,7 @@ const upload = reactive({ | ||
| 365 | // 设置上传的请求头部 | 536 | // 设置上传的请求头部 |
| 366 | headers: { Authorization: "Bearer " + getToken() }, | 537 | headers: { Authorization: "Bearer " + getToken() }, |
| 367 | // 上传的地址 | 538 | // 上传的地址 |
| 368 | - url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData" | 539 | + url: import.meta.env.VITE_APP_BASE_API + "/system/user/importData", |
| 369 | }); | 540 | }); |
| 370 | // 列显隐信息 | 541 | // 列显隐信息 |
| 371 | const columns = ref([ | 542 | const columns = ref([ |
| @@ -375,7 +546,7 @@ const columns = ref([ | @@ -375,7 +546,7 @@ const columns = ref([ | ||
| 375 | { key: 3, label: `部门`, visible: true }, | 546 | { key: 3, label: `部门`, visible: true }, |
| 376 | { key: 4, label: `手机号码`, visible: true }, | 547 | { key: 4, label: `手机号码`, visible: true }, |
| 377 | { key: 5, label: `状态`, visible: true }, | 548 | { key: 5, label: `状态`, visible: true }, |
| 378 | - { key: 6, label: `创建时间`, visible: true } | 549 | + { key: 6, label: `创建时间`, visible: true }, |
| 379 | ]); | 550 | ]); |
| 380 | 551 | ||
| 381 | const data = reactive({ | 552 | const data = reactive({ |
| @@ -386,15 +557,45 @@ const data = reactive({ | @@ -386,15 +557,45 @@ const data = reactive({ | ||
| 386 | userName: undefined, | 557 | userName: undefined, |
| 387 | phonenumber: undefined, | 558 | phonenumber: undefined, |
| 388 | status: undefined, | 559 | status: undefined, |
| 389 | - deptId: undefined | 560 | + deptId: undefined, |
| 390 | }, | 561 | }, |
| 391 | rules: { | 562 | rules: { |
| 392 | - userName: [{ required: true, message: "用户名称不能为空", trigger: "blur" }, { min: 2, max: 20, message: "用户名称长度必须介于 2 和 20 之间", trigger: "blur" }], | ||
| 393 | - nickName: [{ required: true, message: "用户昵称不能为空", trigger: "blur" }], | ||
| 394 | - password: [{ required: true, message: "用户密码不能为空", trigger: "blur" }, { min: 5, max: 20, message: "用户密码长度必须介于 5 和 20 之间", trigger: "blur" }], | ||
| 395 | - email: [{ type: "email", message: "请输入正确的邮箱地址", trigger: ["blur", "change"] }], | ||
| 396 | - phonenumber: [{ pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, message: "请输入正确的手机号码", trigger: "blur" }] | ||
| 397 | - } | 563 | + userName: [ |
| 564 | + { required: true, message: "用户名称不能为空", trigger: "blur" }, | ||
| 565 | + { | ||
| 566 | + min: 2, | ||
| 567 | + max: 20, | ||
| 568 | + message: "用户名称长度必须介于 2 和 20 之间", | ||
| 569 | + trigger: "blur", | ||
| 570 | + }, | ||
| 571 | + ], | ||
| 572 | + nickName: [ | ||
| 573 | + { required: true, message: "用户昵称不能为空", trigger: "blur" }, | ||
| 574 | + ], | ||
| 575 | + password: [ | ||
| 576 | + { required: true, message: "用户密码不能为空", trigger: "blur" }, | ||
| 577 | + { | ||
| 578 | + min: 5, | ||
| 579 | + max: 20, | ||
| 580 | + message: "用户密码长度必须介于 5 和 20 之间", | ||
| 581 | + trigger: "blur", | ||
| 582 | + }, | ||
| 583 | + ], | ||
| 584 | + email: [ | ||
| 585 | + { | ||
| 586 | + type: "email", | ||
| 587 | + message: "请输入正确的邮箱地址", | ||
| 588 | + trigger: ["blur", "change"], | ||
| 589 | + }, | ||
| 590 | + ], | ||
| 591 | + phonenumber: [ | ||
| 592 | + { | ||
| 593 | + pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, | ||
| 594 | + message: "请输入正确的手机号码", | ||
| 595 | + trigger: "blur", | ||
| 596 | + }, | ||
| 597 | + ], | ||
| 598 | + }, | ||
| 398 | }); | 599 | }); |
| 399 | 600 | ||
| 400 | const { queryParams, form, rules } = toRefs(data); | 601 | const { queryParams, form, rules } = toRefs(data); |
| @@ -405,34 +606,36 @@ const filterNode = (value, data) => { | @@ -405,34 +606,36 @@ const filterNode = (value, data) => { | ||
| 405 | return data.label.indexOf(value) !== -1; | 606 | return data.label.indexOf(value) !== -1; |
| 406 | }; | 607 | }; |
| 407 | /** 根据名称筛选部门树 */ | 608 | /** 根据名称筛选部门树 */ |
| 408 | -watch(deptName, val => { | 609 | +watch(deptName, (val) => { |
| 409 | proxy.$refs["deptTreeRef"].filter(val); | 610 | proxy.$refs["deptTreeRef"].filter(val); |
| 410 | }); | 611 | }); |
| 411 | /** 查询部门下拉树结构 */ | 612 | /** 查询部门下拉树结构 */ |
| 412 | function getDeptTree() { | 613 | function getDeptTree() { |
| 413 | - deptTreeSelect().then(response => { | 614 | + deptTreeSelect().then((response) => { |
| 414 | deptOptions.value = response.data; | 615 | deptOptions.value = response.data; |
| 415 | }); | 616 | }); |
| 416 | -}; | 617 | +} |
| 417 | /** 查询用户列表 */ | 618 | /** 查询用户列表 */ |
| 418 | function getList() { | 619 | function getList() { |
| 419 | loading.value = true; | 620 | loading.value = true; |
| 420 | - listUser(proxy.addDateRange(queryParams.value, dateRange.value)).then(res => { | 621 | + listUser(proxy.addDateRange(queryParams.value, dateRange.value)).then( |
| 622 | + (res) => { | ||
| 421 | loading.value = false; | 623 | loading.value = false; |
| 422 | userList.value = res.rows; | 624 | userList.value = res.rows; |
| 423 | total.value = res.total; | 625 | total.value = res.total; |
| 424 | - }); | ||
| 425 | -}; | 626 | + } |
| 627 | + ); | ||
| 628 | +} | ||
| 426 | /** 节点单击事件 */ | 629 | /** 节点单击事件 */ |
| 427 | function handleNodeClick(data) { | 630 | function handleNodeClick(data) { |
| 428 | queryParams.value.deptId = data.id; | 631 | queryParams.value.deptId = data.id; |
| 429 | handleQuery(); | 632 | handleQuery(); |
| 430 | -}; | 633 | +} |
| 431 | /** 搜索按钮操作 */ | 634 | /** 搜索按钮操作 */ |
| 432 | function handleQuery() { | 635 | function handleQuery() { |
| 433 | queryParams.value.pageNum = 1; | 636 | queryParams.value.pageNum = 1; |
| 434 | getList(); | 637 | getList(); |
| 435 | -}; | 638 | +} |
| 436 | /** 重置按钮操作 */ | 639 | /** 重置按钮操作 */ |
| 437 | function resetQuery() { | 640 | function resetQuery() { |
| 438 | dateRange.value = []; | 641 | dateRange.value = []; |
| @@ -440,34 +643,46 @@ function resetQuery() { | @@ -440,34 +643,46 @@ function resetQuery() { | ||
| 440 | queryParams.value.deptId = undefined; | 643 | queryParams.value.deptId = undefined; |
| 441 | proxy.$refs.tree.setCurrentKey(null); | 644 | proxy.$refs.tree.setCurrentKey(null); |
| 442 | handleQuery(); | 645 | handleQuery(); |
| 443 | -}; | 646 | +} |
| 444 | /** 删除按钮操作 */ | 647 | /** 删除按钮操作 */ |
| 445 | function handleDelete(row) { | 648 | function handleDelete(row) { |
| 446 | const userIds = row.userId || ids.value; | 649 | const userIds = row.userId || ids.value; |
| 447 | - proxy.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function () { | 650 | + proxy.$modal |
| 651 | + .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?') | ||
| 652 | + .then(function () { | ||
| 448 | return delUser(userIds); | 653 | return delUser(userIds); |
| 449 | - }).then(() => { | 654 | + }) |
| 655 | + .then(() => { | ||
| 450 | getList(); | 656 | getList(); |
| 451 | proxy.$modal.msgSuccess("删除成功"); | 657 | proxy.$modal.msgSuccess("删除成功"); |
| 452 | - }).catch(() => {}); | ||
| 453 | -}; | 658 | + }) |
| 659 | + .catch(() => {}); | ||
| 660 | +} | ||
| 454 | /** 导出按钮操作 */ | 661 | /** 导出按钮操作 */ |
| 455 | function handleExport() { | 662 | function handleExport() { |
| 456 | - proxy.download("system/user/export", { | 663 | + proxy.download( |
| 664 | + "system/user/export", | ||
| 665 | + { | ||
| 457 | ...queryParams.value, | 666 | ...queryParams.value, |
| 458 | - },`user_${new Date().getTime()}.xlsx`); | ||
| 459 | -}; | 667 | + }, |
| 668 | + `user_${new Date().getTime()}.xlsx` | ||
| 669 | + ); | ||
| 670 | +} | ||
| 460 | /** 用户状态修改 */ | 671 | /** 用户状态修改 */ |
| 461 | function handleStatusChange(row) { | 672 | function handleStatusChange(row) { |
| 462 | let text = row.status === "0" ? "启用" : "停用"; | 673 | let text = row.status === "0" ? "启用" : "停用"; |
| 463 | - proxy.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function () { | 674 | + proxy.$modal |
| 675 | + .confirm('确认要"' + text + '""' + row.userName + '"用户吗?') | ||
| 676 | + .then(function () { | ||
| 464 | return changeUserStatus(row.userId, row.status); | 677 | return changeUserStatus(row.userId, row.status); |
| 465 | - }).then(() => { | 678 | + }) |
| 679 | + .then(() => { | ||
| 466 | proxy.$modal.msgSuccess(text + "成功"); | 680 | proxy.$modal.msgSuccess(text + "成功"); |
| 467 | - }).catch(function () { | 681 | + }) |
| 682 | + .catch(function () { | ||
| 468 | row.status = row.status === "0" ? "1" : "0"; | 683 | row.status = row.status === "0" ? "1" : "0"; |
| 469 | }); | 684 | }); |
| 470 | -}; | 685 | +} |
| 471 | /** 更多操作 */ | 686 | /** 更多操作 */ |
| 472 | function handleCommand(command, row) { | 687 | function handleCommand(command, row) { |
| 473 | switch (command) { | 688 | switch (command) { |
| @@ -480,42 +695,48 @@ function handleCommand(command, row) { | @@ -480,42 +695,48 @@ function handleCommand(command, row) { | ||
| 480 | default: | 695 | default: |
| 481 | break; | 696 | break; |
| 482 | } | 697 | } |
| 483 | -}; | 698 | +} |
| 484 | /** 跳转角色分配 */ | 699 | /** 跳转角色分配 */ |
| 485 | function handleAuthRole(row) { | 700 | function handleAuthRole(row) { |
| 486 | const userId = row.userId; | 701 | const userId = row.userId; |
| 487 | router.push("/system/user-auth/role/" + userId); | 702 | router.push("/system/user-auth/role/" + userId); |
| 488 | -}; | 703 | +} |
| 489 | /** 重置密码按钮操作 */ | 704 | /** 重置密码按钮操作 */ |
| 490 | function handleResetPwd(row) { | 705 | function handleResetPwd(row) { |
| 491 | - proxy.$prompt('请输入"' + row.userName + '"的新密码', "提示", { | 706 | + proxy |
| 707 | + .$prompt('请输入"' + row.userName + '"的新密码', "提示", { | ||
| 492 | confirmButtonText: "确定", | 708 | confirmButtonText: "确定", |
| 493 | cancelButtonText: "取消", | 709 | cancelButtonText: "取消", |
| 494 | closeOnClickModal: false, | 710 | closeOnClickModal: false, |
| 495 | inputPattern: /^.{5,20}$/, | 711 | inputPattern: /^.{5,20}$/, |
| 496 | inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", | 712 | inputErrorMessage: "用户密码长度必须介于 5 和 20 之间", |
| 497 | - }).then(({ value }) => { | ||
| 498 | - resetUserPwd(row.userId, value).then(response => { | 713 | + }) |
| 714 | + .then(({ value }) => { | ||
| 715 | + resetUserPwd(row.userId, value).then((response) => { | ||
| 499 | proxy.$modal.msgSuccess("修改成功,新密码是:" + value); | 716 | proxy.$modal.msgSuccess("修改成功,新密码是:" + value); |
| 500 | }); | 717 | }); |
| 501 | - }).catch(() => {}); | ||
| 502 | -}; | 718 | + }) |
| 719 | + .catch(() => {}); | ||
| 720 | +} | ||
| 503 | /** 选择条数 */ | 721 | /** 选择条数 */ |
| 504 | function handleSelectionChange(selection) { | 722 | function handleSelectionChange(selection) { |
| 505 | - ids.value = selection.map(item => item.userId); | 723 | + ids.value = selection.map((item) => item.userId); |
| 506 | single.value = selection.length != 1; | 724 | single.value = selection.length != 1; |
| 507 | multiple.value = !selection.length; | 725 | multiple.value = !selection.length; |
| 508 | -}; | 726 | +} |
| 509 | /** 导入按钮操作 */ | 727 | /** 导入按钮操作 */ |
| 510 | function handleImport() { | 728 | function handleImport() { |
| 511 | upload.title = "用户导入"; | 729 | upload.title = "用户导入"; |
| 512 | upload.open = true; | 730 | upload.open = true; |
| 513 | -}; | 731 | +} |
| 514 | /** 下载模板操作 */ | 732 | /** 下载模板操作 */ |
| 515 | function importTemplate() { | 733 | function importTemplate() { |
| 516 | - proxy.download("system/user/importTemplate", { | ||
| 517 | - }, `user_template_${new Date().getTime()}.xlsx`); | ||
| 518 | -}; | 734 | + proxy.download( |
| 735 | + "system/user/importTemplate", | ||
| 736 | + {}, | ||
| 737 | + `user_template_${new Date().getTime()}.xlsx` | ||
| 738 | + ); | ||
| 739 | +} | ||
| 519 | /**文件上传中处理 */ | 740 | /**文件上传中处理 */ |
| 520 | const handleFileUploadProgress = (event, file, fileList) => { | 741 | const handleFileUploadProgress = (event, file, fileList) => { |
| 521 | upload.isUploading = true; | 742 | upload.isUploading = true; |
| @@ -525,13 +746,19 @@ const handleFileSuccess = (response, file, fileList) => { | @@ -525,13 +746,19 @@ const handleFileSuccess = (response, file, fileList) => { | ||
| 525 | upload.open = false; | 746 | upload.open = false; |
| 526 | upload.isUploading = false; | 747 | upload.isUploading = false; |
| 527 | proxy.$refs["uploadRef"].handleRemove(file); | 748 | proxy.$refs["uploadRef"].handleRemove(file); |
| 528 | - proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true }); | 749 | + proxy.$alert( |
| 750 | + "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + | ||
| 751 | + response.msg + | ||
| 752 | + "</div>", | ||
| 753 | + "导入结果", | ||
| 754 | + { dangerouslyUseHTMLString: true } | ||
| 755 | + ); | ||
| 529 | getList(); | 756 | getList(); |
| 530 | }; | 757 | }; |
| 531 | /** 提交上传文件 */ | 758 | /** 提交上传文件 */ |
| 532 | function submitFileForm() { | 759 | function submitFileForm() { |
| 533 | proxy.$refs["uploadRef"].submit(); | 760 | proxy.$refs["uploadRef"].submit(); |
| 534 | -}; | 761 | +} |
| 535 | /** 重置操作表单 */ | 762 | /** 重置操作表单 */ |
| 536 | function reset() { | 763 | function reset() { |
| 537 | form.value = { | 764 | form.value = { |
| @@ -546,31 +773,31 @@ function reset() { | @@ -546,31 +773,31 @@ function reset() { | ||
| 546 | status: "0", | 773 | status: "0", |
| 547 | remark: undefined, | 774 | remark: undefined, |
| 548 | postIds: [], | 775 | postIds: [], |
| 549 | - roleIds: [] | 776 | + roleIds: [], |
| 550 | }; | 777 | }; |
| 551 | proxy.resetForm("userRef"); | 778 | proxy.resetForm("userRef"); |
| 552 | -}; | 779 | +} |
| 553 | /** 取消按钮 */ | 780 | /** 取消按钮 */ |
| 554 | function cancel() { | 781 | function cancel() { |
| 555 | open.value = false; | 782 | open.value = false; |
| 556 | reset(); | 783 | reset(); |
| 557 | -}; | 784 | +} |
| 558 | /** 新增按钮操作 */ | 785 | /** 新增按钮操作 */ |
| 559 | function handleAdd() { | 786 | function handleAdd() { |
| 560 | reset(); | 787 | reset(); |
| 561 | - getUser().then(response => { | 788 | + getUser().then((response) => { |
| 562 | postOptions.value = response.posts; | 789 | postOptions.value = response.posts; |
| 563 | roleOptions.value = response.roles; | 790 | roleOptions.value = response.roles; |
| 564 | open.value = true; | 791 | open.value = true; |
| 565 | title.value = "添加用户"; | 792 | title.value = "添加用户"; |
| 566 | form.value.password = initPassword.value; | 793 | form.value.password = initPassword.value; |
| 567 | }); | 794 | }); |
| 568 | -}; | 795 | +} |
| 569 | /** 修改按钮操作 */ | 796 | /** 修改按钮操作 */ |
| 570 | function handleUpdate(row) { | 797 | function handleUpdate(row) { |
| 571 | reset(); | 798 | reset(); |
| 572 | const userId = row.userId || ids.value; | 799 | const userId = row.userId || ids.value; |
| 573 | - getUser(userId).then(response => { | 800 | + getUser(userId).then((response) => { |
| 574 | form.value = response.data; | 801 | form.value = response.data; |
| 575 | postOptions.value = response.posts; | 802 | postOptions.value = response.posts; |
| 576 | roleOptions.value = response.roles; | 803 | roleOptions.value = response.roles; |
| @@ -580,19 +807,19 @@ function handleUpdate(row) { | @@ -580,19 +807,19 @@ function handleUpdate(row) { | ||
| 580 | title.value = "修改用户"; | 807 | title.value = "修改用户"; |
| 581 | form.password = ""; | 808 | form.password = ""; |
| 582 | }); | 809 | }); |
| 583 | -}; | 810 | +} |
| 584 | /** 提交按钮 */ | 811 | /** 提交按钮 */ |
| 585 | function submitForm() { | 812 | function submitForm() { |
| 586 | - proxy.$refs["userRef"].validate(valid => { | 813 | + proxy.$refs["userRef"].validate((valid) => { |
| 587 | if (valid) { | 814 | if (valid) { |
| 588 | if (form.value.userId != undefined) { | 815 | if (form.value.userId != undefined) { |
| 589 | - updateUser(form.value).then(response => { | 816 | + updateUser(form.value).then((response) => { |
| 590 | proxy.$modal.msgSuccess("修改成功"); | 817 | proxy.$modal.msgSuccess("修改成功"); |
| 591 | open.value = false; | 818 | open.value = false; |
| 592 | getList(); | 819 | getList(); |
| 593 | }); | 820 | }); |
| 594 | } else { | 821 | } else { |
| 595 | - addUser(form.value).then(response => { | 822 | + addUser(form.value).then((response) => { |
| 596 | proxy.$modal.msgSuccess("新增成功"); | 823 | proxy.$modal.msgSuccess("新增成功"); |
| 597 | open.value = false; | 824 | open.value = false; |
| 598 | getList(); | 825 | getList(); |
| @@ -600,7 +827,7 @@ function submitForm() { | @@ -600,7 +827,7 @@ function submitForm() { | ||
| 600 | } | 827 | } |
| 601 | } | 828 | } |
| 602 | }); | 829 | }); |
| 603 | -}; | 830 | +} |
| 604 | 831 | ||
| 605 | getDeptTree(); | 832 | getDeptTree(); |
| 606 | getList(); | 833 | getList(); |
-
请 注册 或 登录 后发表评论