浏览代码

缺陷修改

贺辰国 4 年之前
父节点
当前提交
d52a7088a3

+ 1 - 1
src/api/common.js

@@ -44,7 +44,7 @@ export function getTree(data) {
     return axios.post("/orgsvr/v2/org/tree/catalog", data);
 }
 
-// 机构树-正确的树,暂时只用在主体机构列表页面
+// 机构树-正确的树 (权限过滤后的)
 export function getOrgTree(data) {
     data.type = data.type || "APP";
     return axios.post("/authsvr/v2/authorginfo/org/tree/catalog", data);

+ 3 - 7
src/pages/common/import/index.vue

@@ -13,7 +13,7 @@
         >
             <i class="el-icon-upload" />
             <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-            <div class="el-upload__tip" slot="tip">只能上传excel(.xls,.xlsm,.xlsx,.et)文件,且不超过1M</div>
+            <div class="el-upload__tip" slot="tip">只能上传 excel(.xls,.xlsm,.xlsx,.et) 文件,且不超过 1000 条</div>
         </dg-upload>
         <!-- <div v-footer>
             <el-button @click="handleCancel">取消</el-button>
@@ -108,14 +108,10 @@ export default {
         beforeUpload(file) {
             const that = this;
             const isExcel = [/.xls$/, /.xlsm$/, /.xlsx$/, /.et$/].some((item) => item.test(file.name));
-            const isLt2M = file.size / 1024 / 1024 < 1;
             if (!isExcel) {
-                that.$message.error("只能上传文件只能是 excel 格式文件!");
+                that.$message.error("只能上传 excel 文件!");
             }
-            if (!isLt2M) {
-                that.$message.error("上传文件大小不能超过 1MB!");
-            }
-            return isExcel && isLt2M;
+            return isExcel;
         },
         onClose() {
             this.$emit("close");

+ 8 - 3
src/pages/data-auth-module/auth-object-manage/appfun-resource-manage/add-func-form.vue

@@ -43,9 +43,10 @@
                                 icon-class="el-icon-folder-opened"
                                 icon-leaf="el-icon-document"
                                 v-model="form.parentId"
-                                placeholder="请选择"
                                 :props="parentTreeProps"
                                 :data="treeData"
+                                :placeholder="form.isRoot?'':'请选择'"
+                                :disabled="form.isRoot"
                                 clearable
                                 filterable
                                 style="width: 100%"
@@ -167,6 +168,7 @@ export default {
             this.isShowForm = true;
             this.changeRuleTrigger("blur");
             this.form = {
+                isRoot: true,
                 appId: this.app.id,
                 appName: this.app.applyName,
                 code: "",
@@ -208,12 +210,15 @@ export default {
                     if (valid) {
                         const { code, parentId } = this.form;
                         if (code == parentId) {
-                            that.$message.error("上级资源不能是自己!");
+                            this.$message.error("上级资源不能是自己!");
                             return;
                         }
 
+                        const data= {...this.form} ;
+                        delete data.isRoot;
+
                         const api = this.form.id ? "update" : "save";
-                        Api[api](this.form)
+                        Api[api](data)
                             .then((res) => {
                                 this.$message.success("保存成功!");
                                 this.timer = new Date().getTime(); // 刷新树组件

+ 1 - 1
src/pages/data-auth-module/auth-object-manage/service-resource-manage/add-form.vue

@@ -20,7 +20,7 @@
                     </div>
                 </el-form-item>
                 <el-form-item label="是否自用服务:" prop="mustSelf">
-                    <dg-select v-model="form.mustSelf" enum="BooleanEnum" v-if="!isDetail"></dg-select>
+                    <dg-select v-model="form.mustSelf" enum="BooleanEnum" v-if="!isDetail" clearable></dg-select>
                     <div v-else>
                         <div class="u-detail__text" v-translate="{ enum: 'BooleanEnum' }">{{ form.mustSelf }}</div>
                     </div>

+ 1 - 1
src/pages/data-auth-module/auth-subject-manage/user-prop-manage/index.vue

@@ -20,7 +20,7 @@
             </el-form-item>
 
             <el-form-item label="所属机构">
-                <select-tree ref="selectTree" @submitTreeValue="getTreeValue" :key="key"></select-tree>
+                <select-tree ref="selectTree" api-name="getOrgTree" @submitTreeValue="getTreeValue" :key="key"></select-tree>
             </el-form-item>
 
             <el-form-item>