Просмотр исходного кода

限制文件预览下载复制打印、首页代办新增任务发起人

cfort 3 лет назад
Родитель
Сommit
8c6df05a1a
2 измененных файлов с 105 добавлено и 92 удалено
  1. 24 5
      src/views/system/dashboard/components/new-home.vue
  2. 81 87
      src/views/viewFile/index.vue

+ 24 - 5
src/views/system/dashboard/components/new-home.vue

@@ -59,6 +59,13 @@
                                 label="任务提交人"
                             />
 
+                            <el-table-column
+                                prop="submitBy"
+                                show-overflow-tooltip
+                                width="100"
+                                label="任务发起人"
+                            />
+
                             <el-table-column
                                 show-overflow-tooltip
                                 width="145"
@@ -533,9 +540,21 @@
             getWait() {
                 this.waitLoading = true
                 pending(this.getFormatParams(null, this.pagination)).then(response => {
-                    if (response.data.dataResult) {
-                        this.pendingData = response.data.dataResult
-                        this.pendingPage = response.data.pageResult
+                    let {dataResult, pageResult} = response.data
+                    if (dataResult && dataResult.length) {
+                        let instList = []
+                        dataResult.forEach(item => {
+                            instList.push(item.bpmnInstId)
+                        })
+                        let sql = `select b.create_by_,a.name_ from ibps_bpm_inst b left join ibps_party_employee a on a.id_ = b.create_by_ where b.bpmn_inst_id_ in (${instList.join(',')})`
+                        curdPost('sql', sql).then(res => {
+                            const data = res.variables && res.variables.data
+                            data.forEach((item, index) => {
+                                dataResult[index].submitBy = item.name_
+                            })
+                            this.pendingData = dataResult
+                            this.pendingPage = pageResult
+                        })
                     }
                     this.waitLoading = false
                 }).catch(() => {
@@ -563,7 +582,7 @@
             getMessage() {
                 // console.log("当前用户id",this.$store.getters.userId)
                 // console.log(this.$store)
-                console.log('当前用户信息', this.$store.getters.userInfo.employee)
+                // console.log('当前用户信息', this.$store.getters.userInfo.employee)
                 // getNews().then(response => {
                 //     this.newsData = response.data;
                 //     this.loading = false
@@ -601,7 +620,7 @@
                 let sql = "select td.*,ie.NAME_ from t_dxtz td,ibps_party_employee ie  where td.bian_zhi_ren_ = ie.id_ and  td.fa_song_fang_shi_ like  '%公告%' ORDER BY create_time_ desc"
 
                 curdPost('sql', sql).then(res => {
-                    console.log(res)
+                    // console.log(res)
                     if (res.state == 200) {
                         let dbData = res.variables.data
                         this.newsDataCms = dbData

+ 81 - 87
src/views/viewFile/index.vue

@@ -1,11 +1,8 @@
 <!--onlyoffice 编辑器-->
 <template>
-  <div>
-      <div
-      id="editorDiv"
-      class="nav"
-      ref = "editor"/>
-  </div>
+    <div>
+        <div id="editorDiv" class="nav" ref="editor" />
+    </div>
 </template>
 
 <script>
@@ -14,89 +11,86 @@ import { showView } from '@/api/platform/file/attachment'
 import { getToken } from '@/utils/auth'
 
 export default {
-  name: 'editor',
-  data() {
-    return {
-      doctype: '',
-      newId:'',
-      timer:'',
-      configKey:'',
-      option:{}
-    }
-  },
-  mounted() {
-    this.option = this.$route.query
-    /* 调用初始化方法 ,渲染wps*/
-    if (this.option.url) {
-      this.setEditor(this.option)
-    }
-  },
-  methods: {
-    setEditor(option) {
-      this.doctype = handleDocType(option.fileType)
-      let url = option.url+ '&access_token=' + getToken();
-      console.log("url:"+url)
-      let config = {
-        document: {
-          fileType: option.fileType,
-          key: option.key,
-          title: option.title,
-          permissions: {
-            comment: true,
-            download: true,
-            modifyContentControl: true,
-            modifyFilter: true,
-            print: true,
-            edit: true,
-            fillForms: true,
-            review: true
-          },
-          url: url
-        },
-        documentType: this.doctype,
-        editorConfig: {
-          callbackUrl: option.editUrl,
-          lang: 'zh',
-          canHistoryRestore:true,
-          canUseHistory:true,
-          customization: {
-            commentAuthorOnly: false,
-            comments: true,
-            compactHeader:false,
-            compactToolbar:true,
-            feedback:false,
-            plugins:true,
-			"feedback": {
-			  "visible": true // 隐藏反馈按钮
-			                },
-			"forcesave": true, // true 表示强制文件保存请求添加到回调处理程序
-			"atuosave":false,//取消强制保存,进行手动保存
-          },
-          user:{
-            id:this.$store.getters.userId,
-            name: this.$store.getters.name
-          },
-          mode:option.mode,
+    name: 'editor',
+    data () {
+        return {
+            doctype: '',
+            newId: '',
+            timer: '',
+            configKey: '',
+            option: {}
+        }
+    },
+    mounted () {
+        this.option = this.$route.query
+        /* 调用初始化方法 ,渲染wps*/
+        if (this.option.url) {
+            this.setEditor(this.option)
+        }
+    },
+    methods: {
+        setEditor (option) {
+            this.doctype = handleDocType(option.fileType)
+            let url = option.url + '&access_token=' + getToken();
+            console.log("url:" + url)
+            let config = {
+                document: {
+                    fileType: option.fileType,
+                    key: option.key,
+                    title: option.title,
+                    permissions: {
+                        comment: true,
+                        copy: false,
+                        download: false,
+                        modifyContentControl: true,
+                        modifyFilter: true,
+                        print: false,
+                        edit: true,
+                        fillForms: true,
+                        review: true
+                    },
+                    url: url
+                },
+                documentType: this.doctype,
+                editorConfig: {
+                    callbackUrl: option.editUrl,
+                    lang: 'zh',
+                    canHistoryRestore: true,
+                    canUseHistory: true,
+                    customization: {
+                        commentAuthorOnly: false,
+                        comments: true,
+                        compactHeader: false,
+                        compactToolbar: true,
+                        feedback: false,
+                        plugins: true,
+                        "feedback": {
+                            "visible": true // 隐藏反馈按钮
+                        },
+                        "forcesave": true, // true 表示强制文件保存请求添加到回调处理程序
+                        "atuosave": false, // 取消强制保存,进行手动保存
+                    },
+                    user: {
+                        id: this.$store.getters.userId,
+                        name: this.$store.getters.name
+                    },
+                    mode: option.mode,
+                },
+                width: '100%',
+                height: document.body.clientHeight + 'px'
+            }
+            let docEditor = new DocsAPI.DocEditor('editorDiv', config)
+            this.configKey = config.document.key
         },
-        width: '100%',
-        height:  document.body.clientHeight+'px'
-      }
-      let docEditor = new DocsAPI.DocEditor('editorDiv', config)
-      this.configKey = config.document.key
     },
-  },
-  watch: {
-    option: {
-      handler: function (n, o) {
-        this.setEditor(n)
-        this.doctype = handleDocType(n.fileType)
-      },
-      deep: true,
+    watch: {
+        option: {
+            handler: function (n, o) {
+                this.setEditor(n)
+                this.doctype = handleDocType(n.fileType)
+            },
+            deep: true,
+        }
     }
-  }
 }
 </script>
-
-<style scoped>
-
-</style>