Parcourir la source

预案演练资料库代码提交

jingyuanchao il y a 2 ans
Parent
commit
2b7a15f5c2
2 fichiers modifiés avec 20 ajouts et 59 suppressions
  1. 1 1
      src/components/K-FileUpload/index.vue
  2. 19 58
      src/views/drill/drillDictionary/index.vue

+ 1 - 1
src/components/K-FileUpload/index.vue

@@ -60,7 +60,7 @@ export default {
     // 文件类型, 例如['png', 'jpg', 'jpeg']
     fileType: {
       type: Array,
-      default: () => ["doc", "xls", "ppt", "txt", "pdf", "et", "zip"],
+      default: () => ["pdf", "jpg", "png", "bmp"],
     },
     // 是否显示提示
     isShowTip: {

+ 19 - 58
src/views/drill/drillDictionary/index.vue

@@ -1,12 +1,7 @@
 <template>
   <div class="app-container">
     <el-row :gutter="20">
-      <!--机构数据-->
-      <el-col :span="4" :xs="24">
-        <org-tree v-model="queryParams.orgId" @defaultKey="getDefaultKey" @checkChange="checkChange"
-                  @click="clickTreeNode" hangsheTree></org-tree>
-      </el-col>
-      <el-col :span="20" :xs="24">
+      <el-col :span="24" :xs="24">
         <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
           <el-form-item label="编号" prop="id">
             <el-input v-model="queryParams.id" placeholder="请输入编号" clearable
@@ -42,30 +37,6 @@
           </el-col>
           <el-col :span="1.5">
             <el-button
-              type="success"
-              plain
-              icon="el-icon-edit"
-              size="mini"
-              :disabled="single"
-              @click="handleUpdate"
-              v-hasPermi="['core:drillDictionary:edit']"
-            >修改
-            </el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button
-              type="danger"
-              plain
-              icon="el-icon-delete"
-              size="mini"
-              :disabled="multiple"
-              @click="handleDelete"
-              v-hasPermi="['core:drillDictionary:remove']"
-            >删除
-            </el-button>
-          </el-col>
-          <el-col :span="1.5">
-            <el-button
               type="warning"
               plain
               icon="el-icon-download"
@@ -79,14 +50,22 @@
         </el-row>
 
         <el-table v-loading="loading" :data="drillDictionaryList" @selection-change="handleSelectionChange">
-          <el-table-column type="selection" width="55" align="center"/>
+          <el-table-column label="编号" align="center" prop="id"/>
           <el-table-column label="演练类型" align="center" prop="drillType">
             <template slot-scope="scope">
               <dict-tag :options="dict.type.core_drill_type" :value="scope.row.drillType"/>
             </template>
           </el-table-column>
-          <el-table-column label="演练项目" align="center" prop="drillProjects"/>
-          <el-table-column label="预设案由" align="center" prop="defaultCause"/>
+          <el-table-column scoped-slot="drillProjects" align="center" prop="drillProjects">
+            <template slot-scope="scope">
+              <div class="ellipsis" :title="scope.row.drillProjects">{{ scope.row.drillProjects }}</div>
+            </template>
+          </el-table-column>
+          <el-table-column scoped-slot="defaultCause" align="center" prop="defaultCause">
+            <template slot-scope="scope">
+              <div class="ellipsis" :title="scope.row.defaultCause">{{ scope.row.defaultCause }}</div>
+            </template>
+          </el-table-column>
           <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button
@@ -131,9 +110,6 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="演练类型名称" prop="drillTypeName">
-          <el-input v-model="form.drillTypeName" placeholder="请输入演练类型名称"/>
-        </el-form-item>
         <el-form-item label="演练项目" prop="drillProjects">
           <el-input v-model="form.drillProjects" type="textarea" placeholder="请输入内容"/>
         </el-form-item>
@@ -195,8 +171,6 @@ export default {
         drillTypeName: null,
         drillProjects: null,
         defaultCause: null,
-        orgId: null,
-        orgName: null,
       },
       // 表单参数
       form: {},
@@ -227,31 +201,11 @@ export default {
       this.form = {
         id: null,
         drillType: null,
-        drillTypeName: null,
         drillProjects: null,
         defaultCause: null,
-        orgId: null,
-        orgName: null,
-        orgPath: null,
-        deleted: null
       };
       this.resetForm("form");
     },
-    getDefaultKey(key) {
-      this.queryParams.orgId = key;
-      this.getList();
-    },
-    //单选框状态改变
-    checkChange(state) {
-      this.queryParams.checkSub = state;
-      this.handleQuery();
-    },
-    // 节点单击事件
-    clickTreeNode(data) {
-      this.initPlanRoleList();
-      this.queryParams.orgId = data.id;
-      this.handleQuery();
-    },
     /** 搜索按钮操作 */
     handleQuery() {
       this.queryParams.pageNum = 1;
@@ -324,3 +278,10 @@ export default {
   }
 };
 </script>
+<style>
+.ellipsis {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+</style>