|
@@ -67,16 +67,34 @@
|
|
|
</div>
|
|
|
<!--新密码 end------------------------------------------>
|
|
|
</div>
|
|
|
- <el-form-item label="行政级别:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
- <el-input autocomplete="off" placeholder="请输入企业名称.."></el-input>
|
|
|
+ <el-form-item label="行政区划:" class="custom-align-right" prop="city_arr_id" >
|
|
|
+ <CityCascader v-model="form.city_arr_id" @update-city-id="update_city_arr_id"></CityCascader>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <!-- {{ typeof form.department_arr_id }} {{ typeof form.department_id }} -->
|
|
|
+ <el-form-item label="行政职能:" class="custom-align-right" prop="department_arr_id" >
|
|
|
+ <el-cascader :key="department_id" v-model="form.department_arr_id" placeholder="请选择行政职能"
|
|
|
+ popper-class="my_cascader" :props="searchDepartmentData" filterable clearable></el-cascader>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- {{ form.administrative_unit_id}} -->
|
|
|
+ <el-form-item label="行政级别:" :label-width="formLabelWidth" prop="administrative_unit_id" class="custom-align-right">
|
|
|
+ <!-- <el-input v-model="form.business_name" autocomplete="off" placeholder="请输入企业名称.."></el-input> -->
|
|
|
+ <el-radio-group v-model="form.administrative_unit_id">
|
|
|
+ <!-- 注意:'checked' 不是 el-radio 的属性,其选中状态由 v-model 自动管理 -->
|
|
|
+ <el-radio :label="1">其他</el-radio>
|
|
|
+ <el-radio :label="2">局长</el-radio>
|
|
|
+ <el-radio :label="3">厅长</el-radio>
|
|
|
+ <el-radio :label="4">部长</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="单位名称:" :label-width="formLabelWidth" prop="business_name" class="custom-align-right">
|
|
|
<el-input v-model="form.business_name" autocomplete="off" placeholder="请输入单位名称.."></el-input>
|
|
|
</el-form-item>
|
|
|
+ <!-- {{ form.address_arr_id }} -->
|
|
|
<el-form-item label="详细地址:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<CityCascader v-model="form.address_arr_id" @update-city-id="update_address_arr_id"></CityCascader>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
+ <el-form-item :label-width="formLabelWidth" class="custom-align-right">
|
|
|
<el-input v-model="form.address" autocomplete="off" placeholder="请输入门牌号.."></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="负责人:" :label-width="formLabelWidth" prop="real_name" class="custom-align-right">
|
|
@@ -91,7 +109,7 @@
|
|
|
<el-form-item label="负责人身份证:" :label-width="formLabelWidth" prop="id_card" class="custom-align-right">
|
|
|
<el-input v-model="form.id_card" autocomplete="off" placeholder="请输入负责人身份证号.."></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="法人:" :label-width="formLabelWidth" prop="legal_person_real_name" class="custom-align-right">
|
|
|
+ <!-- <el-form-item label="法人:" :label-width="formLabelWidth" prop="legal_person_real_name" class="custom-align-right">
|
|
|
<el-input v-model="form.legal_person_real_name" autocomplete="off" placeholder="请输入法人姓名.."></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="法人电话:" :label-width="formLabelWidth" prop="legal_person_mobile" class="custom-align-right">
|
|
@@ -100,7 +118,7 @@
|
|
|
|
|
|
<el-form-item label="法人身份证:" :label-width="formLabelWidth" prop="legal_person_id_card" class="custom-align-right">
|
|
|
<el-input v-model="form.legal_person_id_card" autocomplete="off" placeholder="请输入法人身份证号.."></el-input>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
|
|
|
<el-form-item label="有效期:" :label-width="formLabelWidth" prop="" class="custom-align-right">
|
|
|
<el-date-picker
|
|
@@ -115,20 +133,16 @@
|
|
|
<el-checkbox v-model="form.long_time" :true-label="1" :false-label="0" class="longTimeCheckbox">无限期</el-checkbox>
|
|
|
</el-form-item>
|
|
|
|
|
|
-
|
|
|
+ <!-- {{ form.websiteTag_arr_id }} -->
|
|
|
|
|
|
<!-- <el-form-item label="站点标识:" :label-width="formLabelWidth" prop="city_arr_id" class="custom-align-right"> -->
|
|
|
<el-form-item label="站点标识:" :label-width="formLabelWidth" prop="websiteTag_arr_id" class="custom-align-right">
|
|
|
<!-- 级联选择器 xx-->
|
|
|
<!-- websiteTag_ -->
|
|
|
<!-- <el-cascader v-model="form.website_column_arr_id" :props="props_1" :options="website_column_arr" filterable clearable ></el-cascader> -->
|
|
|
-
|
|
|
- <el-cascader v-model="form.websiteTag_arr_id" :options="options_arr" filterable clearable></el-cascader>
|
|
|
+ <el-cascader v-model="form.websiteTag_arr_id" :options="options_arr" filterable ></el-cascader>
|
|
|
|
|
|
</el-form-item>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<el-form-item label="传真:" :label-width="formLabelWidth" prop="fax" class="custom-align-right">
|
|
|
<el-input v-model="form.fax" autocomplete="off" placeholder="请输入传真号码.."></el-input>
|
|
|
</el-form-item>
|
|
@@ -187,6 +201,7 @@
|
|
|
components: {
|
|
|
CityCascader, //城市级联选择器
|
|
|
},
|
|
|
+
|
|
|
data() {
|
|
|
// 配置验证规则:用于表单验证
|
|
|
const validatePassword = (rule, value, callback) => {
|
|
@@ -196,7 +211,8 @@
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
- const validateEmpty = (rule,value,callback) => {
|
|
|
+ const validateEmpty = (rule, value, callback) => {
|
|
|
+
|
|
|
if (!value || value.trim() === "") {
|
|
|
callback(new Error('该项不能为空!'));
|
|
|
} else {
|
|
@@ -210,6 +226,16 @@
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
+ const validateNumber = (rule, value, callback) => {
|
|
|
+ console.log(value, typeof value)
|
|
|
+ console.log(value >=0)
|
|
|
+ if (value < 0) {
|
|
|
+ callback(new Error('该项不能为空1'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let self = this;
|
|
|
return {
|
|
|
//xx
|
|
|
// options_arr:[ { "label": "农网", "value": 1, "pid": 0, "sort": 1, "remark": "农网栏目信息", "column_arr_id": null, "updated_at": "2024-06-19 23:58:52", "created_at": "2024-06-06 09:28:19", "children": [ { "label": "核心网站(行星)", "value": 3, "pid": 1, "sort": 1, "remark": "核心网站", "column_arr_id": null, "updated_at": "2024-06-19 23:58:52", "created_at": "2024-06-06 01:31:26" }, { "label": "重点网系(卫星)", "value": 4, "pid": 1, "sort": 1, "remark": "重点网系", "column_arr_id": null, "updated_at": "2024-06-19 23:58:52", "created_at": "2024-06-06 01:32:06" }, { "label": "垂直网系(卫星)", "value": 5, "pid": 1, "sort": 1, "remark": "垂直网系", "column_arr_id": null, "updated_at": "2024-06-19 23:58:52", "created_at": "2024-06-06 01:32:43" }, { "label": "频道网系(卫星)", "value": 6, "pid": 1, "sort": 1, "remark": "频道网系", "column_arr_id": null, "updated_at": "2024-06-19 23:58:52", "created_at": "2024-06-06 01:33:19" }, { "label": "地方网系(卫星)", "value": 7, "pid": 1, "sort": 1, "remark": "地方网系", "column_arr_id": null, "updated_at": "2024-06-19 23:58:52", "created_at": "2024-06-06 01:33:44" } ] } ],
|
|
@@ -243,7 +269,8 @@
|
|
|
id_card:"",//身份证号
|
|
|
mobile:"",//手机号
|
|
|
address_arr_id:[],//详细地址
|
|
|
- city_arr_id:[],//工作区域
|
|
|
+ city_arr_id: [],//工作区域
|
|
|
+ city_id:"",//工作区域id
|
|
|
from_time:"",//有效期开始时间
|
|
|
to_time:"",//有效期结束时间
|
|
|
long_time:0,//是否为长期 //长期1:长期 0:非长期
|
|
@@ -258,7 +285,14 @@
|
|
|
position:"",//负责人职务
|
|
|
legal_person_real_name:"",//法人姓名
|
|
|
legal_person_mobile:"",//法人手机号
|
|
|
- legal_person_id_card:"",//法人身份证号
|
|
|
+ legal_person_id_card: "",//法人身份证号
|
|
|
+ websiteTag_arr_id: 0,//站点标识
|
|
|
+ department_arr_id: [],//行政职能部门
|
|
|
+ department_id: 0,//部门最后一个数字
|
|
|
+ administrative_unit_id: 1,//行政级别
|
|
|
+ address: "",//详细地址
|
|
|
+ zip_code:"",//邮编
|
|
|
+
|
|
|
},
|
|
|
timeList:[],//时间段
|
|
|
otherList:[],//相关资料列表
|
|
@@ -268,13 +302,40 @@
|
|
|
capsTooltip2: false,
|
|
|
passwordType1: 'password',
|
|
|
passwordType2: 'password',
|
|
|
+ //行政职能部门
|
|
|
+ searchDepartmentKey: 0, //列表缓存key
|
|
|
+ searchDepartmentData: {
|
|
|
+ checkStrictly: true,
|
|
|
+ lazy: true,
|
|
|
+ async lazyLoad(node, resolve) {
|
|
|
+ const { level, data } = node;
|
|
|
+ if (data && data.children && data.children.length !== 0) {
|
|
|
+ return resolve(node)
|
|
|
+ }
|
|
|
+ console.log(level)
|
|
|
+ let parentId = level == 0 ? 0 : data.value
|
|
|
+ let parames = {
|
|
|
+ 'pid': parentId
|
|
|
+ }
|
|
|
+ self.$store.dispatch('pool/getDepartment', parames).then(res => {
|
|
|
+ if (res.data) {
|
|
|
+ const nodes = res.data.map(item => ({
|
|
|
+ value: item.id,
|
|
|
+ label: item.name,
|
|
|
+ leaf: level >= 3,
|
|
|
+ children: []
|
|
|
+ }))
|
|
|
+ resolve(nodes)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
//配置from表单验证规则
|
|
|
loginRules: {
|
|
|
|
|
|
- // 站点标识xx
|
|
|
- websiteTag_arr_id: [{ type:'array',required: true, trigger: 'blur', validator: validateArray }],
|
|
|
-
|
|
|
-
|
|
|
+ //站点标识xx
|
|
|
+ websiteTag_arr_id: [{ required: true, trigger: 'blur', validator: validateArray }],
|
|
|
//1.角色id
|
|
|
role_id: [{ required: true, trigger: 'blur', validator: validateArray }],
|
|
|
//2.登录账号
|
|
@@ -300,14 +361,19 @@
|
|
|
business_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
//12.负责人职务
|
|
|
position: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
- //12.法人姓名
|
|
|
- legal_person_real_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
- //13.法人电话
|
|
|
- legal_person_mobile: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
- //14.法人身份证号
|
|
|
- legal_person_id_card: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
+ // //12.法人姓名
|
|
|
+ // legal_person_real_name: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
+ // //13.法人电话
|
|
|
+ // legal_person_mobile: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
+ // //14.法人身份证号
|
|
|
+ // legal_person_id_card: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
//15.行政级别
|
|
|
administrative_unit_arr_id: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
+ //行政区划
|
|
|
+ city_arr_id: [{ required: true, trigger: 'blur', validator: validateArray }],
|
|
|
+ //行政职能
|
|
|
+ department_arr_id: [{ required: true, trigger: 'blur', validator: validateArray }],
|
|
|
+ administrative_unit_id: [{ required: false, trigger: 'blur', validator: validateNumber }],
|
|
|
},
|
|
|
//时间跨度
|
|
|
pickerOptions: {
|
|
@@ -317,6 +383,7 @@
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
+
|
|
|
},
|
|
|
methods: {
|
|
|
//1.表单收集 start ------------------------------------------------------------>
|
|
@@ -362,6 +429,11 @@
|
|
|
clearData(){
|
|
|
|
|
|
},
|
|
|
+ //1.4更新详细地址
|
|
|
+ update_city_arr_id(value) {
|
|
|
+ console.log("行政区划ID已更新:", value);
|
|
|
+ this.form.city_arr_id = value;
|
|
|
+ },
|
|
|
//表单收集 end ------------------------------------------------------------>
|
|
|
//2.提交表单 start ------------------------------------------------------------>
|
|
|
//2.3 多文件上传
|
|
@@ -417,10 +489,27 @@
|
|
|
//2.开始验证
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
- //3.验证用户是否已经存在
|
|
|
+ this.form.sszq = typeof this.form.websiteTag_arr_id == 'object' ? this.form.websiteTag_arr_id[0] : this.form.websiteTag_arr_id;
|
|
|
+ delete this.form.websiteTag_arr_id;
|
|
|
+
|
|
|
this.$store.dispatch('userMember/verifyUserInfo',{user_name:this.form.user_name}).then(res=>{
|
|
|
if(res.code==0){
|
|
|
+ console.log(this.form);
|
|
|
+ //数组转数字
|
|
|
+
|
|
|
+ this.form.department_id = this.form.department_arr_id[this.form.department_arr_id.length-1];
|
|
|
+ this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
|
|
|
+ this.form.city_arr_id = this.form.city_arr_id;
|
|
|
+ if(typeof this.form.address_arr_id == 'string'){
|
|
|
+ this.form.address_arr_id = JSON.parse(this.form.address_arr_id);
|
|
|
+ }
|
|
|
+ // this.form.address_id = this.form.address_arr_id[this.form.address_arr_id.length-1];
|
|
|
+ // this.form.address_arr_id = JSON.stringify(this.form.address_arr_id);
|
|
|
+ //2.设置修改的用户id
|
|
|
+ this.form.id = this.editId;
|
|
|
+ //3.提交用户修改
|
|
|
//如果code为0表示用户不存在,提交表单
|
|
|
+ console.log(this.form ,'---------------------1-------');
|
|
|
this.$store.dispatch('userMember/createUser',this.form).then(res=>{
|
|
|
if(res.code==200){
|
|
|
console.log(res);
|
|
@@ -473,6 +562,13 @@
|
|
|
this.form.legal_person_real_name = res.data.legal_person_real_name;
|
|
|
this.form.position = res.data.position;
|
|
|
this.form.business_name = res.data.business_name;
|
|
|
+ this.form.websiteTag_arr_id = [parseInt(res.data.sszq)];
|
|
|
+ this.form.city_arr_id = JSON.parse( res.data.city_arr_id);
|
|
|
+ this.form.department_arr_id = JSON.parse(res.data.department_arr_id);
|
|
|
+ this.form.city_id = res.data.city_id;
|
|
|
+ this.form.administrative_unit_id = res.data.administrative_unit_id;
|
|
|
+ this.form.address = res.data.address;
|
|
|
+ this.form.department_id = res.data.department_id;
|
|
|
//还原有效期
|
|
|
if(res.data.long_time==0){
|
|
|
this.timeList = [
|
|
@@ -523,15 +619,26 @@
|
|
|
//2.提交修改的数据
|
|
|
this.$refs.form.validate(valid => {
|
|
|
if (valid) {
|
|
|
+ this.form.sszq = typeof this.form.websiteTag_arr_id == 'object' ? this.form.websiteTag_arr_id[0] : this.form.websiteTag_arr_id;
|
|
|
+ delete this.form.websiteTag_arr_id;
|
|
|
//1.验证用户是否存在
|
|
|
this.$store.dispatch('userMember/verifyUserInfo',{id:this.editId,user_name:this.form.user_name}).then(res=>{
|
|
|
if(res.code==0){
|
|
|
console.log(this.form);
|
|
|
- this.form.address_arr_id = JSON.parse(this.form.address_arr_id);
|
|
|
+ //数组转数字
|
|
|
+ this.form.department_id = this.form.department_arr_id[this.form.department_arr_id.length-1];
|
|
|
+ this.form.department_arr_id = JSON.stringify(this.form.department_arr_id);
|
|
|
+ this.form.city_arr_id = this.form.city_arr_id;
|
|
|
+ if(typeof this.form.address_arr_id == 'string'){
|
|
|
+ this.form.address_arr_id = JSON.parse(this.form.address_arr_id);
|
|
|
+ }
|
|
|
+ // this.form.address_id = this.form.address_arr_id[this.form.address_arr_id.length-1];
|
|
|
+ // this.form.address_arr_id = JSON.stringify(this.form.address_arr_id);
|
|
|
//2.设置修改的用户id
|
|
|
this.form.id = this.editId;
|
|
|
//3.提交用户修改
|
|
|
//如果code为0表示用户不存在,提交表单
|
|
|
+ console.log(this.form ,'---------------------1-------');
|
|
|
this.$store.dispatch('userMember/updateUser',this.form).then(res=>{
|
|
|
console.log(res);
|
|
|
this.$message({
|
|
@@ -578,7 +685,7 @@
|
|
|
|
|
|
})
|
|
|
// console.log("get_website_tag_arr_funget_website_tag_arr_fun")
|
|
|
- // console.log("get_website_tag_arr_funget_website_tag_arr_fun",this.options_arr)
|
|
|
+ console.log("get_website_tag_arr_funget_website_tag_arr_fun",this.options_arr)
|
|
|
})
|
|
|
|
|
|
},
|