1
0

3 Commits b5af294eca ... 6c1386824d

Autor SHA1 Mensagem Data
  yangfan 6c1386824d 地图选址组件 há 2 meses atrás
  yangfan cf5e64ce1b Merge branch '1.2.4' into 1.2.4yang há 2 meses atrás
  wu 39d44a1656 搜索列关联优化 há 2 meses atrás

+ 4 - 0
src/components/ColumnDesign/index.vue

@@ -510,6 +510,9 @@
                             <el-button @click="wordShow = true" style="width: 80px">选择模板</el-button>
                           </div>
                         </div>
+                        <div>
+                          {{ columnData.word.wordPath }}
+                        </div>
                         <vxe-modal title="word模板" v-model="wordShow" width="80%" height="70%">
                           <template #default>
                             <a href="info.docx" download style="font-size: 12px">下载实例模板</a>
@@ -1586,6 +1589,7 @@ export default {
     },
     getTep(e) {
       this.columnData.word.wordPath = e.path
+      this.wordShow = false
     }
   }
 }

+ 4 - 2
src/components/Generator/components/JNPFMap/index.vue

@@ -100,7 +100,7 @@ export default {
     }
   },
   async mounted() {
-    await loadJS('http://api.tianditu.gov.cn/api?v=4.0&tk=a4dc3ba4fde4085083ab82395af6c046')
+    await loadJS('https://api.tianditu.gov.cn/api?v=4.0&tk=a4dc3ba4fde4085083ab82395af6c046')
   },
   watch: {
     isShow(val) {
@@ -224,7 +224,9 @@ export default {
     },
     submit() {
       this.isShow = false
-      this.innerValue = [this.mapObject.lon, this.mapObject.lat].join(this.$attrs.keepSeparator)
+      this.$emit('input', [this.mapObject.lon, this.mapObject.lat].join(this.$attrs.keepSeparator))
+      this.$listeners.input([this.mapObject.lon, this.mapObject.lat].join(this.$attrs.keepSeparator))
+      this.value = [this.mapObject.lon, this.mapObject.lat].join(this.$attrs.keepSeparator)
     }
   }
 }

+ 1 - 1
src/utils/define.js

@@ -22,7 +22,7 @@ const BIAPIURl = url + '/bi-api/' //BI
 
 module.exports = {
   APIURl: APIURl,
-  imgurl: imgurl,
+  imgurl: url,
   WLAPIURl: WLAPIURl,
   CSAPIURl: CSAPIURl,
   BIAPIURl: BIAPIURl,

Diff do ficheiro suprimidas por serem muito extensas
+ 1 - 1
src/utils/request.js


+ 11 - 0
src/views/basic/dynamicModel/list/Search.vue

@@ -531,6 +531,17 @@ export default {
           obj.cubeColumnId = e.__vModel__
           obj.function = e.__config__.viewDataType === 'STRING' ? (e.function = 'like') : e.__config__.viewDataType === 'NUMBER' ? (e.function = 'between') : 'between'
           obj.values = values
+          let relationData = this.searchList.find(
+            (field) =>
+              field.relationData && field.relationData.itemRelationList && field.relationData.itemRelationList.length && field.relationData.itemRelationList.find((i) => i.drawId == e.__vModel__)
+          )
+          let associationColumnFlag = false
+          if (relationData) {
+            if (relationData.relationData.itemRelationList.find((i) => i.drawId === e.__vModel__).plaintext === 1) {
+              associationColumnFlag = true
+            }
+          }
+          if (associationColumnFlag) obj.associationColumn = false
           arr.push(obj)
         }
       }

+ 35 - 8
src/views/basic/dynamicModel/list/index.vue

@@ -367,6 +367,13 @@
                       </el-dropdown-item>
                     </template>
                   </template>
+                  <template v-if="columnData?.word?.isWord">
+                    <el-dropdown-item>
+                      <el-button size="mini" type="text" plain :key="i" @click="columnBtnsHandel('wordExport', scope)">
+                        {{ columnData?.word?.wordTitle }}
+                      </el-button>
+                    </el-dropdown-item>
+                  </template>
                   <el-dropdown-item v-if="columnData.isQrcode">
                     <el-button size="mini" type="text" @click="getQrcode(scope.row, scope.row)">下载二维码</el-button>
                   </el-dropdown-item>
