Sfoglia il codice sorgente

feat: EK-856: 管理员增加“Country”属性.

kevinElken 9 mesi fa
parent
commit
755b97bdb4

+ 8 - 7
src/views/admin/edit.vue

@@ -69,7 +69,7 @@ export default {
         roleId: null,
         password: null,
         surePassword: null,
-        countryId: [1]
+        countryId: []
       },
       loading: true,
       submitButtonStat: false,
@@ -104,6 +104,7 @@ export default {
       adminEdit(this.$route.params.id).then(response => {
         this.form = response.data.oneData
         this.roles = response.data.adminRoles
+        this.countries = response.data.countries
         this.loading = false
         this.isEdit = true
       }).catch(err => {
@@ -116,6 +117,7 @@ export default {
     } else if (this.$route.name === 'admin_add') {
       adminAdd().then(response => {
         this.roles = response.data.adminRoles
+        this.countries = response.data.countries
         this.loading = false
       }).catch(err => {
         this.loading = false
@@ -149,7 +151,6 @@ export default {
       }
       adminAddAndEditAndChangePassword(path, this.form).then(response => {
         this.submitButtonStat = false
-        console.log(response)
         this.$message({
           message: response.data,
           type: 'success'
@@ -164,11 +165,11 @@ export default {
       })
     },
     getCountries(){
-      getCountries().then(response => {
-        this.countries = response
-      }).catch(err => {
-
-      })
+      // getCountries().then(response => {
+      //   this.countries = response
+      // }).catch(err => {
+      //
+      // })
     },
   }
 }

+ 3 - 59
src/views/admin/index.vue

@@ -20,17 +20,12 @@
             {{ scope.row.REAL_NAME }}
           </template>
         </el-table-column>
-<!--        <el-table-column :label="$t('Administrator.remark')" prop="REMARK" width="150">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ scope.row.REMARK }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
         <el-table-column :label="$t('Administrator.role')" prop="ROLE_NAME" width="170">
           <template slot-scope="scope">
             <el-tag type="warning" size="small" class="no-border">{{ scope.row.ROLE_NAME }}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column :label="$t('Administrator.isEnable')" prop="IS_ENABLE" width="120">
+        <el-table-column :label="$t('Administrator.isEnable')" prop="IS_ENABLE" width="150">
           <template slot-scope="scope">
             <el-tag :type="(scope.row.IS_ENABLE==1?'success':'danger')">
               <template v-if="scope.row.IS_ENABLE==1">
@@ -50,48 +45,8 @@
           </template>
           <template v-else>-</template>
         </el-table-column>
-<!--        <el-table-column :label="$t('Administrator.loginTimes')" prop="LOGIN_NUMS">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ scope.row.LOGIN_NUMS }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('Administrator.lastLoginIp')" prop="LAST_LOGIN_IP" width="150">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ scope.row.LAST_LOGIN_IP }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('Administrator.lastLoginAt')" width="180">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ tool.formatDate(scope.row.LAST_LOGIN_AT) }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('Administrator.bindIp')" width="250">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ scope.row.BIND_IP }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('Administrator.creatUser')" width="150">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ scope.row.CREATE_ADMIN_NAME }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('Administrator.creatAt')" width="180">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ tool.formatDate(scope.row.CREATED_AT) }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('Administrator.updateUser')" width="150">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ scope.row.UPDATE_ADMIN_NAME }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
-<!--        <el-table-column :label="$t('Administrator.updateAt')" width="180">-->
-<!--          <template slot-scope="scope">-->
-<!--            {{ tool.formatDate(scope.row.UPDATED_AT) }}-->
-<!--          </template>-->
-<!--        </el-table-column>-->
 
-        <el-table-column :fixed="fixedColumn" :label="$t('table.actions')" width="180" v-if="usersInfo.isSuperAdmin()">
+        <el-table-column :fixed="fixedColumn" :label="$t('table.actions')" width="180">
           <template slot-scope="scope">
             <el-dropdown v-if="scope.row.DONT_DEL!=='1'&&(permission.hasPermission(`admin/edit`)||permission.hasPermission(`admin/admin-delete`))" size="small" trigger="click" @command="handleRow" @click.stop="">
               <el-button type="primary" size="small">
@@ -105,7 +60,7 @@
           </template>
         </el-table-column>
       </el-table>
-      <div class="white-box-footer" v-if="usersInfo.isSuperAdmin()">
+      <div class="white-box-footer">
         <el-dropdown v-if="permission.hasPermission(`admin/admin-delete`)" size="small" trigger="click" @command="handleMuliDel">
           <el-button type="primary" size="small">
             {{ $t('Administrator.selectData') }}
@@ -173,12 +128,6 @@ export default {
   },
   mounted() {
     this.getData()
-    // let system =  getOperatingSystem()
-    // if (system == "Android" || system == 'ios') {
-    //   this.fixedColumn = false
-    // } else {
-    //   this.fixedColumn = 'right'
-    // }
 		this.fixedColumn = getScreenWidth() < 500 ? false : 'right'
   },
   methods: {
@@ -237,7 +186,6 @@ export default {
         vueObj.pageSize = pageSize
         this.loading = false
       }).catch(err => {
-        console.log('err=============' + err)
         this.loading = false
       })
     },
