Browse Source

admin角色等不可修改+管理驾驶舱修改

yuhan 1 year ago
parent
commit
f8d15d7985

+ 9 - 6
src/views/module_kzks/dashboard/Analysis.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-header-index-wide">
     <template v-if="pageRoleNum > 2">
-      <a-empty :description="false" style="height: 210px;margin-top: 200px;"/>
+      <a-empty description="请联系管理员,当前角色权限设置有误或者当前账户无权限" style="height: 210px;margin-top: 200px;"/>
     </template>
     <template v-else>
       <a-row :gutter="24">
@@ -46,10 +46,11 @@
                 :mode="searchMode"
                 :value="dateValue"
                 @panelChange="handlePanelChange"
-                @openChange="handleChange"
               >
                 <template slot="renderExtraFooter">
-                  extra footer
+                  <div style="width: 100%;">
+                    <a-button type="primary" style="float: right;" @click="handleDateSure">确定</a-button>
+                  </div>
                 </template>
               </a-range-picker>
             </div>
@@ -152,7 +153,7 @@
     })
   }
   export default {
-    name: "IndexChart",
+    name: "dashboard-Analysis",
     components: {
       ChartCard,
       Trend,
@@ -335,6 +336,7 @@
         const month = now.getMonth() + 1; // 月
         const beginDate = `${year}-01`
         const endDate = `${year}-${month}`
+        console.log(month)
         this.dateValue = [beginDate, endDate]
         this.searchParams = {
           time: 'month',
@@ -446,8 +448,9 @@
         }
         // this.modeMonth = [mode[0] === 'date' ? 'month' : mode[0], mode[1] === 'date' ? 'month' : mode[1]];
       },
-      handleChange(status){
-        console.log(status)
+      handleDateSure(){
+        console.log(this.searchParams)
+        this.getDataByDate()
       },
       initLogInfo () {
         getLoginfo(null).then((res)=>{

+ 1 - 1
src/views/system/UserList.vue

@@ -139,7 +139,7 @@
                 <a href="javascript:;" @click="handleChangePassword(record.username)">密码</a>
               </a-menu-item>
 
-              <a-menu-item>
+              <a-menu-item v-if="record.username !== 'admin'">
                 <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                   <a>删除</a>
                 </a-popconfirm>

+ 1 - 1
src/views/system/modules/UserModal.vue

@@ -54,7 +54,7 @@
 
         <a-form-model-item label="角色分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!roleDisabled" >
           <j-multi-select-tag
-                  :disabled="disableSubmit"
+                  :disabled="disableSubmit || model.username === 'admin'"
                   v-model="model.selectedroles"
                   :options="rolesOptions"
                   placeholder="请选择角色">