Browse Source

小修改

sujunling 1 year ago
parent
commit
3afe0f6e58

+ 2 - 2
src/views/authorize/empower/index.vue

@@ -293,9 +293,9 @@ export default defineComponent({
       rowSelection: { type: 'checkbox' },
       useSearchForm: false,
       showTableSetting: true,
-      bordered: false,
+      bordered: true,
       striped: false,
-      canResize: true,
+      canResize: false,
       showIndexColumn: true,
       indexColumnProps: { fixed: 'left' },
       actionColumn: {

+ 62 - 56
src/views/dataAdmin/dataAdmin/fileResourceUpload/index.vue

@@ -22,47 +22,49 @@
       </template>
       <!-- 表格操作栏 -->
       <template #action="{ record }">
-        <TableAction :actions="[
-          {
-            label: '浏览',
-            //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
-            //icon: 'clarity:note-edit-line', //图标
-            onClick: handleUpload.bind(null, record),
-          },
-          {
-            label: '查看',
-            //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
-            //icon: 'clarity:note-edit-line',
-            onClick: handleView.bind(null, record),
-          },
-          {
-            label: '编辑',
-            //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
-            //icon: 'clarity:note-edit-line',
-            //color: 'warning',
-            ifShow: props.isChild,
-            disabled: record.status == 3 ? false : true,
-            onClick: handleEdit.bind(null, record),
-          },
-          {
-            label: '提交审核',
-            //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
-            //icon: 'clarity:note-edit-line',
-            //color: 'warning',
-            ifShow: props.isChild,
-            disabled: record.status == 3 ? false : true,
-            onClick: sendApprove.bind(null, record),
-          },
-          {
-            label: '删除',
-            //auth: 'api:yt:role:delete',
-            //icon: 'ant-design:delete-outlined',
-            //color: 'error',
-            ifShow: props.isChild,
-            disabled: record.status == 3 ? false : true,
-            onClick: handleDelete.bind(null, record),
-          },
-        ]" />
+        <TableAction
+          :actions="[
+            {
+              label: '浏览',
+              //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
+              //icon: 'clarity:note-edit-line', //图标
+              onClick: handleUpload.bind(null, record),
+            },
+            {
+              label: '查看',
+              //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
+              //icon: 'clarity:note-edit-line',
+              onClick: handleView.bind(null, record),
+            },
+            {
+              label: '编辑',
+              //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
+              //icon: 'clarity:note-edit-line',
+              //color: 'warning',
+              ifShow: props.isChild,
+              disabled: record.status == 3 ? false : true,
+              onClick: handleEdit.bind(null, record),
+            },
+            {
+              label: '提交审核',
+              //auth: 'api:yt:role:saveOrUpdateRoleInfoWithMenu:update',
+              //icon: 'clarity:note-edit-line',
+              //color: 'warning',
+              ifShow: props.isChild,
+              disabled: record.status == 3 ? false : true,
+              onClick: sendApprove.bind(null, record),
+            },
+            {
+              label: '删除',
+              //auth: 'api:yt:role:delete',
+              //icon: 'ant-design:delete-outlined',
+              //color: 'error',
+              ifShow: props.isChild,
+              disabled: record.status == 3 ? false : true,
+              onClick: handleDelete.bind(null, record),
+            },
+          ]"
+        />
       </template>
       <template #nodename="{ record }">
         <!-- <Tag>
@@ -152,7 +154,7 @@ export default defineComponent({
     isChild: {
       type: Boolean,
       default: true,
-    }
+    },
   },
   setup(props) {
     //按钮的权限控制标识
@@ -238,7 +240,7 @@ export default defineComponent({
             res.dataVersionConf.active == 'Y' ? '1' : '0';
         }
         let result = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
-        result['flowid'] = record?.flowid
+        result['flowid'] = record?.flowid;
         if (record.bussid) result.bussid = record.bussid;
         openModal(true, {
           record: result,
@@ -262,18 +264,22 @@ export default defineComponent({
       if (res) {
         const fileName = res.fileName;
         const url = res.url;
-        // fetch(url)
-        //   .then((res) => res.blob())
-        //   .then((blob) => {
-        //     // 将链接地址字符内容转变成blob地址
-        //     const a = document.createElement('a');
-        //     a.href = URL.createObjectURL(blob);
-        //     //测试链接console.log(a.href)
-        //     a.download = fileName; // 下载文件的名字
-        //     document.body.appendChild(a);
-        //     a.click();
-        //   });
-        window.open(url);
+        if (
+          url &&
+          (url.indexOf('.png') > -1 || url.indexOf('.png') > -1 || url.indexOf('.pdf') > -1)
+        ) {
+          window.open(url);
+        } else {
+          fetch(url)
+            .then((res) => res.blob())
+            .then((blob) => {
+              const a = document.createElement('a');
+              a.href = URL.createObjectURL(blob);
+              a.download = fileName;
+              document.body.appendChild(a);
+              a.click();
+            });
+        }
       }
     }
 
@@ -290,7 +296,7 @@ export default defineComponent({
         }
         let result = Object.assign(res.metadata, res.servicebase, res.dataVersionConf || {});
         if (record.bussid) result.bussid = record.bussid;
-        result['flowid'] = record?.flowid
+        result['flowid'] = record?.flowid;
         openModal(true, {
           record: result,
           isUpdate: true,

+ 16 - 0
src/views/dataAdmin/dataAdmin/sceneResourceUpload/index.vue

@@ -335,6 +335,22 @@ export default defineComponent({
       });
     }
 
+    //获取流程信息
+    
+    function getFlowInfo(id) {
+      return new Promise((resolve) => {
+        queryFlowInfoPage({
+          page: 1,
+          rows: 1000000,
+          id: id,
+        }).then((res) => {
+          if (res.resp_code === 0) {
+            resolve(res.data);
+          }
+        });
+      });
+    }
+
     return {
       props,
       getKeywords,