580 显示的数据不正确 权限也不正确

liujun0703-新项目开发
liujun 2024-08-22 17:43:19 +08:00
parent b69157889e
commit 9588af6751
2 changed files with 46 additions and 53 deletions

View File

@ -44,7 +44,7 @@
<!-- 查看弹窗 -->
<el-dialog :visible.sync="dialogFormShow" title="详情" width="1000px">
<el-form :model="form" label-width="250px">
<el-form :model="form" label-width="100px" style="margin-right: 10px">
<el-form-item label="姓名" prop="USER_NAME">
<el-input v-model="form.USER_NAME" placeholder="请输入姓名..." disabled />
</el-form-item>
@ -90,33 +90,7 @@
</div>
</el-dialog>
<el-dialog :visible.sync="dialogFormEdit" :title="dialogType==='editUser'?'修改':'新增'" width="1000px">
<el-form ref="form" :rules="rules" :model="form" label-width="250px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="所属部门" prop="department">
<el-cascader
v-model="form.department"
:options="departmentOptions"
:props="{ checkStrictly: true }"
placeholder="请选择所属部门"
style="width: 100%;"
@change="handleNodeClick"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户" prop="USER_ID">
<el-select v-model="form.USER_ID" placeholder="请选择用户" style="width: 100%;" @change="handleUserChange">
<el-option
v-for="user in userList"
:key="user.USER_ID"
:label="user.NAME"
:value="user.USER_ID"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form ref="form" :rules="rules" :model="form" label-width="100px">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="所属机构" prop="ORG_ID">
@ -130,9 +104,21 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户" prop="USER_ID">
<el-input v-model="form.USER_NAME" placeholder="请选择用户" @click.native="openSelectUser()"/>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="排序" prop="SORT_ORDER">
<el-input v-model="form.SORT_ORDER" placeholder="请输入排序..." />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别" prop="GENDER">
<el-select v-model="form.GENDER" placeholder="请选择性别">
<el-select v-model="form.GENDER" placeholder="请选择性别" style="width: 100%;">
<el-option label="男" value="0" />
<el-option label="女" value="1" />
</el-select>
@ -163,28 +149,24 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="排序" prop="SORT_ORDER">
<el-input v-model="form.SORT_ORDER" placeholder="请输入排序..." />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormEdit = false"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
<select-zhi-ban-user ref="selectZhiBanUser" @selectPeople="getUser"/>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import SelectZhiBanUser
from '../../../../emergency_report/duty_management/duty_log/components/selectZhiBanUser.vue'
export default {
components: { Pagination },
components: { SelectZhiBanUser, Pagination },
data() {
return {
listLoading: false,
@ -194,6 +176,7 @@ export default {
form: {
department: [],
DEPARTMENT_ID: '',
DEPARTMENT_NAME: '',
ORG_ID: '',
USER_ID: '',
USER_NAME: '',
@ -214,18 +197,17 @@ export default {
listQuery: {
page: 1,
limit: 10
},
rules: {
USER_NAME: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
GENDER: [{ required: true, message: '请输入性别', trigger: 'blur' }],
ADMINISTRATIVE_POSITION: [{ required: true, message: '请输入行政职务', trigger: 'blur' }],
ADMINISTRATIVE_LEVEL: [{ required: true, message: '请输入行政级别', trigger: 'blur' }],
IDENTITY_NUMBER: [{ required: true, message: '请输入身份证号', trigger: 'blur' }],
CONTACT_PHONE: [{ required: true, message: '请输入联系电话', trigger: 'blur' }],
SORT_ORDER: [{ required: true, message: '请输入排序', trigger: 'blur' }],
ISDELETE: [{ required: true, message: '请输入是否删除', trigger: 'blur' }]
}
// ,
// rules: {
// USER_NAME: [{ required: true, message: '', trigger: 'blur' }],
// GENDER: [{ required: true, message: '', trigger: 'blur' }],
// ADMINISTRATIVE_POSITION: [{ required: true, message: '', trigger: 'blur' }],
// ADMINISTRATIVE_LEVEL: [{ required: true, message: '', trigger: 'blur' }],
// IDENTITY_NUMBER: [{ required: true, message: '', trigger: 'blur' }],
// CONTACT_PHONE: [{ required: true, message: '', trigger: 'blur' }],
// SORT_ORDER: [{ required: true, message: '', trigger: 'blur' }],
// ISDELETE: [{ required: true, message: '', trigger: 'blur' }]
// }
}
},
created() {
@ -302,18 +284,19 @@ export default {
requestFN('/major/personnel/detail', params).then((response) => {
const data = response.msg
this.form = {
Id: data.ID,
ID: data.ID,
ORG_ID: data.ORG_ID,
USER_ID: data.USER_ID,
USER_NAME: data.USER_NAME,
DEPARTMENT_ID: data.DEPARTMENT_ID,
DEPARTMENT_NAME: data.DEPARTMENT_NAME,
GENDER: data.GENDER,
ADMINISTRATIVE_POSITION: data.ADMINISTRATIVE_POSITION,
ADMINISTRATIVE_LEVEL: data.ADMINISTRATIVE_LEVEL,
IDENTITY_NUMBER: data.IDENTITY_NUMBER,
CONTACT_PHONE: data.CONTACT_PHONE,
SORT_ORDER: data.SORT_ORDER,
ISDELETE: data.ISDELETE,
USER_ID: data.USER_ID,
department: this.getDepartmentPath(data.DEPARTMENT_ID) //
ISDELETE: data.ISDELETE
}
this.getUserList(data.DEPARTMENT_ID)
}).catch((e) => {
@ -425,6 +408,16 @@ export default {
}).catch((e) => {
this.listLoading = false
})
},
openSelectUser() {
this.$refs.selectZhiBanUser.init()
},
getUser(e) {
console.log(e)
this.form.USER_ID = e.USER_ID
this.form.USER_NAME = e.NAME
this.form.DEPARTMENT_ID = e.DEPARTMENT_ID
this.form.DEPARTMENT_NAME = e.DEPARTMENT_NAME
}
}
}

View File

@ -241,7 +241,7 @@
</el-dialog>
<!-- 添加事故报告弹窗 -->
<el-dialog :visible.sync="dialogReportVisible" title="添加事故报告" width="1000px">
<el-form ref="reportForm" :model="reportForm" label-width="250px">
<el-form ref="reportForm" :model="reportForm" label-width="100px" style="margin-right: 10px">
<el-form-item label="事件标题" prop="EVENT_NAME">
<el-input v-model="reportForm.EVENT_NAME" placeholder="请输入事件标题..."/>
</el-form-item>