Parcourir la source

账户管理接口

ZaiZai il y a 2 ans
Parent
commit
3da9d0506c
1 fichiers modifiés avec 11 ajouts et 11 suppressions
  1. 11 11
      src/views/system/user.vue

+ 11 - 11
src/views/system/user.vue

@@ -62,7 +62,7 @@
                 <template #header>
                     <div class="hac-card-title">机构信息</div>
                 </template>
-                <template v-for="(item, index) in formModel.organization">
+                <template v-for="(item, index) in formModel.deptList">
                     <el-form :ref="(el) => setFormItemRefs(el, index)" class="mt-4" :model="item" :rules="formRules" label-position="top" size="large">
                         <el-row :gutter="10">
                             <el-col :span="7">
@@ -81,7 +81,7 @@
                             </el-col>
                             <el-col :span="7">
                                 <el-form-item prop="principal">
-                                    <el-select v-model="item.principal" placeholder="是否为部门负责人">
+                                    <el-select v-model="item.isLader" placeholder="是否为部门负责人">
                                         <el-option label="是" :value="1"/>
                                         <el-option label="否" :value="0"/>
                                     </el-select>
@@ -227,7 +227,7 @@ const getFormRef = async (index) => {
 }
 
 const formModel = ref({
-    organization: [{}],
+    deptList: [{}],
 })
 const formRules = {
     projectId: [{required: true, message: '请选择所属项目', trigger: 'change'}],
@@ -282,7 +282,7 @@ const formRules = {
 //添加用户
 const addUserClick = () => {
     formModel.value = {
-        organization: [{}],
+        deptList: [{}],
     }
     postData.value = [{}]
     formModal.value = true
@@ -292,14 +292,14 @@ const addUserClick = () => {
 //编辑用户信息
 const rowEidtClick = (row) => {
     row.password = ''
-    const organization = getArrValue(row.organization)
-    row.organization = organization
-    if (organization.length > 0){
-        organization.forEach(() => {
+    const deptList = getArrValue(row.deptList)
+    row.deptList = deptList
+    if (deptList.length > 0){
+        deptList.forEach(() => {
             postData.value.push({})
         })
     } else {
-        row.organization = [{}]
+        row.deptList = [{}]
         postData.value = [{}]
     }
     formModel.value = row
@@ -334,13 +334,13 @@ const initPostData = async (id, index) => {
 
 //新增组织
 const addOrganizationClick = (row) => {
-    formModel.value.organization.push({})
+    formModel.value.deptList.push({})
     postData.value.push({})
 }
 
 //删除组织
 const delOrganizationClick = (index) => {
-    formModel.value.organization.splice(index, 1)
+    formModel.value.deptList.splice(index, 1)
     postData.value.splice(index, 1)
 }