Commit 20fc1eee by yuhao

完善

parent 7ca02c84
...@@ -259,8 +259,7 @@ export default { ...@@ -259,8 +259,7 @@ export default {
} }
}, },
downLoadingXyr: false, downLoadingXyr: false,
tableDataXyr: [{ tableDataXyr: [],
}],
columObjXyr: { columObjXyr: {
visble: false, visble: false,
loading: false, loading: false,
......
...@@ -130,8 +130,7 @@ export default { ...@@ -130,8 +130,7 @@ export default {
} }
}, },
downLoadingMj: false, downLoadingMj: false,
tableDataMj: [{ tableDataMj: [],
}],
columObjMj: { columObjMj: {
visble: false, visble: false,
loading: false, loading: false,
...@@ -192,9 +191,7 @@ export default { ...@@ -192,9 +191,7 @@ export default {
} }
}, },
downLoadingXyr: false, downLoadingXyr: false,
tableDataXyr: [{ tableDataXyr: [],
}],
columObjXyr: { columObjXyr: {
visble: false, visble: false,
loading: false, loading: false,
...@@ -327,23 +324,27 @@ export default { ...@@ -327,23 +324,27 @@ export default {
} }
}, },
async getMjList () { async getMjList () {
this.columObjMj.loading = true
const paramas = new FormData() const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id) paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('page', this.pageObjMj.pageData.page) paramas.append('page', this.pageObjMj.pageData.page)
paramas.append('limit', this.pageObjMj.pageData.size) paramas.append('limit', this.pageObjMj.pageData.size)
let res = await selectAllMj(paramas) let res = await selectAllMj(paramas)
if (res && res.code == 200) { if (res && res.code == 200) {
this.columObjMj.loading = false
this.tableDataMj = res.data.rows this.tableDataMj = res.data.rows
this.pageObjMj.total = res.data.total this.pageObjMj.total = res.data.total
} }
}, },
async getXyrList () { async getXyrList () {
this.columObjXyr.loading = true
const paramas = new FormData() const paramas = new FormData()
paramas.append('glxxzjbh', this.$route.query.id) paramas.append('glxxzjbh', this.$route.query.id)
paramas.append('page', this.pageObjMj.pageData.page) paramas.append('page', this.pageObjMj.pageData.page)
paramas.append('limit', this.pageObjMj.pageData.size) paramas.append('limit', this.pageObjMj.pageData.size)
let res = await selectAllXyr(paramas) let res = await selectAllXyr(paramas)
if (res && res.code == 200) { if (res && res.code == 200) {
this.columObjXyr.loading = false
this.tableDataXyr = res.data.rows this.tableDataXyr = res.data.rows
this.pageObjXyr.total = res.data.total this.pageObjXyr.total = res.data.total
} }
......
...@@ -113,8 +113,8 @@ ...@@ -113,8 +113,8 @@
<el-form-item label="性别" <el-form-item label="性别"
prop="xyrxb"> prop="xyrxb">
<el-radio-group v-model="ruleForm.xyrxb"> <el-radio-group v-model="ruleForm.xyrxb">
<el-radio :label="0">{{'男'}}</el-radio> <el-radio :label="'1'">{{'男'}}</el-radio>
<el-radio :label="1">{{'女'}}</el-radio> <el-radio :label="'2'">{{'女'}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="户籍地" <el-form-item label="户籍地"
...@@ -333,7 +333,7 @@ export default { ...@@ -333,7 +333,7 @@ export default {
label: "性别", label: "性别",
width: "", width: "",
align: "center", align: "center",
ownDefinedReturn: (row, index) => { return row.xyrxb == 0 ? '男' : '女' } ownDefinedReturn: (row, index) => { return row.xyrxb == '1' ? '男' : row.xyrxb == '2' ? '女' : '--' }
}, },
{ {
text: true, text: true,
...@@ -527,18 +527,35 @@ export default { ...@@ -527,18 +527,35 @@ export default {
rwbh: this.ruleForm.rwbh, rwbh: this.ruleForm.rwbh,
imageUrlZmcl: this.ruleForm.imageUrlZmcl, imageUrlZmcl: this.ruleForm.imageUrlZmcl,
lxdh: this.ruleForm.lxdh, lxdh: this.ruleForm.lxdh,
xyrxm: this.ruleForm.xyrxm, lyzmcl: this.ruleForm.lyzmcl,
xyrsfzh: this.ruleForm.xyrsfzh, xyrxm: '',
xyrhjd: this.ruleForm.xyrhjd, xyrxb: '',
xyrxb: this.ruleForm.xyrxb, xyrsxzm: '',
xyrsxzm: this.ruleForm.xyrsxzm, xyrsfzh: '',
xyrszwz: this.ruleForm.xyrszwz, xyrhjd: '',
xyrjqhdgj: this.ruleForm.xyrjqhdgj, xyrszwz: '',
wzxxmq: this.ruleForm.wzxxmq, xyrjqhdgj: '',
xnsfmq: this.ruleForm.xnsfmq, wzxxmq: '',
dwgsmq: this.ruleForm.dwgsmq, xnsfmq: '',
qtmq: this.ruleForm.qtmq, dwgsmq: '',
lyzmcl: this.ruleForm.lyzmcl qtmq: '',
}
if (this.ruleForm.rylx == '0') {
params.xyrxm = this.ruleForm.xyrxm
params.xyrxb = this.ruleForm.xyrxb
params.xyrsxzm = this.ruleForm.xyrsxzm
params.xyrsfzh = this.ruleForm.xyrsfzh
params.xyrhjd = this.ruleForm.xyrhjd
params.xyrszwz = this.ruleForm.xyrszwz
params.xyrjqhdgj = this.ruleForm.xyrjqhdgj
} else if (this.ruleForm.rylx == '1') {
params.wzxxmq = this.ruleForm.wzxxmq
} else if (this.ruleForm.rylx == '2') {
params.xnsfmq = this.ruleForm.xnsfmq
} else if (this.ruleForm.rylx == '3') {
params.dwgsmq = this.ruleForm.dwgsmq
} else if (this.ruleForm.rylx == '4') {
params.qtmq = this.ruleForm.qtmq
} }
this.$refs[ruleForm].validate(async (valid) => { this.$refs[ruleForm].validate(async (valid) => {
if (valid) { if (valid) {
...@@ -546,6 +563,59 @@ export default { ...@@ -546,6 +563,59 @@ export default {
this.tableData.push(params) this.tableData.push(params)
} else if (this.editType == 1) { } else if (this.editType == 1) {
this.tableData[this.tableData.indexOf(this.rowItem)] = this.ruleForm; this.tableData[this.tableData.indexOf(this.rowItem)] = this.ruleForm;
// 根据人员类型判断展示
this.tableData.forEach(item => {
if (item.rylx == '0') {
item.wzxxmq = ''
item.xnsfmq = ''
item.dwgsmq = ''
item.qtmq = ''
} else if (item.rylx == '1') {
item.xyrxm = ''
item.xyrxb = ''
item.xyrsxzm = ''
item.xyrsfzh = ''
item.xyrhjd = ''
item.xyrszwz = ''
item.xyrjqhdgj = ''
item.xnsfmq = ''
item.dwgsmq = ''
item.qtmq = ''
} else if (item.rylx == '2') {
item.xyrxm = ''
item.xyrxb = ''
item.xyrsxzm = ''
item.xyrsfzh = ''
item.xyrhjd = ''
item.xyrszwz = ''
item.xyrjqhdgj = ''
item.wzxxmq = ''
item.dwgsmq = ''
item.qtmq = ''
} else if (item.rylx == '3') {
item.xyrxm = ''
item.xyrxb = ''
item.xyrsxzm = ''
item.xyrsfzh = ''
item.xyrhjd = ''
item.xyrszwz = ''
item.xyrjqhdgj = ''
item.wzxxmq = ''
item.xnsfmq = ''
item.qtmq = ''
} else if (item.rylx == '4') {
item.xyrxm = ''
item.xyrxb = ''
item.xyrsxzm = ''
item.xyrsfzh = ''
item.xyrhjd = ''
item.xyrszwz = ''
item.xyrjqhdgj = ''
item.wzxxmq = ''
item.xnsfmq = ''
item.dwgsmq = ''
}
})
this.tableData = [...this.tableData] this.tableData = [...this.tableData]
} }
this.$emit('getXyrData', this.tableData) this.$emit('getXyrData', this.tableData)
......
...@@ -112,8 +112,8 @@ ...@@ -112,8 +112,8 @@
<el-form-item label="性别" <el-form-item label="性别"
prop="xyrxb"> prop="xyrxb">
<el-radio-group v-model="ruleForm.xyrxb"> <el-radio-group v-model="ruleForm.xyrxb">
<el-radio :label="0">{{'男'}}</el-radio> <el-radio :label="'1'">{{'男'}}</el-radio>
<el-radio :label="1">{{'女'}}</el-radio> <el-radio :label="'2'">{{'女'}}</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="户籍地" <el-form-item label="户籍地"
...@@ -276,8 +276,7 @@ export default { ...@@ -276,8 +276,7 @@ export default {
} }
}, },
downLoading: false, downLoading: false,
tableData: [{ tableData: [],
}],
columObj: { columObj: {
visble: false, visble: false,
loading: false, loading: false,
...@@ -338,7 +337,7 @@ export default { ...@@ -338,7 +337,7 @@ export default {
label: "性别", label: "性别",
width: "", width: "",
align: "center", align: "center",
ownDefinedReturn: (row, index) => { return row.xyrxb == 0 ? '男' : '女' } ownDefinedReturn: (row, index) => { return row.xyrxb == '1' ? '男' : row.xyrxb == '2' ? '女' : '--' }
}, },
{ {
text: true, text: true,
...@@ -519,6 +518,8 @@ export default { ...@@ -519,6 +518,8 @@ export default {
this.ruleForm.xyrxm = row.xyrxm this.ruleForm.xyrxm = row.xyrxm
this.ruleForm.xyrsfzh = row.xyrsfzh this.ruleForm.xyrsfzh = row.xyrsfzh
this.ruleForm.xyrhjd = row.xyrhjd this.ruleForm.xyrhjd = row.xyrhjd
this.ruleForm.xyrsxzm = row.xyrsxzm
this.ruleForm.xyrxb = row.xyrxb
this.ruleForm.xyrszwz = row.xyrszwz this.ruleForm.xyrszwz = row.xyrszwz
this.ruleForm.xyrhjd = row.xyrhjd this.ruleForm.xyrhjd = row.xyrhjd
this.ruleForm.xyrjqhdgj = row.xyrjqhdgj this.ruleForm.xyrjqhdgj = row.xyrjqhdgj
...@@ -565,24 +566,32 @@ export default { ...@@ -565,24 +566,32 @@ export default {
paramas.append('lyzmcl', this.ruleForm.lyzmcl.raw) paramas.append('lyzmcl', this.ruleForm.lyzmcl.raw)
} }
paramas.append('xyrxm', '') paramas.append('xyrxm', '')
paramas.append('xyrxb', '')
paramas.append('xyrsxzm', '')
paramas.append('xyrsfzh', '') paramas.append('xyrsfzh', '')
paramas.append('xyrhjd', '') paramas.append('xyrhjd', '')
paramas.append('xyrszwz', '') paramas.append('xyrszwz', '')
paramas.append('xyrjqhdgj', '') paramas.append('xyrjqhdgj', '')
paramas.append('wzxxmq', '')
paramas.append('xnsfmq', '')
paramas.append('dwgsmq', '')
paramas.append('qtmq', '')
if (this.ruleForm.rylx == '0') { if (this.ruleForm.rylx == '0') {
paramas.set('xyrxm', this.ruleForm.xyrxm) paramas.set('xyrxm', this.ruleForm.xyrxm)
paramas.set('xyrxb', this.ruleForm.xyrxb)
paramas.set('xyrsxzm', this.ruleForm.xyrsxzm)
paramas.set('xyrsfzh', this.ruleForm.xyrsfzh) paramas.set('xyrsfzh', this.ruleForm.xyrsfzh)
paramas.set('xyrhjd', this.ruleForm.xyrhjd) paramas.set('xyrhjd', this.ruleForm.xyrhjd)
paramas.set('xyrszwz', this.ruleForm.xyrszwz) paramas.set('xyrszwz', this.ruleForm.xyrszwz)
paramas.set('xyrjqhdgj', this.ruleForm.xyrjqhdgj) paramas.set('xyrjqhdgj', this.ruleForm.xyrjqhdgj)
} else if (this.ruleForm.rylx == '1') { } else if (this.ruleForm.rylx == '1') {
paramas.append('wzxxmq', this.ruleForm.wzxxmq) paramas.set('wzxxmq', this.ruleForm.wzxxmq)
} else if (this.ruleForm.rylx == '2') { } else if (this.ruleForm.rylx == '2') {
paramas.append('xnsfmq', this.ruleForm.xnsfmq) paramas.set('xnsfmq', this.ruleForm.xnsfmq)
} else if (this.ruleForm.rylx == '3') { } else if (this.ruleForm.rylx == '3') {
paramas.append('dwgsmq', this.ruleForm.dwgsmq) paramas.set('dwgsmq', this.ruleForm.dwgsmq)
} else if (this.ruleForm.rylx == '4') { } else if (this.ruleForm.rylx == '4') {
paramas.append('qtmq', this.ruleForm.qtmq) paramas.set('qtmq', this.ruleForm.qtmq)
} }
if (this.editType == 0) { if (this.editType == 0) {
let res = await insertXyrxx(paramas) let res = await insertXyrxx(paramas)
......
...@@ -36,9 +36,8 @@ export default { ...@@ -36,9 +36,8 @@ export default {
sessionStorage.setItem("userInfo", JSON.stringify(res.data.data)); sessionStorage.setItem("userInfo", JSON.stringify(res.data.data));
const roles = res.data.data.permission.split(","); const roles = res.data.data.permission.split(",");
this.$store.commit("user/SET_ROLES", roles); this.$store.commit("user/SET_ROLES", roles);
this.$store.commit("user/SET_USERINFO", res.data.data);
this.$store.commit("user/SET_TOKEN", "bearer " + res.data.data.accessToken);
this.Loading.close(); this.Loading.close();
// this.$router.push('apply'); // this.$router.push('apply');
this.$router.push({ this.$router.push({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment