bzkf3 2 years ago
parent
commit
c130285419

+ 1 - 6
components.d.ts

@@ -8,15 +8,12 @@ declare module '@vue/runtime-core' {
     AppLink: typeof import('./src/components/AppLink/index.vue')['default']
     ElButton: typeof import('element-plus/es')['ElButton']
     ElCascader: typeof import('element-plus/es')['ElCascader']
-    ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
     ElDialog: typeof import('element-plus/es')['ElDialog']
     ElForm: typeof import('element-plus/es')['ElForm']
     ElFormItem: typeof import('element-plus/es')['ElFormItem']
-    ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
-    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
     ElLink: typeof import('element-plus/es')['ElLink']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
@@ -31,15 +28,13 @@ declare module '@vue/runtime-core' {
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElTable: typeof import('element-plus/es')['ElTable']
     ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
-    ElTabPane: typeof import('element-plus/es')['ElTabPane']
-    ElTabs: typeof import('element-plus/es')['ElTabs']
-    ElTree: typeof import('element-plus/es')['ElTree']
     ElUpload: typeof import('element-plus/es')['ElUpload']
     FileLink: typeof import('./src/components/FileLink/index.vue')['default']
     FileUpload: typeof import('./src/components/FileUpload/index.vue')['default']
     ImportButton: typeof import('./src/components/ImportButton/index.vue')['default']
     ItemTable: typeof import('./src/components/ItemTable/index.vue')['default']
     Loading: typeof import('element-plus/es')['ElLoadingDirective']
+    PreviewAttach: typeof import('./src/components/PreviewAttach/index.vue')['default']
     RemoteCascader: typeof import('./src/components/RemoteCascader/index.vue')['default']
     RemoteCascaderClass: typeof import('./src/components/RemoteCascaderClass/index.vue')['default']
     RemoteDictionarySelect: typeof import('./src/components/RemoteDictionarySelect/index.vue')['default']

+ 1 - 1
src/components/FileLink/index.vue

@@ -11,7 +11,7 @@ const props = defineProps<{
 const files = ref(props.file.split(";").map(str => {
     const [part, name] = str.split("|")
     return {
-        url: window.GLOBAL_CONFIG.oss + part,
+        url: window.GLOBAL_CONFIG.oss + '/' + part,
         name: name ?? part
     }
 }))

+ 8 - 8
src/components/ImportButton/index.vue

@@ -17,7 +17,7 @@ const handleTableRowBtns_import = ({ file }: { file: File }) => {
     url: props.importKey ? `${props.url}/import?${props.importKey}` : `${props.url}/import`,
     data: { file },
     onUploadProgress(progressEvent: { loaded: number, total: number }) {
-      percentage.value = ~~(progressEvent.loaded / progressEvent.total * 100 | 0)
+      percentage.value = ~~((progressEvent.loaded / progressEvent.total * 100 - 1) | 0)
     },
   } as AxiosRequestConfig).then((res: any) => {
     loading.value = false
@@ -26,18 +26,18 @@ const handleTableRowBtns_import = ({ file }: { file: File }) => {
   })
 }
 const handleTableRowBtns_export = () => {
-  if(props.exportKey){
+  if (props.exportKey) {
     let name = props.exportKey.split('=')[0];
     let id = props.exportKey.split('=')[1];
-    let data:any = {};
-    data[name]=id;
+    let data: any = {};
+    data[name] = id;
     data.limit = 1;
-    if(id=='837'){
+    if (id == '837') {
       download(`/template/xls/报修类别导入模版.xls`, data);
     }
-    
-  }else{
-    download(`${props.url}/index`, { limit: 1});
+
+  } else {
+    download(`${props.url}/index`, { limit: 1 });
   }
 }
 </script>

+ 21 - 16
src/pages/xdjx/jxjhgl/bkzjh/detail.vue

@@ -20,6 +20,7 @@ type TYPE_TABLE_FIELD = {
   'xjb_cjr': string; // 创建人
   'xjb_cjrq': string; // 创建日期
   'xjb_jhnr': string; // 计划内容
+  'xjb_fj'?: string
 }
 // #endregion
 
@@ -68,33 +69,38 @@ init()
           <div>{{ detail_Data.team_name }}</div>
         </div>
         <!-- <div class="flex">
-          <div>适用学期编号</div>
-          <div>{{detail_Data.team_id}}</div>
-        </div> -->
+            <div>适用学期编号</div>
+            <div>{{detail_Data.team_id}}</div>
+          </div> -->
         <div class="flex mr-30">
           <div>适用年级名称:</div>
           <div>{{ detail_Data.grade_name }}</div>
         </div>
         <!-- <div class="flex">
-          <div>适用年级编号</div>
-          <div>{{detail_Data.grade_id}}</div>
-        </div> -->
+            <div>适用年级编号</div>
+            <div>{{detail_Data.grade_id}}</div>
+          </div> -->
         <!-- <div class="flex">
-          <div>适用学科编号</div>
-          <div>{{detail_Data.subject_id}}</div>
-        </div> -->
+            <div>适用学科编号</div>
+            <div>{{detail_Data.subject_id}}</div>
+          </div> -->
         <div class="flex mr-30">
           <div>适用学科名称:</div>
           <div>{{ detail_Data.subject_name }}</div>
         </div>
         <!-- <div class="flex">
-          <div>创建人</div>
-          <div>{{detail_Data.xjb_cjr}}</div>
-        </div> -->
+            <div>创建人</div>
+            <div>{{detail_Data.xjb_cjr}}</div>
+          </div> -->
         <!-- <div class="flex">
-          <div>创建日期</div>
-          <div>{{detail_Data.xjb_cjrq}}</div>
-        </div> -->
+            <div>创建日期</div>
+            <div>{{detail_Data.xjb_cjrq}}</div>
+          </div> -->
+      </div>
+
+      <div class="flex mr-30">
+        <div>附件:</div>
+        <file-link :file="detail_Data.xjb_fj"></file-link>
       </div>
 
       <div class="flex flex-auto bg-gray-100 text-gray-600 p-4 text-sm">
@@ -103,5 +109,4 @@ init()
       </div>
     </template>
   </div>
-
 </template>

+ 21 - 17
src/pages/xdjx/jxjhgl/jsjxjh/detail.vue

@@ -20,6 +20,7 @@ type TYPE_TABLE_FIELD = {
   'xjj_jhnr': string; // 计划内容
   'xjj_jhmc': string; // 计划名称
   'team_name': string; // 适用学期名称
+  'xjj_fj'?: string
 }
 // #endregion
 
@@ -88,7 +89,7 @@ init()
       <div class="flex">
         <div>适用学期名称</div><div>{{detail_Data.team_name}}</div>
       </div>
-    </template>      
+    </template>
   </div>
 
 </template> -->
@@ -106,33 +107,37 @@ init()
           <div>{{ detail_Data.team_name }}</div>
         </div>
         <!-- <div class="flex">
-          <div>适用学期编号</div>
-          <div>{{detail_Data.team_id}}</div>
-        </div> -->
+            <div>适用学期编号</div>
+            <div>{{detail_Data.team_id}}</div>
+          </div> -->
         <div class="flex mr-30">
           <div>适用年级名称:</div>
           <div>{{ detail_Data.grade_name }}</div>
         </div>
         <!-- <div class="flex">
-          <div>适用年级编号</div>
-          <div>{{detail_Data.grade_id}}</div>
-        </div> -->
+            <div>适用年级编号</div>
+            <div>{{detail_Data.grade_id}}</div>
+          </div> -->
         <!-- <div class="flex">
-          <div>适用学科编号</div>
-          <div>{{detail_Data.subject_id}}</div>
-        </div> -->
+            <div>适用学科编号</div>
+            <div>{{detail_Data.subject_id}}</div>
+          </div> -->
         <div class="flex mr-30">
           <div>适用学科名称:</div>
           <div>{{ detail_Data.subject_name }}</div>
         </div>
         <!-- <div class="flex">
-          <div>创建人</div>
-          <div>{{detail_Data.xjj_cjr}}</div>
-        </div> -->
+            <div>创建人</div>
+            <div>{{detail_Data.xjj_cjr}}</div>
+          </div> -->
         <!-- <div class="flex">
-          <div>创建日期</div>
-          <div>{{detail_Data.xjj_cjrq}}</div>
-        </div> -->
+            <div>创建日期</div>
+            <div>{{detail_Data.xjj_cjrq}}</div>
+          </div> -->
+      </div>
+      <div class="flex mr-30">
+        <div>附件:</div>
+        <file-link :file="detail_Data.xjj_fj"></file-link>
       </div>
 
       <div class="flex flex-auto bg-gray-100 text-gray-600 p-4 text-sm">
@@ -141,5 +146,4 @@ init()
       </div>
     </template>
   </div>
-
 </template>

+ 2 - 2
src/router/index.ts

@@ -2,9 +2,9 @@ import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
 import { RouteRecordDetailRaw } from './routes.d';
 import { app_ready,app_routes } from '~/store/app';
 
-// import localRoutes from './routes/xdjx';
+import localRoutes from './routes/xdjx';
 // import localRoutes from './routes/xdjy';
-import localRoutes from './routes/xdhq';
+// import localRoutes from './routes/xdhq';
 
 const router = createRouter({
   history: createWebHashHistory(),