Преглед изворни кода

feature(工单): 添加按钮权限

ZZH-wl пре 2 година
родитељ
комит
fcc094fb45

+ 1 - 0
.env.production

@@ -12,4 +12,5 @@ VUE_APP_AdminPath=dashoo.opms.admin-0.0.1
 VUE_APP_ParentPath=dashoo.opms.parent-0.0.1
 VUE_APP_ParentPath=dashoo.opms.parent-0.0.1
 
 
 # 文件上传
 # 文件上传
+VUE_APP_PROTOCOL='https://'
 VUE_APP_UPLOAD_WEED='https://oms.dashoo.cn/dir/assign'
 VUE_APP_UPLOAD_WEED='https://oms.dashoo.cn/dir/assign'

+ 8 - 0
src/views/work/order/components/Edit.vue

@@ -127,6 +127,14 @@
             this.dingtalkForm.items[index].props.value = this.form.custName
             this.dingtalkForm.items[index].props.value = this.form.custName
             this.dingtalkForm.items[index].props.disabled = true
             this.dingtalkForm.items[index].props.disabled = true
           }
           }
+          if (this.dingtalkForm.items[index].props.label === '所在省') {
+            this.dingtalkForm.items[index].props.value = this.form.custProvince
+            this.dingtalkForm.items[index].props.disabled = true
+          }
+          if (this.dingtalkForm.items[index].props.label === '所在市') {
+            this.dingtalkForm.items[index].props.value = this.form.custCity
+            this.dingtalkForm.items[index].props.disabled = true
+          }
         }
         }
         this.$refs.dingTalkFrom.setFormAndRules(this.dingtalkForm)
         this.$refs.dingTalkFrom.setFormAndRules(this.dingtalkForm)
       },
       },

+ 1 - 1
src/views/work/order/index.vue

@@ -30,7 +30,7 @@
         </el-form>
         </el-form>
       </vab-query-form-top-panel>
       </vab-query-form-top-panel>
       <vab-query-form-left-panel :span="12">
       <vab-query-form-left-panel :span="12">
-        <el-button icon="el-icon-plus" size="mini" type="primary" @click="handleEdit">新建</el-button>
+        <!--        <el-button icon="el-icon-plus" size="mini" type="primary" @click="handleEdit">新建</el-button>-->
       </vab-query-form-left-panel>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
       <vab-query-form-right-panel :span="12">
         <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="workOrderTable" />
         <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="workOrderTable" />

+ 19 - 4
src/views/work/orderType/index.vue

@@ -11,8 +11,21 @@
     </el-row>
     </el-row>
     <vab-query-form>
     <vab-query-form>
       <vab-query-form-left-panel :span="12">
       <vab-query-form-left-panel :span="12">
-        <el-button icon="el-icon-plus" size="mini" type="primary" @click="handleEdit">新建</el-button>
-        <el-button icon="el-icon-delete" type="danger" @click="handleDelete($event)">删除</el-button>
+        <el-button
+          v-permissions="['work:order:add']"
+          icon="el-icon-plus"
+          size="mini"
+          type="primary"
+          @click="handleEdit">
+          新建
+        </el-button>
+        <el-button
+          v-permissions="['work:order:delete']"
+          icon="el-icon-delete"
+          type="danger"
+          @click="handleDelete($event)">
+          删除
+        </el-button>
       </vab-query-form-left-panel>
       </vab-query-form-left-panel>
       <vab-query-form-right-panel :span="12">
       <vab-query-form-right-panel :span="12">
         <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="workOrderTypeTable" />
         <table-tool :columns="columns" :show-columns.sync="showColumns" table-type="workOrderTypeTable" />
@@ -45,8 +58,10 @@
       </el-table-column>
       </el-table-column>
       <el-table-column align="center" label="操作" width="120">
       <el-table-column align="center" label="操作" width="120">
         <template #default="{ row }">
         <template #default="{ row }">
-          <el-button type="text" @click="handleEdit(row)">编辑</el-button>
-          <el-button type="text" @click="handleSyncForm(row)">同步表单</el-button>
+          <el-button v-permissions="['work:work:edit']" type="text" @click="handleEdit(row)">编辑</el-button>
+          <el-button v-permissions="['work:work:syncForm']" type="text" @click="handleSyncForm(row)">
+            同步表单
+          </el-button>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
       <template #empty>
       <template #empty>