Browse Source

修改 更换类型 不出页面

hongchuangyanfa 2 years ago
parent
commit
3c851b2d8c

+ 13 - 0
src/api/manager/AdjustForm.js

@@ -62,3 +62,16 @@ export const getSigList = (params) => {
     params
   })
 }
+
+
+
+// 保存默认值
+export const saveDdefual = (data) => {
+  return request({
+    url: '/api/blade-manager/textdictinfo/save_defaulVal',
+    method: 'post',
+    data
+  })
+}
+
+

+ 17 - 15
src/views/manager/projectinfo/treeTemplate/dynamicExcel.vue

@@ -1,9 +1,6 @@
 <template>
   <div class="excelHtnl">
-    <div
-      class="header"
-      style=" position: absolute;left:10px;top:0"
-    >
+    <div class="header" style=" position: absolute;left:10px;top:0">
       <div class="flexStar">
         <h2>编辑WBS库</h2>
         <div
@@ -21,13 +18,8 @@
       class="excelBox"
       style="margin-top:40px;height: 100%;"
     >
-      <div
-        style="width:60%;height: 100%;overflow: scroll;"
-        class='parent'
-        id='parent'
-      ></div>
+      <div style="width:60%;height: 100%;overflow: scroll;" class='parent' id='parent'></div>
       <div class="excelRight" style="width:30%;margin-left:4%;height: 100%;overflow: scroll;" >
-
         <span v-if="type.prop==='tab1'">
           <setInputTPT
             v-if="type.prop==='tab1'"
@@ -52,7 +44,7 @@ import setFormula from './template/setFormula.vue'
 import editDefault from './template/editDefault.vue'
 import promptSettings from './template/promptSettings.vue'
 import Vue from 'vue'
