|
@@ -130,10 +130,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <el-form-item label="站点标识:" :label-width="formLabelWidth" prop="websiteTag_arr_id" class="custom-align-right">
|
|
|
+ <el-form-item label="站点标识:" :label-width="formLabelWidth" prop="sszq" class="custom-align-right">
|
|
|
<!-- 级联选择器 xx-->
|
|
|
|
|
|
- <el-cascader v-model="form.websiteTag_arr_id" :options="options_arr" filterable clearable></el-cascader>
|
|
|
+ <el-cascader v-model="form.sszq" :options="options_arr" filterable clearable></el-cascader>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
@@ -222,6 +222,7 @@ import URL from '@/utils/baseUrl';
|
|
|
import CityCascader from './CityCascader';
|
|
|
//格式化时间
|
|
|
import { formatLocalDate } from '@/utils/public';
|
|
|
+import cjs from 'compression-webpack-plugin';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
@@ -317,7 +318,10 @@ export default {
|
|
|
|
|
|
form:{
|
|
|
|
|
|
+ // websiteTag_arr_id:[], //站点标识下拉id onlyxx
|
|
|
+
|
|
|
websiteTag_arr_id:[], //站点标识下拉id only
|
|
|
+
|
|
|
websiteTag_reg:"",
|
|
|
sszq:"", //站点标识下拉id
|
|
|
|
|
@@ -546,6 +550,7 @@ export default {
|
|
|
},
|
|
|
//提交表单
|
|
|
addData(){
|
|
|
+
|
|
|
console.log(this.timeList)
|
|
|
//1.格式化时间戳
|
|
|
this.form.birthday = formatLocalDate(this.form.birthday);
|
|
@@ -568,11 +573,21 @@ export default {
|
|
|
if (valid) {
|
|
|
//3.验证用户是否已经存在
|
|
|
this.$store.dispatch('userMember/verifyUserInfo',{user_name:this.form.user_name}).then(res=>{
|
|
|
+
|
|
|
if(res.code==0){
|
|
|
//如果code为0表示用户不存在,提交表单
|
|
|
+
|
|
|
+
|
|
|
+ this.form.sszq=this.form.sszq[0]
|
|
|
+ console.log("this.form.sszq===",this.form.sszq)
|
|
|
+ console.log("this.form1===",this.form)
|
|
|
+
|
|
|
this.$store.dispatch('userMember/createUser',this.form).then(res=>{
|
|
|
+
|
|
|
+ console.log("this.form222===res",res)
|
|
|
+
|
|
|
if(res.code==200){
|
|
|
- console.log(res);
|
|
|
+ // console.log(res);
|
|
|
this.$message({
|
|
|
type: 'success',
|
|
|
message: '用户添加成功!'
|
|
@@ -626,9 +641,13 @@ export default {
|
|
|
},
|
|
|
//获得用户信息
|
|
|
getUserInfo(){
|
|
|
+ // console.log("回显数据===");
|
|
|
this.$store.dispatch('userMember/getUser',{id:this.editId}).then(res=>{
|
|
|
- console.log(res);
|
|
|
- //回显数据
|
|
|
+
|
|
|
+
|
|
|
+ // 站点标识
|
|
|
+ this.form.sszq = Number(res.data.sszq);
|
|
|
+
|
|
|
this.form.type_id = res.data.type_id;
|
|
|
this.form.user_name = res.data.user_name;
|
|
|
this.form.role_id = res.data.role_id;
|
|
@@ -683,7 +702,9 @@ export default {
|
|
|
}));
|
|
|
|
|
|
//获取所有网站列表
|
|
|
- this.getWebsiteList(res.data.sszq);
|
|
|
+ //this.getWebsiteList(res.data.sszq);
|
|
|
+
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
//修改用户
|
|
@@ -820,6 +841,7 @@ export default {
|
|
|
|
|
|
this.get_website_tag_arr_fun()//得到站点标识所有内容xx
|
|
|
|
|
|
+ // console.log("this.get_website_tag_arr_fun()==xx",this.get_website_tag_arr_fun())
|
|
|
|
|
|
this.getRoleList();
|
|
|
//判断是新建还是回显
|