| | |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <el-select v-model="queryForm.town" clearable filterable @change="changeArea('town')" > |
| | | <el-option |
| | | v-for="item in streetList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="basic_search"> |
| | | <el-select v-model="queryForm.community" clearable filterable> |
| | | <el-option |
| | | v-for="item in committeeList" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <!-- <div class="basic_search">--> |
| | | <!-- <el-select v-model="queryForm.town" clearable filterable @change="changeArea('town')" >--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in streetList"--> |
| | | <!-- :key="item.id"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.name"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="basic_search">--> |
| | | <!-- <el-select v-model="queryForm.community" clearable filterable>--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in committeeList"--> |
| | | <!-- :key="item.id"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.name"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </div>--> |
| | | </div> |
| | | <div class="table_content"> |
| | | <el-table |
| | |
| | | <el-table-column label="单位" prop="company" align="center" width="150" sortable="custom"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.company }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="级别" prop="unittype" align="center" width="150" sortable="custom"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.unittype == 1? '省级':(scope.row.unittype == 2 ? '市、州级' : '区、县级') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="办公电话" prop="phone" align="center" sortable="custom"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="管辖地区" prop="province" align="center" width="300" sortable="custom"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.province+'-'+scope.row.city+'-'+scope.row.area+'-'+scope.row.town+'-'+scope.row.community | parseGX}}</span> |
| | | <span>{{ scope.row.province+'-'+scope.row.city+'-'+scope.row.area | parseGX}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="更新时间" prop="lastmodifieddate" align="center" sortable="custom"> |
| | |
| | | <span>{{ scope.row.lastmodifieddate | parseTime('{y}-{m}-{d}') }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width"> |
| | | <el-table-column label="操作" align="center" width="180" class-name="small-padding fixed-width" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="showEditHandle(scope.row)">编辑</el-button> |
| | | <el-button v-show="userType != 3" :disabled="disableRole(scope.row)" type="text" align="center" @click="showAssignRole(scope.row)">分配角色</el-button> |
| | |
| | | /> |
| | | </div> |
| | | <el-dialog :title="dialogStatus==='create'?'新增':'编辑'" :visible.sync="dialogFormVisible" :modal-append-to-body="false" :close-on-click-modal="false" width="700px"> |
| | | <el-form ref="dataForm" :rules="dataFormRules" :model="dataForm" label-position="right" label-width="100px" style="margin-left:50px;width:500px;" element-loading-text="保存中..."> |
| | | <el-form ref="dataForm" :rules="dataFormRules" :model="dataForm" label-position="right" label-width="120px" style="margin-left:50px;width:500px;" element-loading-text="保存中..."> |
| | | <el-form-item label="用户名:" prop="username"> |
| | | <el-input v-model.trim="dataForm.username"/> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="统一社会信用代码:" prop="job"> |
| | | <el-input v-model.trim="dataForm.code"/> |
| | | </el-form-item> |
| | | <el-form-item label="管辖地区:"> |
| | | <el-form-item label="选择监管级别:" prop="unittype"> |
| | | <el-select v-model="dataForm.unittype" filterable placeholder="请选择级别"> |
| | | <el-option |
| | | v-for="item in unitTypeList" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管辖省份:" prop="province"> |
| | | <el-select v-model="dataForm.province" filterable placeholder="请选择省份" @change="resetCity"> |
| | | <el-option |
| | | v-for="item in provinceList" |
| | |
| | | :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管辖市州:" v-if="dataForm.unittype == 2 || dataForm.unittype == 3" prop="city"> |
| | | <el-select v-model="dataForm.city" placeholder="请选择城市" @change="resetArea"> |
| | | <el-option |
| | | v-for="item in cityList" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="管辖区县:" v-if="dataForm.unittype == 3" prop="area"> |
| | | <el-select v-model="dataForm.area" placeholder="请选择区县" @change="resetTown"> |
| | | <el-option |
| | | v-for="item in areaList" |
| | |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-select v-model="dataForm.town" placeholder="请选择街道" @change="resetCommunity"> |
| | | <el-option |
| | | v-for="item in townList" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | <el-select v-model="dataForm.community" placeholder="请选择社区"> |
| | | <el-option |
| | | v-for="item in communityList" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-select v-model="dataForm.town" placeholder="请选择街道" @change="resetCommunity">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in townList"--> |
| | | <!-- :key="item.name"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.name"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- <el-select v-model="dataForm.community" placeholder="请选择社区">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in communityList"--> |
| | | <!-- :key="item.name"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.name"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <el-form-item label="用户类型:" prop="type"> |
| | | <el-select v-model.trim="dataForm.type" placeholder="请选择用户类型" auto-complete="on" style="width:100%;"> |
| | | <el-option v-show="userType != 3" :value="2" label="管理员"/> |
| | |
| | | for (let i = 0; i < arr.length; i++){ |
| | | if (arr[i] == null || arr[i] == '' || arr[i] == 'null'){ |
| | | if (i == 0){ |
| | | guanxia = '全部省份'; |
| | | guanxia = ''; |
| | | } |
| | | if (i == 1){ |
| | | guanxia += '-全部城市'; |
| | | guanxia += ''; |
| | | } |
| | | if (i == 2){ |
| | | guanxia += '-全部区县'; |
| | | } |
| | | if (i == 3){ |
| | | guanxia += '-全部街道'; |
| | | } |
| | | if (i == 4){ |
| | | guanxia += '-全部居委会'; |
| | | guanxia += ''; |
| | | } |
| | | }else { |
| | | if (i == 0){ |
| | |
| | | currentPage: 1, |
| | | pageTotal: 0, |
| | | tableKey: 0, |
| | | unittype: null, |
| | | userData: null, |
| | | listLoading: true, |
| | | queryForm: { |
| | |
| | | job:'', |
| | | province:'', |
| | | city:'', |
| | | area:'', |
| | | town:'', |
| | | community:'', |
| | | area:'' |
| | | }, |
| | | dataForm: { |
| | | id: '', |
| | |
| | | province: '', |
| | | city: '', |
| | | area: '', |
| | | town: '', |
| | | community: '', |
| | | type:'', |
| | | job:'', |
| | | code:'', |
| | | unittype: null |
| | | }, |
| | | importDialogFormVisible: false, |
| | | importDialogFormVisible2: false, |
| | |
| | | email: [{ validator: validateEmail, trigger: 'blur' }], |
| | | password: [{ required: true, message: '密码不能为空', trigger: 'blur' }], |
| | | confirmPassword: [{ required: true, message: '确认密码不能为空', trigger: 'blur' }], |
| | | type: [{ required: true, message: '用户类型不能为空', trigger: 'blur' }] |
| | | type: [{ required: true, message: '用户类型不能为空', trigger: 'blur' }], |
| | | unittype: [{ required: true, message: '监管级别不能为空', trigger: 'blur' }], |
| | | province: [{ required: true, message: '请选择管辖范围', trigger: 'blur' }], |
| | | city: [{ required: true, message: '请选择管辖范围', trigger: 'blur' }], |
| | | area: [{ required: true, message: '请选择管辖范围', trigger: 'blur' }] |
| | | }, |
| | | unitTypeList:[ |
| | | { |
| | | name: '省级', |
| | | value: 1 |
| | | }, |
| | | { |
| | | name: '市、州级', |
| | | value: 2 |
| | | }, |
| | | { |
| | | name: '区、县级', |
| | | value: 3 |
| | | } |
| | | ], |
| | | provinceList:[], |
| | | cityList:[], |
| | | areaList:[], |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.userType) |
| | | this.getUserList() |
| | | this.getProvince() |
| | | }, |
| | |
| | | if (_this.dataForm.password != _this.dataForm.confirmPassword) { |
| | | parseError({ error: '密码输入不一致', vm: _this }) |
| | | return |
| | | } |
| | | if(_this.dataForm.unittype == 1){ |
| | | _this.dataForm.city = '' |
| | | _this.dataForm.area = '' |
| | | } |
| | | if(_this.dataForm.unittype == 2){ |
| | | _this.dataForm.area = '' |
| | | } |
| | | const userName = Cookies.get('userName') |
| | | _this.dataForm['operator'] = userName |
| | |
| | | province: '', |
| | | city: '', |
| | | area: '', |
| | | town: '', |
| | | community: '', |
| | | type: '', |
| | | unittype: null, |
| | | job: '' |
| | | } |
| | | this.cityList = [] |
| | |
| | | parseError({ error: '密码输入不一致', vm: _this }) |
| | | return |
| | | } |
| | | } |
| | | if(_this.dataForm.unittype == 1){ |
| | | _this.dataForm.city = '' |
| | | _this.dataForm.area = '' |
| | | } |
| | | if(_this.dataForm.unittype == 2){ |
| | | _this.dataForm.area = '' |
| | | } |
| | | const userName = Cookies.get('userName') |
| | | _this.dataForm['lastmodifiedby'] = userName |
| | |
| | | this.dataForm.province = row.province |
| | | this.dataForm.city = row.city |
| | | this.dataForm.area = row.area |
| | | this.dataForm.town = row.town |
| | | this.dataForm.community = row.community |
| | | this.dataForm.job = row.job |
| | | this.dataForm.type = row.type |
| | | this.dataForm.unittype = row.unittype |
| | | this.dialogFormVisible = true |
| | | this.$nextTick(() => { |
| | | this.$refs['dataForm'].clearValidate() |
| | |
| | | params['province'] = row.province |
| | | params['city'] = row.city |
| | | params['area'] = row.area |
| | | params['town'] = row.town |
| | | params['community'] = row.community |
| | | getDistrictByName(params).then(response => { |
| | | const res = response.data |
| | | if (res.code == 200){ |
| | | this.provinceList = res.result.provinceList; |
| | | this.cityList = res.result.cityList; |
| | | this.areaList = res.result.areaList; |
| | | this.townList = res.result.townList; |
| | | this.communityList = res.result.communityList; |
| | | } else { |
| | | parseError({ error: res.message, vm: _this }) |
| | | } |