监理单位管理页面优化
This commit is contained in:
parent
5fb0b44b28
commit
de3a1dd6ed
|
|
@ -46,7 +46,7 @@
|
|||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange" >
|
||||
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
type="index"
|
||||
|
|
@ -66,13 +66,12 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="社会统一征信代码" show-overflow-tooltip align="center" prop="socialUnifiedCreditCode" />
|
||||
<el-table-column label="总监" show-overflow-tooltip align="center" prop="userNum" >
|
||||
<el-table-column label="总监" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-tooltip class="item" effect="dark" prop="userNum" placement="top">
|
||||
<div @click="onHandleDirector(scope.row)">{{ scope.row.userNum }}</div>
|
||||
</el-tooltip>
|
||||
<div style="color: #409eff; cursor: pointer" @click="onHandleDirector(scope.row)">
|
||||
{{ scope.row.userNum }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -246,7 +245,9 @@
|
|||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button size="mini" type="primary" plain @click="onHandleEdit(row)">编辑</el-button>
|
||||
<el-button size="mini" type="danger" plain @click="onHandleDelete(row)" >删除</el-button>
|
||||
<el-button v-if="row.status == 0" size="mini" type="danger" plain @click="onHandleDelete(row)">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -259,7 +260,13 @@
|
|||
/>
|
||||
|
||||
<!-- 内层弹框 -->
|
||||
<el-dialog width="40%" :title="`${directorInnerTitle}总监`" :visible.sync="directorInnerVisible" append-to-body>
|
||||
<el-dialog
|
||||
width="40%"
|
||||
append-to-body
|
||||
:before-close="onHandleCancel"
|
||||
:title="`${directorInnerTitle}总监`"
|
||||
:visible.sync="directorInnerVisible"
|
||||
>
|
||||
<el-form
|
||||
size="small"
|
||||
label-width="120px"
|
||||
|
|
@ -271,12 +278,21 @@
|
|||
<el-input placeholder="请输入" v-model="directorAddForm.directorsName" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item prop="directorsIdCard" label="总监身份证">
|
||||
<el-input placeholder="请输入" v-model="directorAddForm.directorsIdCard" clearable />
|
||||
<el-input
|
||||
clearable
|
||||
placeholder="请输入"
|
||||
v-model="directorAddForm.directorsIdCard"
|
||||
:disabled="directorInnerTitle === '编辑'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item prop="directorsPhone" label="总监联系方式">
|
||||
<el-input placeholder="请输入" v-model="directorAddForm.directorsPhone" clearable />
|
||||
<el-input
|
||||
clearable
|
||||
placeholder="请输入"
|
||||
v-model="directorAddForm.directorsPhone"
|
||||
:disabled="directorInnerTitle === '编辑'"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
<el-row style="text-align: right">
|
||||
|
|
@ -414,7 +430,7 @@ export default {
|
|||
directorInnerTitle: '新增',
|
||||
// 查询参数
|
||||
directorQueryParams: {
|
||||
unitId:'',
|
||||
unitId: '',
|
||||
directorsName: '', // 姓名
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
|
|
@ -427,10 +443,10 @@ export default {
|
|||
directorAddForm: {
|
||||
directorsName: '',
|
||||
directorsPhone: '',
|
||||
directorsIdCard:'',
|
||||
commUserId:'',
|
||||
supId:'',
|
||||
jlId:'',
|
||||
directorsIdCard: '',
|
||||
commUserId: '',
|
||||
supId: '',
|
||||
jlId: '',
|
||||
},
|
||||
// 新增总监 rules
|
||||
directorAddFormRules: {
|
||||
|
|
@ -464,8 +480,8 @@ export default {
|
|||
{
|
||||
// 身份证号码的正则表达式
|
||||
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
||||
message: "请输入正确的身份证号码",
|
||||
trigger: "blur"
|
||||
message: '请输入正确的身份证号码',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
@ -492,7 +508,7 @@ export default {
|
|||
this.supervisorFormOpen = false
|
||||
this.unitResetForm()
|
||||
},
|
||||
openUserInfo(){
|
||||
openUserInfo() {
|
||||
this.directorOuterVisible = true
|
||||
},
|
||||
// 表单重置
|
||||
|
|
@ -658,15 +674,15 @@ export default {
|
|||
// 点击列表总监数量时打开弹框
|
||||
onHandleDirector(row) {
|
||||
console.log('row当前行信息', row)
|
||||
this.directorQueryParams.unitId=row.supId;
|
||||
this.directorQueryParams.unitId = row.supId
|
||||
this.onHandleQueryDirectorList()
|
||||
this.directorOuterVisible = true
|
||||
},
|
||||
// 查询弹框内总监列表
|
||||
async onHandleQueryDirectorList() {
|
||||
const res = await getDirectorListApi(this.directorQueryParams)
|
||||
this.directorList=res.rows;
|
||||
this.directorTotal=res.total;
|
||||
this.directorList = res.rows
|
||||
this.directorTotal = res.total
|
||||
console.log('总监数据列表', res)
|
||||
},
|
||||
// 新增总监按钮
|
||||
|
|
@ -679,13 +695,12 @@ export default {
|
|||
},
|
||||
// 列表编辑按钮
|
||||
onHandleEdit(row) {
|
||||
|
||||
this.directorInnerTitle = '编辑'
|
||||
this.directorAddForm.directorsName = row.directorsName;
|
||||
this.directorAddForm.directorsPhone = row.directorsPhone;
|
||||
this.directorAddForm.directorsIdCard = row.commUserCode;
|
||||
this.directorAddForm.commUserId = row.commUserId;
|
||||
this.directorAddForm.supId = row.supId;
|
||||
this.directorAddForm.directorsName = row.directorsName
|
||||
this.directorAddForm.directorsPhone = row.directorsPhone
|
||||
this.directorAddForm.directorsIdCard = row.commUserCode
|
||||
this.directorAddForm.commUserId = row.commUserId
|
||||
this.directorAddForm.supId = row.supId
|
||||
this.directorInnerVisible = true
|
||||
console.log('row当前行信息', row)
|
||||
},
|
||||
|
|
@ -716,7 +731,7 @@ export default {
|
|||
if (valid) {
|
||||
// 校验通过
|
||||
console.log('this.directorAddForm新增总监提交参数', this.directorAddForm)
|
||||
this.directorAddForm.jlId= this.directorQueryParams.unitId;
|
||||
this.directorAddForm.jlId = this.directorQueryParams.unitId
|
||||
// 根据弹框标题判断当前是新增还是修改
|
||||
const SEND_API = this.directorInnerTitle === '新增' ? addDirectorInfoApi : editDirectorInfoApi
|
||||
const res = await SEND_API(this.directorAddForm)
|
||||
|
|
|
|||
|
|
@ -38,10 +38,10 @@ module.exports = {
|
|||
// target: `http://localhost:18080`,
|
||||
// target: 'http://192.168.0.176:18080',
|
||||
// target: 'http://192.168.0.58:19090', // 杰
|
||||
// target: 'http://192.168.0.14:18080', // 测试环境
|
||||
target: 'http://192.168.0.14:18080', // 测试环境
|
||||
// target: 'http://218.21.27.6:1999/prod-api', // 生产环境
|
||||
// target: 'http://192.168.0.38:18080', // 郝志权
|
||||
target: 'http://192.168.2.122:18080', // 梁超
|
||||
// target: 'http://192.168.2.122:18080', // 梁超
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: '',
|
||||
|
|
|
|||
Loading…
Reference in New Issue