@@ -264,11 +212,7 @@ export default {
           })
           obj.getData()
         }).catch(err => {
-          console.log('err---------' + err)
         })
-        //   return network.postData(`admin/admin-delete`, {
-        //       selected: selectedIds
-        //   })
       }).then(response => {
         obj.$message({
           message: response.data,

+ 0 - 5
src/views/admin/role-add.vue

@@ -72,9 +72,4 @@ export default {
   background: #fff;
   padding: 25px;
 }
-@media (min-width: 760px) {
-  /* /deep/ .el-form-item__content {
-    width: 700px;
-  } */
-}
 </style>

+ 0 - 22
src/views/admin/role.vue

@@ -15,27 +15,6 @@
             <el-tag type="warning" size="small" class="no-border">{{ scope.row.ROLE_NAME }}</el-tag>
           </template>
         </el-table-column>
-        <el-table-column prop="REMARK" :label="$t('Administrator.remark')" />
-        <el-table-column :label="$t('Administrator.creatUser')">
-          <template slot-scope="scope">
-            {{ scope.row.CREATE_ADMIN_NAME }}
-          </template>
-        </el-table-column>
-        <el-table-column :label="$t('Administrator.creatAt')">
-          <template slot-scope="scope">
-            {{ tool.formatDate(scope.row.CREATED_AT) }}
-          </template>
-        </el-table-column>
-        <el-table-column :label="$t('Administrator.updateUser')">
-          <template slot-scope="scope">
-            {{ scope.row.UPDATE_ADMIN_NAME }}
-          </template>
-        </el-table-column>
-        <el-table-column :label="$t('Administrator.updateAt')">
-          <template slot-scope="scope">
-            {{ tool.formatDate(scope.row.UPDATED_AT) }}
-          </template>
-        </el-table-column>
         <el-table-column :fixed="fixedColumn" :label="$t('table.actions')" width="180">
           <template slot-scope="scope">
             <el-dropdown v-if="scope.row.DONT_DEL==='0'&&(permission.hasPermission(`admin/role-permission`)||permission.hasPermission(`admin/role-edit`)||permission.hasPermission(`admin/role-delete`))" size="small" trigger="click" @command="handleRow" @click.stop="">
@@ -44,7 +23,6 @@
               </el-button>
               <el-dropdown-menu slot="dropdown">
                 <el-dropdown-item v-if="permission.hasPermission(`admin/role-permission`)" :command="`permission|${scope.row.ID}`">{{ $t('permission.permission') }}</el-dropdown-item>
-                <!--                <el-dropdown-item :command="`column|${scope.row.ID}`" v-if="permission.hasPermission(`admin/role-column`)">列表字段权限</el-dropdown-item>-->
                 <el-dropdown-item v-if="permission.hasPermission(`admin/role-edit`)" :command="`edit|${scope.row.ID}`">{{ $t('table.edit') }}</el-dropdown-item>
                 <el-dropdown-item v-if="permission.hasPermission(`admin/role-delete`)" :command="`delete|${scope.row.ID}`">{{ $t('table.delete') }}</el-dropdown-item>
               </el-dropdown-menu>