-// import dictVue from '../../../system/dict.vue'
+import {getExcelHtml } from '@/api/exctab/excelmodel'
 export default {
   props: ['pkeyId'],
   data () {
@@ -94,6 +86,8 @@ export default {
     this.type = this.option.column[0];
   },
 
+
+
   methods: {
     GoBack () {//返回上一级
       this.$emit('remove')
@@ -101,9 +95,16 @@ export default {
     handleChange(column) {
       this.type = column;
     },
+    async getExcelHtml (pkeyId) {
+      const { data: res } = await getExcelHtml({ pkeyId })
+      console.log(res);
+      if (res.code === 200) {
+        localStorage.setItem('excelHtml', res.data)
+        this.copss();
+      }
+    },
     async cop () {
       let _that = this
-      console.log("11")
       var MyComponent = await Vue.extend({
         template: localStorage.getItem('excelHtml'),
         data () {
@@ -121,7 +122,8 @@ export default {
           formUploadLoading(){},
           delTableFormFile(){},
           formUploadError(){},
-          uploadprogress(){}
+          uploadprogress(){},
+          getRegularExpression(){}
         }
       })
       var component = new MyComponent().$mount()
@@ -129,7 +131,6 @@ export default {
     },
     async copss () {
       let _that = this
-      console.log("22")
       var MyComponent = await Vue.extend({
         template: localStorage.getItem('excelHtml'),
         data () {
@@ -147,7 +148,8 @@ export default {
           formUploadLoading(){},
           delTableFormFile(){},
           formUploadError(){},
-          uploadprogress(){}
+          uploadprogress(){},
+          getRegularExpression(){}
         }
       })
       var component = new MyComponent().$mount()

+ 131 - 52
src/views/manager/projectinfo/treeTemplate/template/editDefault.vue

@@ -1,65 +1,144 @@
 <template>
-  <div class="editDefault">
-    <el-row :span="24">
-      <el-col :span="3.3" style="line-height: 40px">
-        元素坐标:
-      </el-col>
-      <el-col :span="18">
-        <avue-input v-model="htmlData1.name" placeholder="请点解坐标" :disabled='true' ></avue-input>
-      </el-col>
-    </el-row>
+  <div>
+    <div class="editDefault">
+      <el-row :span="24">
+        <el-col :span="3.3" style="line-height: 40px">
+          元素坐标:
+        </el-col>
+        <el-col :span="18">
+          <avue-input v-model="htmlData1.name" placeholder="请点解坐标" :disabled='true'></avue-input>
+        </el-col>
+      </el-row>
 
-    <el-row :span="24">
-      <el-col :span="3.3" style="line-height: 40px">
-        默认信息:
-      </el-col>
-      <el-col :span="18">
-        <el-input
-          class="martop15"
-          style="width:100%;"
-          type="textarea"
-          :rows="5"
-          placeholder="请输入内容"
-          v-model="textarea"
-        ></el-input>
-      </el-col>
-    </el-row>
-    <el-row style="text-align: center">
-      <el-button type="primary"
-                 size="small"
-                 icon="el-icon-check"
-                 @click="saveType()">保存</el-button> &nbsp;&nbsp;
-      <el-button
-                 class="el-button el-button--default el-button--small"
-                 icon="el-icon-use"
-                 @click="saveType()">清&nbsp;&nbsp;空</el-button>
-    </el-row>
+      <el-row :span="24">
+        <el-col :span="3.3" style="line-height: 40px">
+          默认信息:
+        </el-col>
+        <el-col :span="18">
+          <el-input
+            class="martop15"
+            style="width:100%;"
+            type="textarea"
+            :rows="5"
+            placeholder="请输入内容"
+            v-model="textarea"
+          ></el-input>
+        </el-col>
+      </el-row>
+      <el-row style="text-align: center">
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-check"
+                   @click="saveDdefual()">保存
+        </el-button> &nbsp;&nbsp;
+        <el-button
+          class="el-button el-button--default el-button--small"
+          icon="el-icon-use"
+          @click="cleanDefult()">清&nbsp;&nbsp;空
+        </el-button>
+      </el-row>
+    </div>
+
+    <div style="border: 1px dotted rgb(187, 187, 187);box-sizing: border-box;padding: 0px 15px;"
+         class="martop20 marbottom10">
+      <table @click
+             class="table martop20"
+             width='100%'
+             border='1px '
+             bordercolor="#E5E5E5"
+             cellpadding='2px'
+      >
+        <thead
+          cellpadding='2px'
+          height='40px'
+        >
+        <tr>
+          <th width='30%'>元素位置</th>
+          <th width='30%'>默认值</th>
+          <th width='20%'>操作</th>
+        </tr>
+        </thead>
+        <tbody height='36px'>
+        <tr v-for="(item,key) in setsignaTable" :key="key" v-on:click="">
+          <td>{{ item.colName }}</td>
+          <td>{{ item.sigRoleName }}</td>
+          <td align="center"><span style="color:red;cursor: pointer;" v-on:click="deleteTableSig(key)">删除</span></td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
   </div>
 </template>
 <script>
+import {getSigList, saveDdefual} from "../../../../../api/manager/AdjustForm";
+
 export default {
   props: ['pkeyId1', 'htmlData1'],
-  data () {
+  data() {
     return {
-      options: [{
-        value: '选项1',
-        label: '黄金糕'
-      }, {
-        value: '选项2',
-        label: '双皮奶'
-      }, {
-        value: '选项3',
-        label: '蚵仔煎'
-      }, {
-        value: '选项4',
-        label: '龙须面'
-      }, {
-        value: '选项5',
-        label: '北京烤鸭'
-      }],
-      value: '',
       textarea: '',
+      setsignaTable: []
+    }
+  },
+  methods: {
+    async saveDdefual() {
+
+      if(this.htmlData1.tr === '' || this.htmlData1.td === ''){
+        this.$message({
+          type: "warning",
+          message: "请先选择元素"
+        });
+        return;
+      }
+
+      if(this.textarea === '' || this.textarea=== ''){
+        this.$message({
+          type: "warning",
+          message: "请输入默认值"
+        });
+        return;
+      }
+
+      const {data: res} = await saveDdefual({
+        trIndex: this.htmlData1.tr,
+        tdIndex: this.htmlData1.td,
+        tableId: this.pkeyId1,
+        textId: this.textarea,
+        type: '4',
+      })
+      if (res.code === 200) {
+        this.getSingInfo();
+        this.$message({
+          type: "success",
+          message: "操作成功"
+        });
+        this.$parent.cop();
+      }
+    },
+    deleteTableSig (key) {//删除数据
+      this.setsignaTable.splice(key,1);
+    },
+    cleanDefult () {//删除数据
+      this.textarea='';
+    },
+    async getSingInfo() {
+      const {data: res} = await getSigList(
+        {
+          current: 0,
+          size: 100,
+          tabId: this.pkeyId1,
+          type:4
+        }
+      )
+      if (res.code === 200) {
+        this.setsignaTable = res.data.records;
+      }
     }
+  },
+  created() {
+    this.getSingInfo();
+    this.setsignaTable = [];
+    this.textarea='';
   }
 }
 </script>

+ 2 - 1
src/views/manager/projectinfo/treeTemplate/template/electronicSignature.vue

@@ -186,7 +186,7 @@ export default {
               message: "数据已添加列表中"
             });
             isadd = false;
-            throw new Error('数据已添加列表中')
+            throw new Error('位置只能配置一个电签');
           }
         })
         if(isadd){
@@ -214,6 +214,7 @@ export default {
           current: 0,
           size: 100,
           tabId: this.pkeyId1,
+          type:2
         }
       )
       if (res.code === 200) {

+ 132 - 36
src/views/manager/projectinfo/treeTemplate/template/promptSettings.vue

@@ -1,48 +1,144 @@
 <template>
-  <div class="editDefault">
-    <el-row :span="24">
-      <el-col :span="3.3" style="line-height: 40px">
-        元素坐标:
-      </el-col>
-      <el-col :span="18">
-        <avue-input v-model="htmlData1.name" placeholder="请点解坐标" :disabled='true' ></avue-input>
-      </el-col>
-    </el-row>
+  <div>
+    <div class="editDefault">
+      <el-row :span="24">
+        <el-col :span="3.3" style="line-height: 40px">
+          元素坐标:
+        </el-col>
+        <el-col :span="18">
+          <avue-input v-model="htmlData1.name" placeholder="请点解坐标" :disabled='true'></avue-input>
+        </el-col>
+      </el-row>
 
-    <el-row :span="24">
-      <el-col :span="3.3" style="line-height: 40px">
-        提示信息:
-      </el-col>
-      <el-col :span="18">
-        <el-input
-          class="martop15"
-          style="width:100%;"
-          type="textarea"
-          :rows="5"
-          placeholder="请输入内容"
-          v-model="textarea"
-        ></el-input>
-      </el-col>
-    </el-row>
-    <el-row style="text-align: center">
-      <el-button type="primary"
-                 size="small"
-                 icon="el-icon-circle-plus-outline"
-                 @click="saveType()">保存</el-button> &nbsp;&nbsp;
-      <el-button type="primary"
-                 size="small"
-                 icon="el-icon-circle-plus-outline"
-                 @click="saveType()">清空</el-button>
-    </el-row>
+      <el-row :span="24">
+        <el-col :span="3.3" style="line-height: 40px">
+          提示信息:
+        </el-col>
+        <el-col :span="18">
+          <el-input
+            class="martop15"
+            style="width:100%;"
+            type="textarea"
+            :rows="5"
+            placeholder="请输入内容"
+            v-model="textarea"
+          ></el-input>
+        </el-col>
+      </el-row>
+      <el-row style="text-align: center">
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-circle-plus-outline"
+                   @click="saveTiool()">保存
+        </el-button> &nbsp;&nbsp;
+        <el-button type="primary"
+                   size="small"
+                   icon="el-icon-circle-plus-outline"
+                   @click="cleanDefult()">清空
+        </el-button>
+      </el-row>
+    </div>
+    <div style="border: 1px dotted rgb(187, 187, 187);box-sizing: border-box;padding: 0px 15px;"
+         class="martop20 marbottom10">
+      <table @click
+             class="table martop20"
+             width='100%'
+             border='1px '
+             bordercolor="#E5E5E5"
+             cellpadding='2px'
+      >
+        <thead
+          cellpadding='2px'
+          height='40px'
+        >
+        <tr>
+          <th width='30%'>元素位置</th>
+          <th width='30%'>提示语</th>
+          <th width='20%'>操作</th>
+        </tr>
+        </thead>
+        <tbody height='36px'>
+        <tr v-for="(item,key) in setsignaTable" :key="key" v-on:click="">
+          <td>{{ item.colName }}</td>
+          <td>{{ item.sigRoleName }}</td>
+          <td align="center"><span style="color:red;cursor: pointer;" v-on:click="deleteTableSig(key)">删除</span></td>
+        </tr>
+        </tbody>
+      </table>
+    </div>
   </div>
 </template>
+
 <script>
+import {getSigList, saveDdefual} from "../../../../../api/manager/AdjustForm";
+
 export default {
   props: ['pkeyId1', 'htmlData1'],
-  data () {
+  data() {
     return {
-      options: []
+      textarea: '',
+      setsignaTable: [],
+    }
+  },
+  methods: {
+    cleanDefult () {//清空数据
+      this.textarea='';
+    },
+    async saveTiool() {
+
+      if(this.htmlData1.tr === '' || this.htmlData1.td === ''){
+        this.$message({
+          type: "warning",
+          message: "请先选择元素"
+        });
+        return;
+      }
+
+      if(this.textarea === '' || this.textarea=== ''){
+        this.$message({
+          type: "warning",
+          message: "请输入提示语"
+        });
+        return;
+      }
+
+
+      const {data: res} = await saveDdefual({
+        trIndex: this.htmlData1.tr,
+        tdIndex: this.htmlData1.td,
+        tableId: this.pkeyId1,
+        textId: this.textarea,
+        type: '5',
+      })
+      if (res.code === 200) {
+        this.getSingInfo()
+        this.$message({
+          type: "success",
+          message: "操作成功"
+        });
+        this.$parent.getExcelHtml(this.pkeyId1);
+      }
+    },
+    deleteTableSig(key) {//删除数据
+      this.setsignaTable.splice(key, 1);
+    },
+    async getSingInfo() {
+      const {data: res} = await getSigList(
+        {
+          current: 0,
+          size: 100,
+          tabId: this.pkeyId1,
+          type: 5
+        }
+      )
+      if (res.code === 200) {
+        this.setsignaTable = res.data.records;
+      }
     }
+  },
+  created() {
+    this.getSingInfo();
+    this.setsignaTable = [];
   }
 }
 </script>

+ 5 - 5
vue.config.js

@@ -26,11 +26,11 @@ module.exports = {
         proxy: {
             '/api': {
                 //本地服务接口地址
-                target: 'http://localhost',
-                //target: 'http://192.168.4.6',
-                // target: 'http://47.110.251.215:8090',
-                // target: 'http://192.168.4.12',
-                // target: 'http://192.168.4.44',
+                // target: 'http://192.168.3.64',
+               //target: 'http://47.110.251.215:8090',
+                // target: 'http://192.168.31.121',
+                target: 'http://192.168.0.108',
+                // target: 'http://192.168.31.96',
                 //远程演示服务地址,可用于直接启动项目
                 //target: 'https://saber.bladex.vip/api',
                 ws: true,