@@ -417,6 +424,9 @@
                   </el-dropdown-menu>
                 </el-dropdown>
               </div>
+              <template v-if="columnData.word.isWord">
+                <el-button size="mini" type="text" plain @click="headBtnsHandel('batchWord')"> 批量{{ columnData.word.wordTitle }} </el-button>
+              </template>
               <template>
                 <div v-for="(item, i) in customBtns.filter((o) => o.buttonLocation === 1)" :key="i">
                   <el-button size="mini" type="text" :icon="item.icon" @click="customBtnsBatchHandel(item)">
@@ -557,7 +567,11 @@
             <el-button size="mini" v-if="item.value !== 'journal'" :type="i === 0 ? 'primary' : 'text'" :icon="item.icon" @click="headBtnsHandel(item.value, item.importStatus)" :key="i">
               {{ item.label }}
             </el-button>
-
+            <template v-if="item.value == 'wordExport'">
+              <el-button size="mini" type="text" plain :key="i" @click="columnBtnsHandel(item.value, { row: itemRow }, item)">
+                {{ item.label }}
+              </el-button>
+            </template>
             <!-- <el-dropdown v-else @command="handleCommand">
               <span class="el-dropdown-link">操作日志<i class="el-icon-arrow-down el-icon--right"></i></span>
               <el-dropdown-menu slot="dropdown">
@@ -859,7 +873,7 @@ import { getAPIData, getTreeAPIData } from '@/components/Dataset-filter/util'
 import AmisSdk from '@/components/AmisSdk.vue'
 import { userInfo } from '@/api/user'
 import { getFileById } from '@/api/common'
-import { comUrl } from '@/utils/define'
+import { APIURl, comUrl, imgurl } from '@/utils/define'
 import QRCode from 'qrcodejs2'
 import CardTemplate from '@/components/CardTemplate/index.vue'
 import { getDataPermLabel } from '@/components/Dataset-filter/report'
@@ -2060,6 +2074,10 @@ export default {
           })
         this.batchEdit()
       }
+
+      if (key === 'batchWord') {
+        this.batchWord()
+      }
     },
     handleCommand(command) {
       if (command === 'exportList') {
@@ -2309,8 +2327,12 @@ export default {
         })
       }
       if (key == 'wordExport') {
+        let amisScoped = ''
         this.isWordShow = true
         console.log(this.columnData.word)
+
+        const wordPath = process.env.NODE_ENV === 'development' ? imgurl + '/' : '/'
+
         setTimeout(() => {
           const amis = amisRequire('amis/embed')
           const list = {}
@@ -2324,7 +2346,7 @@ export default {
             }
           })
           const word = document.getElementById('word')
-          const amisScoped = amis.embed(word, {
+          amisScoped = amis.embed(word, {
             type: 'page',
             data: obj,
             body: [
@@ -2359,7 +2381,7 @@ export default {
               {
                 type: 'office-viewer',
                 id: 'office-viewer-print',
-                src: 'info.docx',
+                src: wordPath + this.columnData.word.wordPath,
                 wordOptions: {
                   padding: 0,
                   enableVar: true
@@ -2369,12 +2391,17 @@ export default {
           })
         }, 500)
         // 模拟点击word下的button按钮
-        // setTimeout(() => {
-        //   const button = word.querySelectorAll('button')
-        //   button[0].click()
-        // }, 1000)
+        setTimeout(() => {
+          const wordBuffer = amisScoped.getComponentById('office-viewer-print').document
+          // 上传blob
+          const file = new File([wordBuffer], 'word.docx', { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8' })
+          console.log(file)
+          // const blob = new Blob([wordBuffer], { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=utf-8' })
+          // 打印blob
+        }, 1000)
       }
     },
+    batchWord() {},
     //回收站点击行显示详情数据
     recycleDetail(columnData) {
       let key = Object.keys(columnData)