a3704cbf by ‘jikai@pashanhoo.com’
2 parents d32ea445 357f2c46
......@@ -2,7 +2,7 @@
* @Author: xiaomiao 1158771342@qq.com
* @Date: 2023-01-30 17:59:51
* @LastEditors: xiaomiao 1158771342@qq.com
* @LastEditTime: 2023-03-21 15:00:39
* @LastEditTime: 2023-03-21 18:34:17
* @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -32,13 +32,13 @@ class data extends filter {
label: "组织机构"
},
{
prop: "job_group",
label: "职位"
},
{
prop: "telephone",
label: "电话"
}
},
{
prop: "jobLevel",
label: "职位"
},
]
}
}
......
......@@ -61,8 +61,8 @@
</el-row>
<el-row :gutter="24">
<el-col :span="24">
<el-form-item label="组织机构:" label-width="100px">
<el-select class="selbig" v-model="form.departmentName" placeholder="组织机构">
<el-form-item label="组织机构:" label-width="100px" prop="departmentId">
<el-select class="selbig" v-model="form.departmentId" placeholder="组织机构">
<el-option v-for="item in districtAreaList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
......@@ -93,10 +93,12 @@
districtAreaList: [],
form: {
sex: "0",
departmentId: '',
},
rules: {
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
code: [{ required: true, message: "请输入工号", trigger: "blur" }],
departmentId: [{ required: true, message: "请选择组织机构", trigger: 'change' }],
mobilePhone: [{ validator: "sddd", trigger: "blur" }],
loginName: [
{ required: true, message: "请输入用户名", trigger: "blur" },
......@@ -109,11 +111,6 @@
dataUrl: api.users
};
},
computed: {
departmentid () {
return this.$store.state.user.userInfo;
},
},
watch: {
value (val) {
this.myValue = val
......@@ -147,17 +144,17 @@
})
}
},
handleChange (value) {
this.form.departmentId = value;
},
// 保存
submitForm () {
this.districtAreaList.forEach((item) => {
if (this.form.departmentId == item.id) {
this.form.organizationId = item.organizationId
}
})
this.$refs.form.validate((valid) => {
if (valid) {
let method = ''
let url = ''
this.form.organizationId = this.departmentid.organizationId;
this.form.departmentId = this.departmentid.departmentId;
const formData = this.form
if (!formData.id) {
method = 'post'
......@@ -166,7 +163,6 @@
method = 'put'
url = `${this.dataUrl}/${formData.id}`
}
httpAction(url, formData, method).then((res) => {
if (res.status === 1) {
this.$message.success({ message: res.message, showClose: true })
......
......@@ -111,6 +111,15 @@
.concat(data.columns())
.concat([
{
label: "职位",
render: (h, scope) => {
return (
<div v-show={scope.row.jobLevel !== null}>{scope.row.jobLevel ? "干事" : "经理"}</div>
)
}
},
{
label: "负责人",
render: (h, scope) => {
return (
......@@ -235,7 +244,6 @@
code: this.form.code,
loginName: this.form.loginName,
};
console.log("this.queryParam", this.queryParam);
getUserLists(this.queryParam).then((res) => {
if (res.status === 1) {
this.loading = false;
......@@ -271,7 +279,6 @@
getAction(api.departments, params).then(
(res) => {
let deptsList = res.content;
console.log(deptsList);
deptsList.forEach((ele) => {
this.tableData.data.forEach((item) => {
if (ele.id == item.departmentId) {
......@@ -367,6 +374,7 @@
// 修改人员信息
handleEdit (row) {
console.log("rowwwww", row);
this.isDialog = true
this.$refs.dialogForm.edit(row);
this.$refs.dialogForm.title = "修改";
......