xuxingan hace 2 años
padre
commit
0252905799
Se han modificado 36 ficheros con 11399 adiciones y 1609 borrados
  1. 18 1
      src/components/p-header.vue
  2. 115 64
      src/pages/main/advertising/businessHall.vue
  3. 9 0
      src/pages/main/advertising/materialApplicationDetail.vue
  4. 71 36
      src/pages/main/advertising/materialApplicationadd.vue
  5. 227 104
      src/pages/main/advertising/materiel.vue
  6. 9 9
      src/pages/main/advertising/supplier.vue
  7. 1100 0
      src/pages/main/collect/collect.vue
  8. 353 0
      src/pages/main/collect/common/export.js
  9. 177 0
      src/pages/main/collect/components/deptTreeOnly.vue
  10. 74 0
      src/pages/main/collect/components/dialog.vue
  11. 103 0
      src/pages/main/collect/components/form.vue
  12. 38 0
      src/pages/main/collect/components/pagination.vue
  13. 985 0
      src/pages/main/collect/components/sheet.vue
  14. 239 0
      src/pages/main/collect/components/table.vue
  15. 200 0
      src/pages/main/collect/index.vue
  16. 1038 0
      src/pages/main/collect/launch.vue
  17. 1216 1074
      src/pages/main/file/flieList.vue
  18. 254 0
      src/pages/main/itknowledgetop/addKnowledge.vue
  19. 503 0
      src/pages/main/itknowledgetop/catalog.vue
  20. 724 0
      src/pages/main/itknowledgetop/copyIndex.vue
  21. 2 0
      src/pages/main/itknowledgetop/data.js
  22. 193 0
      src/pages/main/itknowledgetop/index.vue
  23. 566 0
      src/pages/main/itknowledgetop/knowledgeExamine.vue
  24. 987 0
      src/pages/main/itknowledgetop/knowledgeManagement.vue
  25. 374 0
      src/pages/main/itknowledgetop/knowledgeType.vue
  26. 366 0
      src/pages/main/itknowledgetop/mcIndex.vue
  27. 20 0
      src/pages/main/knowledgetop/index.vue
  28. 224 0
      src/pages/main/logQuery/logQueryList.vue
  29. 4 2
      src/pages/main/organizaStructure/index.vue
  30. 406 6
      src/pages/main/performance/components/form.vue
  31. 333 27
      src/pages/main/performance/components/sheet.vue
  32. 30 6
      src/pages/main/performance/components/table.vue
  33. 102 4
      src/pages/main/performance/department.vue
  34. 191 192
      src/pages/main/performance/index.vue
  35. 65 14
      src/pages/main/performance/mould.vue
  36. 83 70
      src/pages/main/performance/reply.vue

+ 18 - 1
src/components/p-header.vue

@@ -24,7 +24,7 @@
         <i class="el-icon-time"></i>
         <i class="el-icon-time"></i>
         {{ $formatDate(date, "YYYY-MM-DD") }}
         {{ $formatDate(date, "YYYY-MM-DD") }}
       </div>
       </div>
-      <div class="bars-item" @click="handleCall">
+      <div class="bars-item" @click="handleGoToKnowledge">
         <i class="el-icon-chat-dot-round"></i>
         <i class="el-icon-chat-dot-round"></i>
         知识库
         知识库
       </div>
       </div>
@@ -105,6 +105,23 @@ export default {
         }
         }
       });
       });
     },
     },
+    handleGoToKnowledge() {
+      this.$http({
+        url: "/sysmgr/csysdept/queryGroupListByLoginNo",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        console.log("header" + res.data[0].parentorgid);
+        if (res.data[0].parentorgid === "00440063000000000000") {
+          this.$router.push("itknowledgetop");
+        } else {
+          this.$router.push("knowledgetop");
+        }
+      });
+    },
     handleCall() {
     handleCall() {
       this.$switchTab(
       this.$switchTab(
         this,
         this,

+ 115 - 64
src/pages/main/advertising/businessHall.vue

@@ -48,7 +48,7 @@
                     style="width: 100%"
                     style="width: 100%"
                     v-loading="loading"
                     v-loading="loading"
                 >
                 >
-                    <el-table-column prop="regionName" label="地市公司">
+                    <el-table-column prop="regionName" label="公司">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="regionCode" label="公司编码">
                     <el-table-column prop="regionCode" label="公司编码">
                     </el-table-column>
                     </el-table-column>
@@ -56,16 +56,25 @@
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="countyCode" label="区县编码">
                     <el-table-column prop="countyCode" label="区县编码">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="channelCode" label="渠道编码">
+                    <el-table-column prop="countyTime" label="日期">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="channelName" label="渠道名称">
+                    <el-table-column prop="countyType" label="表单类型">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="sts" label="营业状态">
+<!--                    <el-table-column prop="countyCityCode" label="渠道/小区编码">-->
+<!--&lt;!&ndash;                        待更改&ndash;&gt;-->
+<!--                    </el-table-column>-->
+<!--                    <el-table-column prop="countyCityCodeName" label="渠道/小区/校园名称">-->
+<!--                    </el-table-column>-->
+                    <el-table-column prop="channelCode" label="渠道/小区编码">
+                    </el-table-column>
+                    <el-table-column prop="channelName" label="渠道/小区/校园名称">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="sceneName" label="场景">
+                    <el-table-column prop="sts" label="营业状态">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="metirialType" label="物料类别">
+                    <el-table-column prop="sceneName" label="使用场景">
                     </el-table-column>
                     </el-table-column>
+<!--                    <el-table-column prop="metirialType" label="物料类别">-->
+<!--                    </el-table-column>-->
                     <el-table-column
                     <el-table-column
                         prop="metirialCode"
                         prop="metirialCode"
                         label="物料编码"
                         label="物料编码"
@@ -89,16 +98,16 @@
                         show-overflow-tooltip
                         show-overflow-tooltip
                     >
                     >
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="length" label="长">
+                    <el-table-column prop="length" label="长(米)">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="width" label="宽"> </el-table-column>
+                    <el-table-column prop="width" label="宽(米)"> </el-table-column>
                     <el-table-column prop="direction" label="横/竖">
                     <el-table-column prop="direction" label="横/竖">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="coefficient" label="系数">
                     <el-table-column prop="coefficient" label="系数">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column
                     <el-table-column
                         prop="priority"
                         prop="priority"
-                        label="优先级(仅灯箱需要填写)"
+                        label="优先级-仅灯箱画面填报"
                     >
                     >
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="quantity" label="数量">
                     <el-table-column prop="quantity" label="数量">
@@ -158,7 +167,7 @@
         <el-dialog
         <el-dialog
             :title="titname"
             :title="titname"
             :visible.sync="dialogStatus"
             :visible.sync="dialogStatus"
-            width="50%"
+            width="100%"
             :destroy-on-close="true"
             :destroy-on-close="true"
             :modal-append-to-body="false"
             :modal-append-to-body="false"
             :close-on-click-modal="false"
             :close-on-click-modal="false"
@@ -173,11 +182,11 @@
                 >
                 >
                     <div class="info-line">
                     <div class="info-line">
                         <el-form-item prop="regionName">
                         <el-form-item prop="regionName">
-                            <span>地市公司</span>
+                            <span>公司</span>
                             <el-select
                             <el-select
                                 :popper-append-to-body="false"
                                 :popper-append-to-body="false"
                                 v-model="infolist.regionCode"
                                 v-model="infolist.regionCode"
-                                placeholder="地市公司"
+                                placeholder="公司"
                                 @change="verifcheck"
                                 @change="verifcheck"
                                 :disabled="disableStatus"
                                 :disabled="disableStatus"
                             >
                             >
@@ -224,8 +233,23 @@
                                 disabled
                                 disabled
                             ></el-input>
                             ></el-input>
                         </el-form-item>
                         </el-form-item>
+                        <el-form-item>
+                            <span>日期</span>
+                            <el-date-picker
+                                type="date"
+                                placeholder="选择日期"
+                                v-model="infolist.countyTime"
+                                style="width: 57%;"
+                            ></el-date-picker>
+                        </el-form-item>
+                        <el-form-item>
+                            <span>表单类型</span>
+                            <el-select v-model="infolist.countyType" placeholder="请选择表单类型">
+                                <el-option v-for="(item,index) in optionList" :label="item.value" :value="item.id" :key="index"></el-option>
+                            </el-select>
+                        </el-form-item>
                         <el-form-item prop="channelCode">
                         <el-form-item prop="channelCode">
-                            <span>渠道编码</span>
+                            <span>渠道/小区编码</span>
                             <el-input
                             <el-input
                                 v-model="infolist.channelCode"
                                 v-model="infolist.channelCode"
                                 placeholder="渠道编码"
                                 placeholder="渠道编码"
@@ -234,10 +258,10 @@
                             </el-input>
                             </el-input>
                         </el-form-item>
                         </el-form-item>
                         <el-form-item prop="channelName">
                         <el-form-item prop="channelName">
-                            <span>渠道名称</span>
+                            <span>渠道/小区/校园名称</span>
                             <el-input
                             <el-input
                                 v-model="infolist.channelName"
                                 v-model="infolist.channelName"
-                                placeholder="营业厅名称、校园名称、小区名称"
+                                placeholder="渠道/校园/小区名称"
                                 :disabled="disableStatus"
                                 :disabled="disableStatus"
                             >
                             >
                             </el-input>
                             </el-input>
@@ -261,12 +285,12 @@
                             </el-select>
                             </el-select>
                         </el-form-item>
                         </el-form-item>
                         <el-form-item prop="sceneName">
                         <el-form-item prop="sceneName">
-                            <span>场景</span>
+                            <span>使用场景</span>
                             <el-select
                             <el-select
                                 @change="accountcho"
                                 @change="accountcho"
                                 :popper-append-to-body="false"
                                 :popper-append-to-body="false"
                                 v-model="infolist.sceneName"
                                 v-model="infolist.sceneName"
-                                placeholder="场景"
+                                placeholder="使用场景"
                                 :disabled="disableStatus"
                                 :disabled="disableStatus"
                             >
                             >
                                 <el-option
                                 <el-option
@@ -278,23 +302,23 @@
                                 </el-option>
                                 </el-option>
                             </el-select>
                             </el-select>
                         </el-form-item>
                         </el-form-item>
-                        <el-form-item prop="metirialType">
-                            <span>物料类别</span>
-                            <el-select
-                                :disabled="disableStatus"
-                                :popper-append-to-body="false"
-                                v-model="infolist.metirialType"
-                                placeholder="物料类别"
-                            >
-                                <el-option
-                                    v-for="(item, index) in metirialTypeopt"
-                                    :key="index"
-                                    :label="item.dataName"
-                                    :value="item.dataName"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
+<!--                        <el-form-item prop="metirialType">-->
+<!--                            <span>物料类别</span>-->
+<!--                            <el-select-->
+<!--                                :disabled="disableStatus"-->
+<!--                                :popper-append-to-body="false"-->
+<!--                                v-model="infolist.metirialType"-->
+<!--                                placeholder="物料类别"-->
+<!--                            >-->
+<!--                                <el-option-->
+<!--                                    v-for="(item, index) in metirialTypeopt"-->
+<!--                                    :key="index"-->
+<!--                                    :label="item.dataName"-->
+<!--                                    :value="item.dataName"-->
+<!--                                >-->
+<!--                                </el-option>-->
+<!--                            </el-select>-->
+<!--                        </el-form-item>-->
                         <el-form-item>
                         <el-form-item>
                             <span>物料编码</span>
                             <span>物料编码</span>
                             <el-input
                             <el-input
@@ -331,7 +355,7 @@
                             <span>规格尺寸</span>
                             <span>规格尺寸</span>
                             <el-input
                             <el-input
                                 v-model="infolist.size"
                                 v-model="infolist.size"
-                                disabled
+
                             ></el-input>
                             ></el-input>
                         </el-form-item>
                         </el-form-item>
                         <el-form-item
                         <el-form-item
@@ -341,7 +365,7 @@
                                     infolist.unit == '延长米'
                                     infolist.unit == '延长米'
                             "
                             "
                         >
                         >
-                            <span>长</span>
+                            <span>长(米)</span>
                             <el-input
                             <el-input
                                 type="number"
                                 type="number"
                                 v-model="infolist.length"
                                 v-model="infolist.length"
@@ -354,7 +378,7 @@
                             prop="width"
                             prop="width"
                             v-if="infolist.unit == '平方米'"
                             v-if="infolist.unit == '平方米'"
                         >
                         >
-                            <span>宽</span>
+                            <span>宽(米)</span>
                             <el-input
                             <el-input
                                 type="number"
                                 type="number"
                                 v-model="infolist.width"
                                 v-model="infolist.width"
@@ -364,21 +388,14 @@
                             </el-input>
                             </el-input>
                         </el-form-item>
                         </el-form-item>
                         <el-form-item prop="direction">
                         <el-form-item prop="direction">
-                            <span>横竖</span>
-                            <el-select
+                            <span>横/竖</span>
+                            <el-input
                                 :disabled="disableStatus"
                                 :disabled="disableStatus"
                                 :popper-append-to-body="false"
                                 :popper-append-to-body="false"
                                 v-model="infolist.direction"
                                 v-model="infolist.direction"
-                                placeholder="横竖"
+                                placeholder="横/竖"
                             >
                             >
-                                <el-option
-                                    v-for="(item, index) in directionopt"
-                                    :key="index"
-                                    :label="item.directionName"
-                                    :value="item.directionName"
-                                >
-                                </el-option>
-                            </el-select>
+                            </el-input>
                         </el-form-item>
                         </el-form-item>
                         <el-form-item>
                         <el-form-item>
                             <span>系数</span>
                             <span>系数</span>
@@ -388,13 +405,21 @@
                                 disabled
                                 disabled
                             ></el-input>
                             ></el-input>
                         </el-form-item>
                         </el-form-item>
+                        <el-form-item>
+                            <span>单价</span>
+                            <el-input
+                                :value="coefficient"
+                                placeholder="单价"
+                                disabled
+                            ></el-input>
+                        </el-form-item>
                         <el-form-item
                         <el-form-item
-                            v-if="infolist.metirialType == '卡布灯箱'"
+
                         >
                         >
-                            <span>卡布灯箱优先级</span>
+                            <span>优先级-仅灯箱画面填报</span>
                             <el-input
                             <el-input
                                 v-model="infolist.priority"
                                 v-model="infolist.priority"
-                                placeholder="卡布灯箱优先级"
+                                placeholder="优先级-仅灯箱画面填报"
                                 @keyup.native="numberVertify"
                                 @keyup.native="numberVertify"
                             ></el-input>
                             ></el-input>
                         </el-form-item>
                         </el-form-item>
@@ -407,7 +432,7 @@
                             ></el-input>
                             ></el-input>
                         </el-form-item>
                         </el-form-item>
                         <el-form-item>
                         <el-form-item>
-                            <span>单价</span>
+                            <span>物料单价(不含税)</span>
                             <el-input
                             <el-input
                                 v-model="infolist.price"
                                 v-model="infolist.price"
                                 disabled
                                 disabled
@@ -570,6 +595,22 @@ export default {
         // };
         // };
 
 
         return {
         return {
+            optionList:[{
+                id:'自有渠道',
+                value:'自有渠道'
+            },{
+                id:'合作渠道',
+                value:'合作渠道'
+            },{
+                id:'家庭市场',
+                value:'家庭市场'
+            },{
+                id:'个人市场',
+                value:'个人市场'
+            },{
+                id:'政企市场',
+                value:'政企市场'
+            }],
             rules: {
             rules: {
                 regionName: [
                 regionName: [
                     {
                     {
@@ -689,12 +730,12 @@ export default {
                     value: "",
                     value: "",
                     width: "16%"
                     width: "16%"
                 },
                 },
-                {
-                    type: "input",
-                    tit: "物料类别",
-                    value: "",
-                    width: "16%"
-                },
+                // {
+                //     type: "input",
+                //     tit: "物料类别",
+                //     value: "",
+                //     width: "16%"
+                // },
                 {
                 {
                     type: "input",
                     type: "input",
                     tit: "物料名称",
                     tit: "物料名称",
@@ -772,10 +813,10 @@ export default {
                     dataName: "关闭",
                     dataName: "关闭",
                     dataCode: "2"
                     dataCode: "2"
                 },
                 },
-                {
-                    dataName: "暂停营业",
-                    dataCode: "3"
-                }
+                // {
+                //     dataName: "暂停营业",
+                //     dataCode: "3"
+                // }
             ],
             ],
             ststOpt: [
             ststOpt: [
                 {
                 {
@@ -789,14 +830,22 @@ export default {
             ],
             ],
             sceneOpt: [
             sceneOpt: [
                 {
                 {
-                    dataName: "营业厅-VI改造",
+                    dataName: "营业厅-VI改造-自有渠道",
                     dataCode: "1"
                     dataCode: "1"
                 },
                 },
                 {
                 {
-                    dataName: "营业厅-常规物料",
+                    dataName: "营业厅-常规物料-自有渠道",
                     dataCode: "2"
                     dataCode: "2"
                 },
                 },
                 {
                 {
+                    dataName: "营业厅-VI改造-合作渠道",
+                    dataCode: "6"
+                },
+                {
+                    dataName: "营业厅-常规物料-合作渠道",
+                    dataCode: "7"
+                },
+                {
                     dataName: "小区",
                     dataName: "小区",
                     dataCode: "3"
                     dataCode: "3"
                 },
                 },
@@ -1008,6 +1057,7 @@ export default {
             } else if (v === 3) {
             } else if (v === 3) {
                 this.titname = "添加";
                 this.titname = "添加";
                 this.disableStatus = false;
                 this.disableStatus = false;
+                this.infolist.countyTime = this.$formatDate(new Date(),"YYYY-MM-DD")
                 // this.infolist.unit = "延长米";
                 // this.infolist.unit = "延长米";
             }
             }
             // this.infolist.opNo = this.userInfo.loginNo;
             // this.infolist.opNo = this.userInfo.loginNo;
@@ -1037,6 +1087,7 @@ export default {
                     new Date(),
                     new Date(),
                     "YYYY-MM-DD"
                     "YYYY-MM-DD"
                 );
                 );
+                this.infolist.countyTime = this.$formatDate(this.infolist.countyTime,"YYYY-MM-DD")
 
 
                 if (this.titname === "添加") {
                 if (this.titname === "添加") {
                     this.submitInfo("/market/cadvBusiMetirial/add");
                     this.submitInfo("/market/cadvBusiMetirial/add");

+ 9 - 0
src/pages/main/advertising/materialApplicationDetail.vue

@@ -80,6 +80,14 @@
                             </el-option>
                             </el-option>
                         </el-select>
                         </el-select>
                     </el-form-item>
                     </el-form-item>
+                    <el-form-item prop="stsId">
+                        <span>渠道编码</span>
+                        <el-input
+                            v-model="searchSection.channelCode"
+                            placeholder="渠道编码"
+                        >
+                        </el-input>
+                    </el-form-item>
                     <el-button class="btn-check" size="medium" type="primary" plain icon="el-icon-search" @click="searchCli">搜索
                     <el-button class="btn-check" size="medium" type="primary" plain icon="el-icon-search" @click="searchCli">搜索
                 </el-button>
                 </el-button>
                 </div>
                 </div>
@@ -537,6 +545,7 @@ export default {
             this.searchSection.regionCode ? this.params.regionCode = this.searchSection.regionCode : '';
             this.searchSection.regionCode ? this.params.regionCode = this.searchSection.regionCode : '';
             this.searchSection.countyCode ? this.params.countyCode = this.searchSection.countyCode : '';
             this.searchSection.countyCode ? this.params.countyCode = this.searchSection.countyCode : '';
             this.searchSection.metirialType ? this.params.metirialType = this.searchSection.metirialType : '';
             this.searchSection.metirialType ? this.params.metirialType = this.searchSection.metirialType : '';
+            this.searchSection.channelCode ? this.params.channelCode = this.searchSection.channelCode : '';
             this.params.woSts = this.searchSection.stsId;
             this.params.woSts = this.searchSection.stsId;
             this.params.woId = this.$route.query.id;
             this.params.woId = this.$route.query.id;
 
 

+ 71 - 36
src/pages/main/advertising/materialApplicationadd.vue

@@ -78,6 +78,10 @@
                                     </el-table-column>
                                     </el-table-column>
                                     <el-table-column prop="id" label="物料ID">
                                     <el-table-column prop="id" label="物料ID">
                                     </el-table-column>
                                     </el-table-column>
+                                    <el-table-column prop="countyTime" label="日期">
+                                    </el-table-column>
+                                    <el-table-column prop="countyType" label="表单类型">
+                                    </el-table-column>
                                     <el-table-column
                                     <el-table-column
                                         prop="regionName"
                                         prop="regionName"
                                         label="地市公司"
                                         label="地市公司"
@@ -95,7 +99,7 @@
                                     </el-table-column>
                                     </el-table-column>
                                     <el-table-column
                                     <el-table-column
                                         prop="channelName"
                                         prop="channelName"
-                                        label="渠道名称"
+                                        label="渠道/小区/校园名称"
                                     >
                                     >
                                     </el-table-column>
                                     </el-table-column>
                                     <el-table-column
                                     <el-table-column
@@ -103,11 +107,11 @@
                                         label="场景"
                                         label="场景"
                                     >
                                     >
                                     </el-table-column>
                                     </el-table-column>
-                                    <el-table-column
-                                        prop="metirialType"
-                                        label="物料类别"
-                                    >
-                                    </el-table-column>
+<!--                                    <el-table-column-->
+<!--                                        prop="metirialType"-->
+<!--                                        label="物料类别"-->
+<!--                                    >-->
+<!--                                    </el-table-column>-->
                                     <el-table-column
                                     <el-table-column
                                         prop="metirialCode"
                                         prop="metirialCode"
                                         label="物料编码"
                                         label="物料编码"
@@ -255,23 +259,38 @@
                             </el-option>
                             </el-option>
                         </el-select>
                         </el-select>
                     </el-form-item>
                     </el-form-item>
-                    <el-form-item prop="metirialType">
-                        <span>物料类别</span>
-                        <el-select
-                            @change="changeSearch(2)"
-                            clearable
-                            v-model="infolist.metirialType"
-                            placeholder="物料类别"
-                        >
-                            <el-option
-                                v-for="(items, index) in metirialTypeOpt"
-                                :key="index"
-                                :label="items.metirialType"
-                                :value="items.metirialType"
-                            >
-                            </el-option>
+                    <el-form-item>
+                        <span>日期</span>
+                        <el-date-picker
+                            type="date"
+                            placeholder="选择日期"
+                            v-model="infolist.countyTime"
+                            style="width: 57%;"
+                        ></el-date-picker>
+                    </el-form-item>
+                    <el-form-item>
+                        <span>表单类型</span>
+                        <el-select v-model="infolist.countyType" placeholder="请选择表单类型">
+                            <el-option v-for="(item,index) in optionList" :label="item.value" :value="item.id" :key="index"></el-option>
                         </el-select>
                         </el-select>
                     </el-form-item>
                     </el-form-item>
+<!--                    <el-form-item prop="metirialType">-->
+<!--                        <span>物料类别</span>-->
+<!--                        <el-select-->
+<!--                            @change="changeSearch(2)"-->
+<!--                            clearable-->
+<!--                            v-model="infolist.metirialType"-->
+<!--                            placeholder="物料类别"-->
+<!--                        >-->
+<!--                            <el-option-->
+<!--                                v-for="(items, index) in metirialTypeOpt"-->
+<!--                                :key="index"-->
+<!--                                :label="items.metirialType"-->
+<!--                                :value="items.metirialType"-->
+<!--                            >-->
+<!--                            </el-option>-->
+<!--                        </el-select>-->
+<!--                    </el-form-item>-->
                     <el-form-item prop="metirialName">
                     <el-form-item prop="metirialName">
                         <span>物料名称</span>
                         <span>物料名称</span>
                         <el-select
                         <el-select
@@ -297,7 +316,7 @@
                             multiple
                             multiple
                             v-model="infolist.regionCode"
                             v-model="infolist.regionCode"
                             placeholder="地市名称"
                             placeholder="地市名称"
-                        >   
+                        >
                             <!-- <el-option
                             <!-- <el-option
                                 label="全选"
                                 label="全选"
                                 value="selAllCity"
                                 value="selAllCity"
@@ -338,12 +357,12 @@
                         </el-select>
                         </el-select>
                     </el-form-item>
                     </el-form-item>
                     <el-form-item prop="channelCode">
                     <el-form-item prop="channelCode">
-                        <span>渠道名称</span>
+                        <span>渠道/小区/校园名称</span>
                         <el-select
                         <el-select
                             clearable
                             clearable
                             multiple
                             multiple
                             v-model="infolist.channelCode"
                             v-model="infolist.channelCode"
-                            placeholder="渠道名称"
+                            placeholder="渠道/小区/校园名称"
                         >
                         >
                             <el-checkbox v-model="isSelAllChannel" @change='selectAllChannel' class="checkboxStyle">全选</el-checkbox>
                             <el-checkbox v-model="isSelAllChannel" @change='selectAllChannel' class="checkboxStyle">全选</el-checkbox>
                             <el-option
                             <el-option
@@ -430,7 +449,7 @@
                     <!-- <el-form-item
                     <!-- <el-form-item
                         class="info-line online"
                         class="info-line online"
                         v-if="companyFlag == 1"
                         v-if="companyFlag == 1"
-                    >   
+                    >
                         <el-radio-group v-model="approvalDirection">
                         <el-radio-group v-model="approvalDirection">
                             <el-radio :label="1">区县市场部主任,区县总经理</el-radio>
                             <el-radio :label="1">区县市场部主任,区县总经理</el-radio>
                             <el-radio :label="2">需求部门领导</el-radio>
                             <el-radio :label="2">需求部门领导</el-radio>
@@ -456,8 +475,8 @@
                             </p>
                             </p>
                         </div>
                         </div>
                     </el-form-item>
                     </el-form-item>
-                    
-                    
+
+
                 </el-form>
                 </el-form>
 
 
                 <div
                 <div
@@ -563,6 +582,22 @@ export default {
         // };
         // };
 
 
         return {
         return {
+            optionList:[{
+                id:1,
+                value:'自有渠道'
+            },{
+                id:2,
+                value:'合作渠道'
+            },{
+                id:3,
+                value:'家庭市场'
+            },{
+                id:4,
+                value:'个人市场'
+            },{
+                id:5,
+                value:'政企市场'
+            }],
             rules: {
             rules: {
                 terminalTypeName: [
                 terminalTypeName: [
                     {
                     {
@@ -819,7 +854,7 @@ export default {
                             }).then(res => {
                             }).then(res => {
                                 countyOpt2 = countyOpt2.concat(res.data);
                                 countyOpt2 = countyOpt2.concat(res.data);
                                 this.countyOpt = countyOpt2;
                                 this.countyOpt = countyOpt2;
-                                
+
                             });
                             });
                         }
                         }
                     }
                     }
@@ -866,7 +901,7 @@ export default {
                     this.isSelAllCounty = true
                     this.isSelAllCounty = true
                 }else{
                 }else{
                     this.isSelAllCounty = false
                     this.isSelAllCounty = false
-                    
+
                 }
                 }
                 this.$http({
                 this.$http({
                     url: "/market/cadvBusiMetirial/queryChannel",
                     url: "/market/cadvBusiMetirial/queryChannel",
@@ -881,7 +916,7 @@ export default {
             } else {
             } else {
 
 
                 this.infolist.countyCode = [];
                 this.infolist.countyCode = [];
-                
+
                 if(ev.length === this.regionOpt.length){
                 if(ev.length === this.regionOpt.length){
                     this.isSelAllCity = true
                     this.isSelAllCity = true
                 }else{
                 }else{
@@ -908,13 +943,13 @@ export default {
                             }).then(res => {
                             }).then(res => {
                                 countyOpt2 = countyOpt2.concat(res.data);
                                 countyOpt2 = countyOpt2.concat(res.data);
                                 this.countyOpt = countyOpt2;
                                 this.countyOpt = countyOpt2;
-                                
+
                             });
                             });
                         }
                         }
                     }
                     }
                 }
                 }
-                
-                
+
+
             }
             }
         },
         },
         //获取物料类型
         //获取物料类型
@@ -1133,7 +1168,7 @@ export default {
                         },
                         },
                         data: v
                         data: v
                     }).then(res => {
                     }).then(res => {
-                        
+
                         if (res.data.result === 2) {
                         if (res.data.result === 2) {
                             _this.$message({
                             _this.$message({
                                 message: res.data.desc,
                                 message: res.data.desc,
@@ -1213,7 +1248,7 @@ export default {
                     // message: '取消按钮点击'
                     // message: '取消按钮点击'
                     // })
                     // })
                 });
                 });
-                
+
         },
         },
         // closeMessage(v) {
         // closeMessage(v) {
         //     this.centerDialogVisible = false;
         //     this.centerDialogVisible = false;
@@ -1347,7 +1382,7 @@ export default {
         // info.channelCodePks = "232344,23323,wgeg,qw";
         // info.channelCodePks = "232344,23323,wgeg,qw";
         // info.regionCodePks = "304422,304423";
         // info.regionCodePks = "304422,304423";
         // info.countyCodePks = "00440022002100000000,00440023002100000000";
         // info.countyCodePks = "00440022002100000000,00440023002100000000";
-        
+
         // this.$http({
         // this.$http({
         //     url: "/market/advBusiMetirial/queryList",
         //     url: "/market/advBusiMetirial/queryList",
         //     method: "post",
         //     method: "post",

+ 227 - 104
src/pages/main/advertising/materiel.vue

@@ -7,13 +7,17 @@
                     :searchList="searchList"
                     :searchList="searchList"
                     @searchInfo="searchInfo"
                     @searchInfo="searchInfo"
                 ></mySearch>
                 ></mySearch>
+                <el-button class="btn-check" size="medium" type="primary" @click="exportTempletelist">下载导入模板
+                </el-button>
                 <el-button
                 <el-button
                     class="btn-check"
                     class="btn-check"
                     size="medium"
                     size="medium"
                     type="primary"
                     type="primary"
-                    @click="dialogCheck(3)" v-if="userInfo.loginNo=='rensiying'"
+                    @click="dialogCheck(3)" v-if="userInfo.loginNo=='jiangshuai'"
                     >添加
                     >添加
                 </el-button>
                 </el-button>
+                <myUpload style="display:inline-block;" :fileInfo="fileInfot"
+                          :fileList="fileInfot.fileList" @uploadBack='uploadBack'></myUpload>
             </div>
             </div>
             <div class="tabbox">
             <div class="tabbox">
                 <el-table
                 <el-table
@@ -27,17 +31,17 @@
                     style="width: 100%"
                     style="width: 100%"
                     v-loading="loading"
                     v-loading="loading"
                 >
                 >
-                    <el-table-column prop="sceneName" label="场景">
+                    <el-table-column prop="sceneName" label="使用场景">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="proviceFlagName" label="下单模式">
                     <el-table-column prop="proviceFlagName" label="下单模式">
                     </el-table-column>
                     </el-table-column>
                     <!-- <el-table-column prop="metirialType" label="细分类型">
                     <!-- <el-table-column prop="metirialType" label="细分类型">
 					</el-table-column> -->
 					</el-table-column> -->
 
 
-                    <el-table-column prop="metirialType" label="类别">
-                    </el-table-column>
-                    <el-table-column prop="isAsic" label="基础数据">
-                    </el-table-column>
+<!--                    <el-table-column prop="metirialType" label="类别">-->
+<!--                    </el-table-column>-->
+<!--                    <el-table-column prop="isAsic" label="基础数据">-->
+<!--                    </el-table-column>-->
                     <el-table-column
                     <el-table-column
                         prop="metirialCode"
                         prop="metirialCode"
                         label="物料编码"
                         label="物料编码"
@@ -46,13 +50,19 @@
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="metirialName" label="物料名称">
                     <el-table-column prop="metirialName" label="物料名称">
                     </el-table-column>
                     </el-table-column>
+<!--                    <el-table-column prop="supplierCode" label="供应商">-->
+<!--                    </el-table-column>-->
+<!--                    <el-table-column prop="size" label="规格尺寸">-->
+<!--                    </el-table-column>-->
+<!--                    <el-table-column prop="coefficient" label="勾选后系数">-->
+<!--                    </el-table-column>-->
                     <!--<el-table-column prop="quality" label="材质" width="200" show-overflow-tooltip>
                     <!--<el-table-column prop="quality" label="材质" width="200" show-overflow-tooltip>
 					</el-table-column> -->
 					</el-table-column> -->
                     <!-- <el-table-column prop="size" label="规格" show-overflow-tooltip>
                     <!-- <el-table-column prop="size" label="规格" show-overflow-tooltip>
 					</el-table-column> -->
 					</el-table-column> -->
-                    <el-table-column prop="unit" label="单位">
+                    <el-table-column prop="unit" label="物料单位">
                     </el-table-column>
                     </el-table-column>
-                    <el-table-column prop="price" label="不含税单价">
+                    <el-table-column prop="price" label="不含税单价(元)">
                     </el-table-column>
                     </el-table-column>
                     <!-- <el-table-column prop="proviceFlagName" label="申请权限">
                     <!-- <el-table-column prop="proviceFlagName" label="申请权限">
 					</el-table-column> -->
 					</el-table-column> -->
@@ -68,13 +78,13 @@
                             <el-button
                             <el-button
                                 size="mini"
                                 size="mini"
                                 type="primary"
                                 type="primary"
-                                @click="dialogCheck(2, scope.row)" v-if="userInfo.loginNo=='rensiying'"
+                                @click="dialogCheck(2, scope.row)" v-if="userInfo.loginNo=='jiangshuai'"
                                 >修改</el-button
                                 >修改</el-button
                             >
                             >
                             <el-button
                             <el-button
                                 size="mini"
                                 size="mini"
                                 type="danger"
                                 type="danger"
-                                @click="delLine(scope.row)" v-if="userInfo.loginNo=='rensiying'"
+                                @click="delLine(scope.row)" v-if="userInfo.loginNo=='jiangshuai'"
                                 >删除</el-button
                                 >删除</el-button
                             >
                             >
                         </template>
                         </template>
@@ -143,40 +153,40 @@
                                 </el-option>
                                 </el-option>
                             </el-select>
                             </el-select>
                         </el-form-item>
                         </el-form-item>
-                        <el-form-item prop="metirialType">
-                            <span>物料类别</span>
-                            <el-select
-                                :disabled="disableStatus"
-                                :popper-append-to-body="false"
-                                v-model="infolist.metirialType"
-                                placeholder="物料类别"
-                            >
-                                <el-option
-                                    v-for="(item, index) in metirialTypeopt"
-                                    :key="index"
-                                    :label="item.dataName"
-                                    :value="item.dataName"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item prop="isAsic">
-                            <span>基础数据</span>
-                            <el-select
-                                :disabled="disableStatus"
-                                :popper-append-to-body="false"
-                                v-model="infolist.isAsic"
-                                placeholder="基础数据"
-                            >
-                                <el-option
-                                    v-for="item in isAsicopt"
-                                    :key="item.id"
-                                    :label="item.name"
-                                    :value="item.name"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
+<!--                        <el-form-item prop="metirialType">-->
+<!--                            <span>物料类别</span>-->
+<!--                            <el-select-->
+<!--                                :disabled="disableStatus"-->
+<!--                                :popper-append-to-body="false"-->
+<!--                                v-model="infolist.metirialType"-->
+<!--                                placeholder="物料类别"-->
+<!--                            >-->
+<!--                                <el-option-->
+<!--                                    v-for="(item, index) in metirialTypeopt"-->
+<!--                                    :key="index"-->
+<!--                                    :label="item.dataName"-->
+<!--                                    :value="item.dataName"-->
+<!--                                >-->
+<!--                                </el-option>-->
+<!--                            </el-select>-->
+<!--                        </el-form-item>-->
+<!--                        <el-form-item prop="isAsic">-->
+<!--                            <span>基础数据</span>-->
+<!--                            <el-select-->
+<!--                                :disabled="disableStatus"-->
+<!--                                :popper-append-to-body="false"-->
+<!--                                v-model="infolist.isAsic"-->
+<!--                                placeholder="基础数据"-->
+<!--                            >-->
+<!--                                <el-option-->
+<!--                                    v-for="item in isAsicopt"-->
+<!--                                    :key="item.id"-->
+<!--                                    :label="item.name"-->
+<!--                                    :value="item.name"-->
+<!--                                >-->
+<!--                                </el-option>-->
+<!--                            </el-select>-->
+<!--                        </el-form-item>-->
 
 
                         <!-- <el-form-item prop="metirialType">
                         <!-- <el-form-item prop="metirialType">
 							<span>细分类型</span>
 							<span>细分类型</span>
@@ -208,57 +218,57 @@
                             >
                             >
                             </el-input>
                             </el-input>
                         </el-form-item>
                         </el-form-item>
-                        <el-form-item prop="supplierCode">
-                            <span>供应商</span>
-                            <el-select
-                                :disabled="disableStatus"
-                                :popper-append-to-body="false"
-                                v-model="infolist.supplierCode"
-                                placeholder="供应商"
-                                @change="verifall"
-                            >
-                                <el-option
-                                    v-for="item in suppOpt"
-                                    :key="item.code"
-                                    :label="item.name"
-                                    :value="item.code"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
-                        <el-form-item prop="size">
-                            <span>规格尺寸</span>
-                            <el-input
-                                v-model="infolist.size"
-                                placeholder="规格尺寸"
-                                :disabled="disableStatus"
-                            ></el-input>
-                        </el-form-item>
-                        <el-form-item prop="coefficient">
-                            <span>勾选后系数</span>
-                            <el-select
-                                :disabled="disableStatus"
-                                :popper-append-to-body="false"
-                                v-model="infolist.coefficient"
-                                placeholder="勾选后系数"
-                            >
-                                <el-option
-                                    v-for="item in coefficientopt"
-                                    :key="item.id"
-                                    :label="item.name"
-                                    :value="item.id"
-                                >
-                                </el-option>
-                            </el-select>
-                        </el-form-item>
+<!--                        <el-form-item prop="supplierCode">-->
+<!--                            <span>供应商</span>-->
+<!--                            <el-select-->
+<!--                                :disabled="disableStatus"-->
+<!--                                :popper-append-to-body="false"-->
+<!--                                v-model="infolist.supplierCode"-->
+<!--                                placeholder="供应商"-->
+<!--                                @change="verifall"-->
+<!--                            >-->
+<!--                                <el-option-->
+<!--                                    v-for="item in suppOpt"-->
+<!--                                    :key="item.code"-->
+<!--                                    :label="item.name"-->
+<!--                                    :value="item.code"-->
+<!--                                >-->
+<!--                                </el-option>-->
+<!--                            </el-select>-->
+<!--                        </el-form-item>-->
+<!--                        <el-form-item prop="size">-->
+<!--                            <span>规格尺寸</span>-->
+<!--                            <el-input-->
+<!--                                v-model="infolist.size"-->
+<!--                                placeholder="规格尺寸"-->
+<!--                                :disabled="disableStatus"-->
+<!--                            ></el-input>-->
+<!--                        </el-form-item>-->
+<!--                        <el-form-item prop="coefficient">-->
+<!--                            <span>勾选后系数</span>-->
+<!--                            <el-select-->
+<!--                                :disabled="disableStatus"-->
+<!--                                :popper-append-to-body="false"-->
+<!--                                v-model="infolist.coefficient"-->
+<!--                                placeholder="勾选后系数"-->
+<!--                            >-->
+<!--                                <el-option-->
+<!--                                    v-for="item in coefficientopt"-->
+<!--                                    :key="item.id"-->
+<!--                                    :label="item.name"-->
+<!--                                    :value="item.id"-->
+<!--                                >-->
+<!--                                </el-option>-->
+<!--                            </el-select>-->
+<!--                        </el-form-item>-->
                         <el-form-item prop="unit">
                         <el-form-item prop="unit">
-                            <span>单位</span>
+                            <span>物料单位</span>
                             <!-- <el-input v-model="infolist.unit" placeholder="单位" :disabled="disableStatus"></el-input> -->
                             <!-- <el-input v-model="infolist.unit" placeholder="单位" :disabled="disableStatus"></el-input> -->
                             <el-select
                             <el-select
                                 :disabled="disableStatus"
                                 :disabled="disableStatus"
                                 :popper-append-to-body="false"
                                 :popper-append-to-body="false"
                                 v-model="infolist.unit"
                                 v-model="infolist.unit"
-                                placeholder="单位"
+                                placeholder="物料单位"
                             >
                             >
                                 <el-option
                                 <el-option
                                     v-for="item in unitopt"
                                     v-for="item in unitopt"
@@ -270,11 +280,11 @@
                             </el-select>
                             </el-select>
                         </el-form-item>
                         </el-form-item>
                         <el-form-item prop="price">
                         <el-form-item prop="price">
-                            <span>不含税单价</span>
+                            <span>不含税单价(元)</span>
                             <el-input
                             <el-input
                                 type="number"
                                 type="number"
                                 v-model="infolist.price"
                                 v-model="infolist.price"
-                                placeholder="不含税单价"
+                                placeholder="不含税单价(元)"
                                 :disabled="disableStatus"
                                 :disabled="disableStatus"
                             ></el-input>
                             ></el-input>
                         </el-form-item>
                         </el-form-item>
@@ -321,12 +331,14 @@
 import mySearch from "../../../components/search.vue";
 import mySearch from "../../../components/search.vue";
 import myMessage from "../../../components/myMessage.vue";
 import myMessage from "../../../components/myMessage.vue";
 import toolList from "../../../components/toolList";
 import toolList from "../../../components/toolList";
+import myUpload from "../../../components/upload.vue";
 
 
 export default {
 export default {
     components: {
     components: {
         mySearch,
         mySearch,
         myMessage,
         myMessage,
-        toolList
+        toolList,
+        myUpload
     },
     },
     data() {
     data() {
         const sceneName = (rule, value, callback) => {
         const sceneName = (rule, value, callback) => {
@@ -529,12 +541,20 @@ export default {
                     width: "31%",
                     width: "31%",
                     options: [
                     options: [
                         {
                         {
-                            dataCode: "营业厅- VI改造",
-                            dataName: "营业厅- VI改造"
+                            dataCode: "营业厅-VI改造-自有渠道",
+                            dataName: "营业厅-VI改造-自有渠道"
+                        },
+                        {
+                            dataCode: "营业厅-常规物料-自有渠道",
+                            dataName: "营业厅-常规物料-自有渠道"
+                        },
+                        {
+                            dataCode: "营业厅-VI改造-合作渠道",
+                            dataName: "营业厅-VI改造-合作渠道"
                         },
                         },
                         {
                         {
-                            dataCode: "营业厅-基础物料",
-                            dataName: "营业厅-基础物料"
+                            dataCode: "营业厅-常规物料-合作渠道",
+                            dataName: "营业厅-常规物料-合作渠道"
                         },
                         },
                         {
                         {
                             dataCode: "小区",
                             dataCode: "小区",
@@ -561,18 +581,32 @@ export default {
                             dataName: "省公司"
                             dataName: "省公司"
                         },
                         },
                         {
                         {
-                            dataCode: "地市公司",
-                            dataName: "地市公司"
+                            dataCode: "地市",
+                            dataName: "地市"
                         },
                         },
 
 
                         {
                         {
                             dataCode: "省+地市",
                             dataCode: "省+地市",
                             dataName: "省+地市"
                             dataName: "省+地市"
+                        },
+                        {
+                            dataCode: "省+市",
+                            dataName: "省+市"
                         }
                         }
                     ]
                     ]
                 },
                 },
-                { type: "input", tit: "物料名称", value: "", width: "31%" }
+                { type: "input", tit: "物料名称", value: "", width: "31%" },
+                { type: "input", tit: "物料编码", value: "", width: "31%" }
             ],
             ],
+            fileInfot: {
+                type: 'btn',
+                typename: '导入',
+                btntype: 'primary',
+                limit: 1,
+                url: '/market/cadvSecbuyMetirial/import',
+                fileList: [],
+                woNo: "",
+            },
             tooltit: "二采物料类型建档",
             tooltit: "二采物料类型建档",
             fullscreen: false,
             fullscreen: false,
             total: 0,
             total: 0,
@@ -597,11 +631,14 @@ export default {
                 },
                 },
                 {
                 {
                     id: "1",
                     id: "1",
-                    name: "地市公司"
+                    name: "地市"
                 },
                 },
                 {
                 {
                     id: "2",
                     id: "2",
                     name: "省+地市"
                     name: "省+地市"
+                },{
+                    id: "",
+                    name: "省+市"
                 }
                 }
             ],
             ],
             //使用场景
             //使用场景
@@ -616,14 +653,22 @@ export default {
                 },
                 },
                 {
                 {
                     dataCode: "3",
                     dataCode: "3",
-                    dataName: "营业厅- VI改造"
+                    dataName: "营业厅-VI改造-自有渠道"
                 },
                 },
                 {
                 {
                     dataCode: "4",
                     dataCode: "4",
-                    dataName: "营业厅-基础物料"
+                    dataName: "营业厅-常规物料-自有渠道"
                 },
                 },
                 {
                 {
                     dataCode: "5",
                     dataCode: "5",
+                    dataName:'营业厅-VI改造-合作渠道'
+                },
+                {
+                    dataCode: "6",
+                  dataName: '营业厅-常规物料-合作渠道'
+                },
+                {
+                    dataCode: "7",
                     dataName: "政企"
                     dataName: "政企"
                 }
                 }
             ],
             ],
@@ -669,6 +714,12 @@ export default {
                 {
                 {
                     id: "4",
                     id: "4",
                     name: "组"
                     name: "组"
+                },{
+                    id: "5",
+                    name: "延米"
+                },{
+                    id:'6',
+                    name:'张'
                 }
                 }
             ],
             ],
             //物料名称
             //物料名称
@@ -690,6 +741,40 @@ export default {
             //     }
             //     }
             // }
             // }
         },
         },
+        exportTempletelist() {
+            let data = this.params;
+            console.log(data);
+            // return
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/excelExportTemplete",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                responseType: "blob",
+                data: data,
+            }).then((response) => {
+                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                    let blob = new Blob([response.data], {
+                        type: 'application/vnd.ms-excel'
+                    })
+                    window.navigator.msSaveOrOpenBlob(blob,
+                        new Date().getTime() + '.xlsx')
+                } else {
+                    /* 火狐谷歌的文件下载方式 */
+                    var blob = new Blob([response.data])
+                    var downloadElement = document.createElement('a')
+                    var href = window.URL.createObjectURL(blob)
+                    downloadElement.href = href
+                    downloadElement.download = new Date().getTime() + '.xlsx'
+                    document.body.appendChild(downloadElement)
+                    downloadElement.click()
+                    document.body.removeChild(downloadElement)
+                    window.URL.revokeObjectURL(href)
+                }
+            });
+        },
+
         usePlance(v) {
         usePlance(v) {
             this.usePlanceArr = v;
             this.usePlanceArr = v;
 
 
@@ -724,8 +809,47 @@ export default {
             v[0] ? (this.params.sceneName = v[0]) : "";
             v[0] ? (this.params.sceneName = v[0]) : "";
             v[1] ? (this.params.proviceFlagName = v[1]) : "";
             v[1] ? (this.params.proviceFlagName = v[1]) : "";
             v[2] ? (this.params.metirialName = v[2]) : "";
             v[2] ? (this.params.metirialName = v[2]) : "";
+            v[3] ?(this.params.metirialCode = v[3]) :"";
             this.getList(this.params, this.pageSize);
             this.getList(this.params, this.pageSize);
         },
         },
+        uploadBack(v) {
+            let that = this;
+            console.log(v);
+            if(v.data.result==0){
+                that.getList({}, 1);
+                that.getUser();
+                that.getMetirialType();
+                that.getMetirialInfo();
+            }
+        },
+        getMetirialInfo() {
+            this.$http({
+                url: "/market/cadvSecbuyMetirial/queryList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    dictCodePks: "metirialType"
+                }
+            }).then(res => {
+                this.materialNameopt = res.data;
+            });
+        },
+        getMetirialType() {
+            this.$http({
+                url: "/sysmgr/cfgDataDicts/queryMap",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json"
+                },
+                data: {
+                    dictCodePks: "metirialType"
+                }
+            }).then(res => {
+                this.metirialTypeopt = res.data.body.metirialType;
+            });
+        },
         //获取列表
         //获取列表
         getList(v, n) {
         getList(v, n) {
             this.pageSize = n;
             this.pageSize = n;
@@ -907,8 +1031,7 @@ export default {
             this.delid = v.id;
             this.delid = v.id;
         },
         },
         //文件返回值
         //文件返回值
-        uploadBack(v) {
-        },
+
         //功能栏
         //功能栏
         iconCli(v) {
         iconCli(v) {
             if (v === 1) {
             if (v === 1) {

+ 9 - 9
src/pages/main/advertising/supplier.vue

@@ -4,7 +4,7 @@
             <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
             <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
             <div class="search">
             <div class="search">
                 <!-- <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch> -->
                 <!-- <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch> -->
-                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(3)" v-if="userInfo.loginNo=='rensiying'">添加
+                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(3)" v-if="userInfo.loginNo=='jiangshuai'">添加
                 </el-button>
                 </el-button>
             </div>
             </div>
             <div class="tabbox">
             <div class="tabbox">
@@ -14,7 +14,7 @@
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="code" label="供应商编码">
                     <el-table-column prop="code" label="供应商编码">
                     </el-table-column>
                     </el-table-column>
-					
+
 					<el-table-column prop="frameContractName" label="合同名称">
 					<el-table-column prop="frameContractName" label="合同名称">
                     </el-table-column>
                     </el-table-column>
                     <el-table-column prop="frameContractNo" label="合同编号">
                     <el-table-column prop="frameContractNo" label="合同编号">
@@ -32,8 +32,8 @@
                     <el-table-column label="操作" width="160px" align="center">
                     <el-table-column label="操作" width="160px" align="center">
                         <template slot-scope="scope">
                         <template slot-scope="scope">
                             <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
                             <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
-                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)" v-if="userInfo.loginNo=='rensiying'">修改</el-button>
-                            <el-button size="mini" type="danger" @click="delLine(scope.row)" v-if="userInfo.loginNo=='rensiying'">删除</el-button>
+                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)" v-if="userInfo.loginNo=='jiangshuai'">修改</el-button>
+                            <el-button size="mini" type="danger" @click="delLine(scope.row)" v-if="userInfo.loginNo=='jiangshuai'">删除</el-button>
                         </template>
                         </template>
                     </el-table-column>
                     </el-table-column>
                 </el-table>
                 </el-table>
@@ -47,7 +47,7 @@
             :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia" :append-to-body="true" >
             :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia" :append-to-body="true" >
             <div v-loading="loadinged">
             <div v-loading="loadinged">
                 <el-form :model="infolist" ref="infolist" :rules="rules">
                 <el-form :model="infolist" ref="infolist" :rules="rules">
-					
+
                     <div class="info-line">
                     <div class="info-line">
                         <el-form-item prop="name">
                         <el-form-item prop="name">
                             <span>供应商</span>
                             <span>供应商</span>
@@ -312,7 +312,7 @@
             //     v[1] ? this.params.buyTypeCode = v[1] : '';
             //     v[1] ? this.params.buyTypeCode = v[1] : '';
             //     this.getList(this.params, this.pageSize);
             //     this.getList(this.params, this.pageSize);
             // },
             // },
-            
+
             //获取列表
             //获取列表
             getList(v, n) {
             getList(v, n) {
                 this.pageSize = n;
                 this.pageSize = n;
@@ -370,7 +370,7 @@
                     this.infolist.contractSignTime = this.infolist.contractSignTime?this.$formatDate(this.infolist.contractSignTime, "YYYY-MM-DD"):'';
                     this.infolist.contractSignTime = this.infolist.contractSignTime?this.$formatDate(this.infolist.contractSignTime, "YYYY-MM-DD"):'';
                     this.infolist.contractEndTime = this.infolist.contractEndTime?this.$formatDate(this.infolist.contractEndTime, "YYYY-MM-DD"):'';
                     this.infolist.contractEndTime = this.infolist.contractEndTime?this.$formatDate(this.infolist.contractEndTime, "YYYY-MM-DD"):'';
                     if (this.titname === '添加') {
                     if (this.titname === '添加') {
-                           
+
                             let supplierNameArr = this.tableData.filter(item => {
                             let supplierNameArr = this.tableData.filter(item => {
                                     return item.name == this.infolist.name
                                     return item.name == this.infolist.name
                                 });
                                 });
@@ -385,9 +385,9 @@
                             }else{
                             }else{
                                 this.submitInfo("/market/cadvSupplier/add");
                                 this.submitInfo("/market/cadvSupplier/add");
                             }
                             }
-                            
 
 
-                        
+
+
                     } else if (this.titname === '修改') {
                     } else if (this.titname === '修改') {
                             let supplierNameArr = this.tableData.filter(item => {
                             let supplierNameArr = this.tableData.filter(item => {
                                     return item.name == this.infolist.name
                                     return item.name == this.infolist.name

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1100 - 0
src/pages/main/collect/collect.vue


+ 353 - 0
src/pages/main/collect/common/export.js

@@ -0,0 +1,353 @@
+// import { createCellPos } from './translateNumToLetter'
+const Excel = require("exceljs");
+import FileSaver from "file-saver";
+export var exportExcel = function (luckysheet, value) {
+    // 参数为luckysheet.getluckysheetfile()获取的对象
+    // 1.创建工作簿,可以为工作簿添加属性
+    const workbook = new Excel.Workbook();
+    // 2.创建表格,第二个参数可以配置创建什么样的工作表
+    if (Object.prototype.toString.call(luckysheet) === "[object Object]") {
+        luckysheet = [luckysheet];
+    }
+    luckysheet.forEach(function (table) {
+        if (table.data.length === 0) return true;
+        // ws.getCell('B2').fill = fills.
+        const worksheet = workbook.addWorksheet(table.name);
+        const merge = (table.config && table.config.merge) || {};
+        const borderInfo = (table.config && table.config.borderInfo) || {};
+        // 3.设置单元格合并,设置单元格边框,设置单元格样式,设置值
+        setStyleAndValue(table.data, worksheet);
+        setMerge(merge, worksheet);
+        setBorder(borderInfo, worksheet);
+        return true;
+    });
+
+    // return
+    // 4.写入 buffer
+    const buffer = workbook.xlsx.writeBuffer().then((data) => {
+        // console.log('data', data)
+        const blob = new Blob([data], {
+            type: "application/vnd.ms-excel;charset=utf-8",
+        });
+        console.log("导出成功!2");
+        FileSaver.saveAs(blob, `${value}.xlsx`);
+    });
+    return buffer;
+};
+
+var setMerge = function (luckyMerge = {}, worksheet) {
+    const mergearr = Object.values(luckyMerge);
+    mergearr.forEach(function (elem) {
+        // elem格式:{r: 0, c: 0, rs: 1, cs: 2}
+        // 按开始行,开始列,结束行,结束列合并(相当于 K10:M12)
+        worksheet.mergeCells(
+            elem.r + 1,
+            elem.c + 1,
+            elem.r + elem.rs,
+            elem.c + elem.cs
+        );
+    });
+};
+
+var setBorder = function (luckyBorderInfo, worksheet) {
+    if (!Array.isArray(luckyBorderInfo)) return;
+    // console.log('luckyBorderInfo', luckyBorderInfo)
+    luckyBorderInfo.forEach(function (elem) {
+        // 现在只兼容到borderType 为range的情况
+        // console.log('ele', elem)
+        if (elem.rangeType === "range") {
+            let border = borderConvert(elem.borderType, elem.style, elem.color);
+            let rang = elem.range[0];
+            // console.log('range', rang)
+            let row = rang.row;
+            let column = rang.column;
+            for (let i = row[0] + 1; i < row[1] + 2; i++) {
+                for (let y = column[0] + 1; y < column[1] + 2; y++) {
+                    worksheet.getCell(i, y).border = border;
+                }
+            }
+        }
+        if (elem.rangeType === "cell") {
+            // col_index: 2
+            // row_index: 1
+            // b: {
+            //   color: '#d0d4e3'
+            //   style: 1
+            // }
+            const { col_index, row_index } = elem.value;
+            const borderData = Object.assign({}, elem.value);
+            delete borderData.col_index;
+            delete borderData.row_index;
+            let border = addborderToCell(borderData, row_index, col_index);
+            // console.log('bordre', border, borderData)
+            worksheet.getCell(row_index + 1, col_index + 1).border = border;
+        }
+        // console.log(rang.column_focus + 1, rang.row_focus + 1)
+        // worksheet.getCell(rang.row_focus + 1, rang.column_focus + 1).border = border
+    });
+};
+var setStyleAndValue = function (cellArr, worksheet) {
+    if (!Array.isArray(cellArr)) return;
+    cellArr.forEach(function (row, rowid) {
+        row.every(function (cell, columnid) {
+            if (!cell) return true;
+            let fill = fillConvert(cell.bg);
+
+            let font = fontConvert(
+                cell.ff,
+                cell.fc,
+                cell.bl,
+                cell.it,
+                cell.fs,
+                cell.cl,
+                cell.ul
+            );
+            let alignment = alignmentConvert(
+                cell.vt,
+                cell.ht,
+                cell.tb,
+                cell.tr
+            );
+            let value = "";
+
+            if (cell.f) {
+                value = { formula: cell.f, result: cell.v };
+            } else if (!cell.v && cell.ct && cell.ct.s) {
+                // xls转为xlsx之后,内部存在不同的格式,都会进到富文本里,即值不存在与cell.v,而是存在于cell.ct.s之后
+                // value = cell.ct.s[0].v
+                cell.ct.s.forEach((arr) => {
+                    value += arr.v;
+                });
+            } else {
+                value = cell.v;
+            }
+            //  style 填入到_value中可以实现填充色
+            let letter = createCellPos(columnid);
+            let target = worksheet.getCell(letter + (rowid + 1));
+            // console.log('1233', letter + (rowid + 1))
+            // eslint-disable-next-line no-unused-vars
+            for (const key in fill) {
+                target.fill = fill;
+                break;
+            }
+            target.font = font;
+            target.alignment = alignment;
+            target.value = value;
+
+            return true;
+        });
+    });
+};
+
+var fillConvert = function (bg) {
+    if (!bg) {
+        return {};
+    }
+    // const bgc = bg.replace('#', '')
+    let fill = {
+        type: "pattern",
+        pattern: "solid",
+        fgColor: { argb: bg.replace("#", "") },
+    };
+    return fill;
+};
+
+var fontConvert = function (
+    ff = 0,
+    fc = "#000000",
+    bl = 0,
+    it = 0,
+    fs = 10,
+    cl = 0,
+    ul = 0
+) {
+    // luckysheet:ff(样式), fc(颜色), bl(粗体), it(斜体), fs(大小), cl(删除线), ul(下划线)
+    const luckyToExcel = {
+        0: "微软雅黑",
+        1: "宋体(Song)",
+        2: "黑体(ST Heiti)",
+        3: "楷体(ST Kaiti)",
+        4: "仿宋(ST FangSong)",
+        5: "新宋体(ST Song)",
+        6: "华文新魏",
+        7: "华文行楷",
+        8: "华文隶书",
+        9: "Arial",
+        10: "Times New Roman ",
+        11: "Tahoma ",
+        12: "Verdana",
+        num2bl: function (num) {
+            return num === 0 ? false : true;
+        },
+    };
+    // 出现Bug,导入的时候ff为luckyToExcel的val
+
+    let font = {
+        name: typeof ff === "number" ? luckyToExcel[ff] : ff,
+        family: 1,
+        size: fs,
+        color: { argb: fc.replace("#", "") },
+        bold: luckyToExcel.num2bl(bl),
+        italic: luckyToExcel.num2bl(it),
+        underline: luckyToExcel.num2bl(ul),
+        strike: luckyToExcel.num2bl(cl),
+    };
+
+    return font;
+};
+
+var alignmentConvert = function (
+    vt = "default",
+    ht = "default",
+    tb = "default",
+    tr = "default"
+) {
+    // luckysheet:vt(垂直), ht(水平), tb(换行), tr(旋转)
+    const luckyToExcel = {
+        vertical: {
+            0: "middle",
+            1: "top",
+            2: "bottom",
+            default: "top",
+        },
+        horizontal: {
+            0: "center",
+            1: "left",
+            2: "right",
+            default: "left",
+        },
+        wrapText: {
+            0: false,
+            1: false,
+            2: true,
+            default: false,
+        },
+        textRotation: {
+            0: 0,
+            1: 45,
+            2: -45,
+            3: "vertical",
+            4: 90,
+            5: -90,
+            default: 0,
+        },
+    };
+
+    let alignment = {
+        vertical: luckyToExcel.vertical[vt],
+        horizontal: luckyToExcel.horizontal[ht],
+        wrapText: luckyToExcel.wrapText[tb],
+        textRotation: luckyToExcel.textRotation[tr],
+    };
+    return alignment;
+};
+
+var borderConvert = function (borderType, style = 1, color = "#000") {
+    // 对应luckysheet的config中borderinfo的的参数
+    if (!borderType) {
+        return {};
+    }
+    const luckyToExcel = {
+        type: {
+            "border-all": "all",
+            "border-top": "top",
+            "border-right": "right",
+            "border-bottom": "bottom",
+            "border-left": "left",
+        },
+        style: {
+            0: "none",
+            1: "thin",
+            2: "hair",
+            3: "dotted",
+            4: "dashDot", // 'Dashed',
+            5: "dashDot",
+            6: "dashDotDot",
+            7: "double",
+            8: "medium",
+            9: "mediumDashed",
+            10: "mediumDashDot",
+            11: "mediumDashDotDot",
+            12: "slantDashDot",
+            13: "thick",
+        },
+    };
+    let template = {
+        style: luckyToExcel.style[style],
+        color: { argb: color.replace("#", "") },
+    };
+    let border = {};
+    if (luckyToExcel.type[borderType] === "all") {
+        border["top"] = template;
+        border["right"] = template;
+        border["bottom"] = template;
+        border["left"] = template;
+    } else {
+        border[luckyToExcel.type[borderType]] = template;
+    }
+    // console.log('border', border)
+    return border;
+};
+
+function addborderToCell(borders) {
+    let border = {};
+    const luckyExcel = {
+        type: {
+            l: "left",
+            r: "right",
+            b: "bottom",
+            t: "top",
+        },
+        style: {
+            0: "none",
+            1: "thin",
+            2: "hair",
+            3: "dotted",
+            4: "dashDot", // 'Dashed',
+            5: "dashDot",
+            6: "dashDotDot",
+            7: "double",
+            8: "medium",
+            9: "mediumDashed",
+            10: "mediumDashDot",
+            11: "mediumDashDotDot",
+            12: "slantDashDot",
+            13: "thick",
+        },
+    };
+    for (const bor in borders) {
+        if (borders[bor]) {
+            if (borders[bor].color.indexOf("rgb") === -1) {
+                border[luckyExcel.type[bor]] = {
+                    style: luckyExcel.style[borders[bor].style],
+                    color: { argb: borders[bor].color.replace("#", "") },
+                };
+            } else {
+                border[luckyExcel.type[bor]] = {
+                    style: luckyExcel.style[borders[bor].style],
+                    color: { argb: borders[bor].color },
+                };
+            }
+        } else {
+            border[luckyExcel.type[bor]] = {
+                color: "#000000",
+                style: 1,
+            };
+        }
+    }
+    return border;
+}
+
+function createCellPos(n) {
+    let ordA = "A".charCodeAt(0);
+
+    let ordZ = "Z".charCodeAt(0);
+    let len = ordZ - ordA + 1;
+    let s = "";
+    while (n >= 0) {
+        s = String.fromCharCode((n % len) + ordA) + s;
+
+        n = Math.floor(n / len) - 1;
+    }
+    return s;
+}

+ 177 - 0
src/pages/main/collect/components/deptTreeOnly.vue

@@ -0,0 +1,177 @@
+<template>
+  <div class="treebox" v-loading="loading">
+    <el-tree
+      :highlight-current="true"
+      :check-strictly="true"
+      ref="tree"
+      :data="treeList"
+      node-key="o"
+      :default-checked-keys="defaultListc"
+      :default-expanded-keys="defaultListc"
+      @node-click="handleNodeClick"
+    >
+      <span class="custom-tree-node" slot-scope="{ node }">
+        <em
+          style="display: inline-block; width: 20px"
+          v-if="node.data.haveUserFlag == 'N' && node.data.children.length == 0"
+        ></em>
+        <i
+          class="el-icon-caret-right"
+          v-if="node.data.haveUserFlag == 'Y' && node.data.children.length == 0"
+        ></i>
+        <el-checkbox
+          @change="handleCheckChange(node)"
+          style="margin-right: 10px"
+          v-model="node.checked"
+          v-if="node.data.type == 1"
+        ></el-checkbox>
+        <span>{{ node.label }}</span>
+      </span>
+    </el-tree>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["defaultList", "type", "closeList", "resetList", "only"],
+  data() {
+    return {
+      treeList: [],
+      opt: [],
+      defaultProps: {
+        children: "children",
+        label: "label",
+      },
+      defaultListc: [],
+      loading: false,
+    };
+  },
+  methods: {
+    getTree() {
+      this.loading = true;
+      this.$http({
+        url: "/sysmgr/csysdept/queryAllList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeList = res.data;
+        this.loading = false;
+      });
+      // const info = JSON.parse(sessionStorage.userInfo);
+      // console.log(info, "JSON.parse(sessionStorage.userInfo)");
+      // this.treeList = [
+      //   {
+      //     children: [],
+      //     o: info.groupId,
+      //     label: `${info.groupName}`,
+      //     haveUserFlag: "Y",
+      //     ou: `${info.groupName}`,
+      //   },
+      // ];
+    },
+    handleNodeClick(v) {
+      let s = false;
+      if (v.children && v.children.length == 0) {
+        s = true;
+      }
+      if (v.type) {
+        return;
+      }
+      if (
+        v.children &&
+        v.children.length > 0 &&
+        v.children[v.children.length - 1].type == 1
+      ) {
+        return;
+      }
+      this.loading = true;
+      console.log(v);
+      this.$http({
+        url: "/sysmgr/sysuserinfo/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          groupId: v.o,
+        },
+      }).then((res) => {
+        v.children = v.children ? v.children : [];
+        res.data.forEach((item) => {
+          v.children.push({
+            id: item.groupId,
+            label: item.loginNameStr,
+            type: 1,
+            displayname: v.displayname,
+            loginNoStr: item.loginNoStr,
+            o: item.id,
+          });
+        });
+        this.loading = false;
+      });
+      for (let i = 0; i < this.$refs.tree.store._getAllNodes().length; i++) {
+        if (s && v.o == this.$refs.tree.store._getAllNodes()[i].data.o) {
+          this.$refs.tree.store._getAllNodes()[i].expanded = true;
+        }
+      }
+    },
+    handleCheckChange() {
+      console.log(this.only, "only");
+      const nodeList = this.$refs.tree.store.getCheckedNodes();
+      if (this.only) {
+        if (nodeList.length === 1) {
+          this.$emit("treeCheck", nodeList);
+        } else if (nodeList.length === 0) {
+          this.$refs.tree.setCheckedKeys([]);
+          this.$emit("treeCheck", nodeList);
+        } else {
+          let obj = { ...nodeList[0] };
+          this.$refs.tree.setCheckedKeys([]);
+          this.$nextTick(() => {
+            this.$refs.tree.setChecked(obj, true);
+          });
+          this.$message.error("这里只能选择一个审批人");
+        }
+      } else if (!this.only) {
+        this.$emit("treeCheck", nodeList);
+      }
+    },
+  },
+  created() {
+    this.getTree();
+    this.defaultListc = this.defaultList;
+  },
+  watch: {
+    type() {
+      this.defaultListc = this.defaultList;
+      this.$forceUpdate();
+    },
+    defaultList() {
+      this.$forceUpdate();
+    },
+    closeList() {
+      this.$refs.tree.setCheckedKeys([]);
+      if ([...this.resetList] && [...this.resetList].length > 0) {
+        [...this.resetList].forEach((el) => {
+          this.$nextTick(() => {
+            this.$refs.tree.setChecked(el, true);
+          });
+        });
+      }
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.el-icon-caret-right {
+  color: #ccc;
+  margin: 0 5px;
+}
+.treebox {
+  border: 1px solid #ddd;
+}
+</style>

+ 74 - 0
src/pages/main/collect/components/dialog.vue

@@ -0,0 +1,74 @@
+<template>
+  <el-dialog
+    :modal="modal"
+    :title="title"
+    :visible.sync="visible"
+    :fullscreen="fullscreen"
+    :key="reload"
+    :before-close="handleCancel"
+    :modal-append-to-body="false"
+    :width="width"
+    :destroy-on-close="destroy"
+  >
+    <!-- 表格主体部分 -->
+    <slot></slot>
+    <!-- 表格底部 -->
+    <div slot="footer">
+      <slot name="footer">
+        <el-button @click="handleCancel" size="small">取消</el-button>
+        <el-button @click="handleConfirm" type="primary" size="small"
+          >确定</el-button
+        >
+      </slot>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  props: {
+    visible: {
+      type: Boolean,
+      default: false,
+    },
+    title: {
+      type: String,
+      default: "",
+    },
+    reload: {
+      type: Number,
+      default: 0,
+    },
+    width: {
+      type: String,
+      default: "500px",
+    },
+    fullscreen: {
+      type: Boolean,
+      default: false,
+    },
+    modal: {
+      type: Boolean,
+      default: true,
+    },
+    destroy: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    //   确定的回调
+    handleConfirm() {
+      this.$emit("confirm", false);
+    },
+    //   取消的回调
+    handleCancel() {
+      this.$emit("cancel", false);
+    },
+  },
+};
+</script>
+
+<style></style>

+ 103 - 0
src/pages/main/collect/components/form.vue

@@ -0,0 +1,103 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-11-01 18:03:02
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-01-10 19:27:43
+ * @FilePath     : \spfm-market-front\src\pages\main\performance\components\form.vue
+-->
+<template>
+  <el-form :inline="true" :model="object">
+    <el-row :gutter="24">
+      <el-col
+        v-for="({ props, label, type, dictionary }, index) in form"
+        :key="index"
+        :span="6"
+      >
+        <el-form-item :label="label">
+          <template v-if="type === 'select'">
+            <el-select
+              v-model="object[props]"
+              :placeholder="label"
+              filterable
+              clearable
+            >
+              <el-option
+                :label="label"
+                :value="value"
+                v-for="({ label, value }, index) in dictionary"
+                :key="index"
+              ></el-option>
+            </el-select>
+          </template>
+          <template v-else-if="['datetime', 'date', 'month'].includes(type)">
+            <el-date-picker
+              v-model="object[props]"
+              :type="type"
+              format="yyyy-MM-dd"
+              value-format="yyyy-MM-dd"
+              :placeholder="label"
+            >
+            </el-date-picker>
+          </template>
+          <template v-else>
+            <el-input
+              v-model="object[props]"
+              :placeholder="label"
+              clearable
+            ></el-input>
+          </template>
+        </el-form-item>
+      </el-col>
+      <el-col :span="6">
+        <el-form-item>
+          <el-button type="primary" @click="handleSearch">搜索</el-button>
+          <el-button @click="handleSearch(2)" v-if="reset == true">重置</el-button>
+        </el-form-item>
+      </el-col>
+      <el-col class="flex-justify-align-end" :span="24">
+        <el-button
+          v-for="({ label, props, unlogo }, index) in handle"
+          :key="index"
+          @click="handleSubmit(props)"
+        >
+          <i v-if="!unlogo" class="el-icon-document-add font-weight-bold" />{{
+            label
+          }}
+        </el-button>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+<script>
+export default {
+  props: {
+    reset:{
+      type:Boolean,
+      default: () => [],
+    },
+    form: {
+      type: Array,
+      default: () => [],
+    },
+    handle: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  data: () => ({
+    object: {},
+  }),
+  methods: {
+    handleSearch(e) {
+      if (e === 2) {
+        this.object = [];
+      } else {
+        this.$emit("search", this.object);
+      }
+    },
+    handleSubmit(params) {
+      this.$emit(params, this.object);
+    },
+  },
+};
+</script>

+ 38 - 0
src/pages/main/collect/components/pagination.vue

@@ -0,0 +1,38 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-11-01 18:11:59
+ * @LastEditors  : yuanrunwei
+ * @LastEditTime : 2021-11-02 14:27:11
+ * @FilePath     : \spfm-front\src\pages\main\dataConfig\components\pagination.vue
+-->
+<template>
+    <el-pagination
+        class="simple-pagination"
+        @current-change="handleChange"
+        layout="prev, pager, next"
+        background
+        :current-page="page"
+        :total="total"
+    >
+    </el-pagination>
+</template>
+<script>
+export default {
+    props: {
+        page: {
+            type: Number,
+            default: 0
+        },
+        total: {
+            type: Number,
+            default: 0
+        }
+    },
+    data: () => ({}),
+    methods: {
+        handleChange(page) {
+            this.$emit("change", page);
+        }
+    }
+};
+</script>

+ 985 - 0
src/pages/main/collect/components/sheet.vue

@@ -0,0 +1,985 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-12-04 14:23:58
+ * @LastEditors: daiqisheng
+ * @LastEditTime: 2022-03-07 17:40:14
+ * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
+-->
+<template>
+  <div class="sheet-container">
+    <div class="flex-justify-align-end margin-bottom-20">
+      <el-button
+        type="primary"
+        @click="handleVisible"
+        v-if="['template'].includes(attribute)"
+        >权限设置</el-button
+      >
+      <el-button type="primary" @click="handleDownload">导出</el-button>
+      <el-button type="primary" @click="handleFullscreen()">全屏显示</el-button>
+      <template v-if="['edit'].includes(type)">
+        <el-upload
+          v-if="!id"
+          class="margin-right-10 margin-left-10"
+          action
+          :on-change="handleChange"
+          :show-file-list="false"
+        >
+          <el-button type="primary">上传</el-button>
+        </el-upload>
+        <el-button
+          v-if="!status || status === '2'"
+          type="primary"
+          @click="handleSave('2')"
+          :disabled="handleForbid()"
+          >暂存</el-button
+        >
+        <el-button
+          v-if="status === '2' || status === '3'"
+          type="primary"
+          @click="handleResave"
+          :disabled="handleForbid()"
+          >保存</el-button
+        >
+        <el-button
+          v-if="addFlag === '0'"
+          type="primary"
+          @click="handleSave('0')"
+          :disabled="handleForbid()"
+          ><span>{{ id ? "提交" : "新增" }}</span
+          ><span>{{
+            handleForbid() ? `(请先设置权限)` : ""
+          }}</span></el-button
+        >
+      </template>
+    </div>
+    <div id="luckysheet" class="sheet-container-block"></div>
+    <simple-dialog
+      title="权限设置"
+      :visible="visible"
+      :modal="false"
+      width="1400px"
+      @confirm="handleAuth"
+      @cancel="handleVisible"
+    >
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-radio-group
+          v-model="form.permission_type"
+          :disabled="type !== 'edit'"
+        >
+          <el-form-item>
+            <el-radio :label="0"><span>无特殊权限</span></el-radio>
+            <div>
+              <span class="form-content">负责人</span>
+              <el-select
+                v-model="form.person"
+                multiple
+                placeholder="请选择负责人"
+                :disabled="type !== 'edit'"
+              >
+                <el-option
+                  v-for="({ label, value }, index) in charge_list"
+                  :key="index"
+                  :label="label"
+                  :value="value"
+                ></el-option>
+              </el-select>
+            </div>
+          </el-form-item>
+          <el-form-item>
+            <el-radio :label="1"><span>特殊权限:</span></el-radio>
+            <el-form-item
+              label="负责人"
+              prop="charge"
+              v-for="(item, index) in form.charge"
+              :key="index"
+              :rules="{
+                required: true,
+                message: '负责人不能为空',
+                trigger: 'blur',
+              }"
+            >
+              <div class="flex">
+                <el-select
+                  class="margin-bottom-20 margin-right-10"
+                  placeholder="请选择负责人"
+                  v-model="item.person"
+                  filterable
+                  :disabled="type !== 'edit'"
+                >
+                  <el-option
+                    v-for="({ label, value }, index) in charge_list"
+                    :key="index"
+                    :label="label"
+                    :value="value"
+                  ></el-option>
+                </el-select>
+                <div class="form-select">
+                  <span class="form-content">可编辑行:从</span>
+                  <el-input
+                    v-model="item.row_start"
+                    @input="(params) => handleInput(index, 'row_start', params)"
+                    :disabled="type !== 'edit'"
+                  />
+                  <span class="form-content">到</span>
+                  <el-input
+                    v-model="item.row_end"
+                    @input="(params) => handleInput(index, 'row_end', params)"
+                    :disabled="type !== 'edit'"
+                  />
+                </div>
+                <div class="form-select">
+                  <span class="form-content">可编辑列:从</span>
+                  <el-input
+                    :disabled="type !== 'edit'"
+                    v-model="item.col_start"
+                  />
+                  <!-- @input="(params) => handleInput(index, 'col_start', params)" -->
+                  <span class="form-content">到</span>
+                  <el-input
+                    :disabled="type !== 'edit'"
+                    v-model="item.col_end"
+                  />
+                </div>
+              </div>
+            </el-form-item>
+            <div>
+              <el-button
+                @click.prevent="handleCharge('add')"
+                :disabled="type !== 'edit'"
+                >添加</el-button
+              >
+              <el-button
+                v-if="form.charge.length - 1"
+                @click.prevent="handleCharge('delete')"
+                :disabled="type !== 'edit'"
+                >删除</el-button
+              >
+            </div>
+          </el-form-item>
+        </el-radio-group>
+      </el-form>
+      <template v-if="id && status !== '2' && status !== '3'" v-slot:footer
+        ><div></div
+      ></template>
+    </simple-dialog>
+    <simpleDialog
+      title="提交"
+      :visible="manager_approve"
+      :modal="false"
+      @cancel="handleApprove(0)"
+    >
+      <el-form :model="approveForm" label-width="120px">
+        <el-form-item
+          label="审批意见:"
+          :rules="{
+            required: true,
+            message: '请选择审批意见',
+            trigger: 'change',
+          }"
+        >
+          <el-select v-model="approveForm.type">
+            <el-option
+              v-for="item in approveForm.list"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item
+          v-if="approveForm.type === '3'"
+          label="其它审批意见:"
+          :rules="{
+            required: true,
+            message: '请输入审批意见',
+            trigger: 'blur',
+          }"
+          ><el-input v-model="approveForm.comments"
+        /></el-form-item>
+      </el-form>
+      <template v-slot:footer>
+        <div>
+          <el-button @click.prevent="handleApprove('1')">结束</el-button>
+          <el-button @click.prevent="handleApprove('4')" type="primary"
+            >转副总审批</el-button
+          >
+          <el-button @click.prevent="handleApprove('3')" type="primary"
+            >转总经理审批</el-button
+          >
+        </div>
+      </template>
+    </simpleDialog>
+  </div>
+</template>
+
+<script>
+import luckyexcel from "luckyexcel";
+import { exportExcel } from "../common/export";
+import simpleDialog from "./dialog.vue";
+export default {
+  components: {
+    simpleDialog,
+  },
+  props: {
+    type: {
+      type: String,
+      default: "view", // view 查看 edit 编辑
+    },
+    attribute: {
+      type: String,
+      default: "template", // template 模板 order 工单 file 文件
+    },
+    id: {
+      default: null,
+    },
+    receiver: {
+      type: String,
+      default: "",
+    },
+    status: { type: String, default: "" },
+  },
+  data() {
+    return {
+      form: {
+        charge: [
+          {
+            person: [],
+            col_start: "",
+            col_end: "",
+            row_start: "",
+            row_end: "",
+          },
+        ],
+        array: [],
+        type: null,
+        permission_type: null,
+        col_start: "",
+        col_end: "",
+        row_start: "",
+        row_end: "",
+      },
+      approveForm: {
+        type: "",
+        comments: "",
+        list: [
+          {
+            label: "同意",
+            value: "同意",
+          },
+          {
+            label: "不同意",
+            value: "不同意",
+          },
+          {
+            label: "其他",
+            value: "3",
+          },
+        ],
+      },
+
+      // 可提交标志
+      addFlag: "0",
+      rowList: [],
+      isDisable: true,
+      issued_id: null,
+      template_id: null,
+      visible: false,
+      manager_approve: false,
+      row_list: [],
+      column_list: [],
+      charge_list: [],
+      type_options: [
+        {
+          value: 1,
+          label: "按行",
+        },
+        // {
+        //     value: 2,
+        //     label: "按列",
+        // },
+      ],
+    };
+  },
+  methods: {
+    handleInit() {
+      if (this.id) {
+        this.handleQuery();
+      } else {
+        this.handleCreate();
+      }
+    },
+    // // 权限选择
+    // handleRadio(e){
+    //     console.log(e,'e');
+    // },
+    handleAllow({ row, column }) {
+      let public_permisson =
+        (!this.form.permission_type ||
+          this.status === "2" ||
+          this.status === "3") &&
+        this.type === "edit";
+      let editable =
+        this.row_list.includes(row) && this.column_list.includes(column);
+      // let totalBoolean = (public_permisson || editable) && this.id;
+      let totalBoolean = public_permisson || editable;
+      return totalBoolean;
+    },
+    async handleQuery() {
+      let url = "";
+      let params = {};
+      switch (this.attribute) {
+        case "template":
+          url = "/market/CMKFileTemplate/QueryCMKFileTemplateById";
+          params = {
+            templateId: this.id,
+          };
+          break;
+        case "order":
+          url = "/market/CMKIssued/CMKQueryIssuedById";
+          params = {
+            id: this.id,
+          };
+          break;
+        case "file":
+          url = "/market/CMKIssued/CMKIssuedProcessByUser";
+          params = {
+            id: this.id,
+            receiverId: this.receiver,
+          };
+          break;
+      }
+      const {
+        data: {
+          templateContent,
+          templateName,
+          issuedId,
+          templateId,
+          list,
+          addFlag,
+        },
+      } = await this.$http({
+        url,
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: params,
+      });
+      this.template_id = templateId;
+      this.issued_id = issuedId;
+      this.addFlag = addFlag;
+      console.log(JSON.parse(templateContent), "123123");
+      if (list && list.length) {
+        const { type } = list[0];
+        if (type === "1") {
+          // 公共权限
+          // const { allowEditingColumns, rowNum } = list[0];
+          this.form = {
+            permission_type: Number(type) - 1,
+            person: list.map((el) => {
+              return `${el.principalMent}-${el.principalId},${el.principalName}`;
+            }),
+            charge: [
+              {
+                person: "",
+                col_start: "",
+                col_end: "",
+                row_start: "",
+                row_end: "",
+              },
+            ],
+          };
+        } else {
+          // 特殊权限
+          this.form = {
+            permission_type: Number(type) - 1,
+            col_start: "",
+            col_end: "",
+            row_start: "",
+            row_end: "",
+            charge: list.map((el) => ({
+              person: `${el.principalMent}-${el.principalId},${el.principalName}`,
+              col_start: el.allowEditingColumns.split(",")[0],
+              col_end:
+                el.allowEditingColumns.split(",")[
+                  el.allowEditingColumns.split(",").length - 1
+                ],
+              row_start: el.rowNum.split(",")[0],
+              row_end: el.rowNum.split(",")[el.rowNum.split(",").length - 1],
+            })),
+          };
+        }
+        this.row_list =
+          this.type === "edit" && list[0].rowNum
+            ? list[0].rowNum
+                .split(",")
+                .map((element) => JSON.parse(element) - 1)
+            : [];
+        if (this.type === "edit" && list[0].allowEditingColumns) {
+          // this.column_list = list[0].allowEditingColumns
+          //   .split(",")
+          //   .map((element) => JSON.parse(element) - 1);
+          this.column_list =
+            list[0].allowEditingColumnsFlag === "1"
+              ? list[0].allowEditingColumnsShuzi
+                  .split(",")
+                  .map((element) => JSON.parse(element) - 1)
+              : list[0].allowEditingColumns
+                  .split(",")
+                  .map((element) => JSON.parse(element) - 1);
+        } else {
+          this.column_list = [];
+        }
+        // this.formateNumber(list[0].allowEditingColumns);
+      }
+      this.handleCreate({
+        json: templateContent ? JSON.parse(templateContent) : {},
+        name: templateName,
+        type: "json",
+      });
+    },
+    handleForbid() {
+      // const object = {};
+      const { permission_type } = this.form;
+      if (permission_type === 0) {
+        // 公共权限 暂时不用可编辑行和列
+        const { person } = this.form;
+        if (person.length) {
+          return false;
+        }
+        return true;
+      } else if (permission_type === 1) {
+        // 特殊权限
+        let flag = 1;
+        const { charge } = this.form;
+        charge.forEach((el) => {
+          if (
+            Object.values(el).filter((v) => {
+              return v !== "";
+            }).length === 5
+          ) {
+            flag = flag * 1;
+          } else {
+            flag = flag * 0;
+          }
+        });
+        return !flag;
+      } else {
+        return true;
+      }
+    },
+    async handleCreate({ file, json, type, name } = {}) {
+      let that = this;
+      const options = {
+        container: "luckysheet",
+        lang: "zh",
+        showsheetbar: false,
+        hook: {
+          cellEditBefore: function ([
+            { row_focus: row, column_focus: column },
+          ]) {
+            if (!that.handleAllow({ row, column })) {
+              that.$message.error("您没有编辑权限");
+            }
+          },
+          // cellUpdated: function (row, column) {
+          //   that.rowList.push(row);
+          // },
+          cellUpdateBefore: function (row, column) {
+            if (!that.handleAllow({ row, column })) {
+              return false;
+            }
+          },
+          cellRenderAfter: function (cell, position) {
+            const { r: row, c: column } = position;
+            console.log();
+            if (cell) {
+              if (!that.handleAllow({ row, column })) {
+                cell.bg = "#d5d5d5";
+              } else {
+                cell.bg = "#ffffff";
+              }
+            }
+          },
+          updated: function ({ range }) {
+            const middle = range.map((el) => {
+              return that.paramsArr(el.row[0], el.row[1]);
+            });
+            let changedList = middle.join(",").split(",");
+            that.rowList.push(...changedList);
+            console.log(that.rowList, "that.rowList");
+          },
+        },
+      };
+      switch (type) {
+        case "file":
+          if (file) {
+            await new Promise((resolve) => {
+              luckyexcel.transformExcelToLucky(file, (export_json) => {
+                options.data = [
+                  ...export_json.sheets.map((element) => ({
+                    ...element,
+                    zoomRatio: 0.75,
+                  })),
+                ];
+                options.title = export_json.info.name;
+                resolve();
+              });
+            });
+          }
+          break;
+        case "json":
+          if (json) {
+            options.data = [
+              {
+                ...json,
+                zoomRatio: 0.75,
+              },
+            ];
+            options.title = name;
+          }
+          break;
+      }
+      window.luckysheet.create(options);
+
+      let clock = setInterval(() => {
+        if (window.luckysheet) {
+          window.luckysheet.refresh();
+          clearInterval(clock);
+        }
+      }, 1000);
+    },
+    async handleChange(response) {
+      this.handleCreate({ file: response.raw, type: "file" });
+    },
+    handleDownload() {
+      exportExcel(
+        window.luckysheet.getAllSheets(),
+        window.luckysheet.getWorkbookName()
+      );
+    },
+    async handleAddAuth({ id }) {
+      // const object = {};
+      const { permission_type } = this.form;
+      console.log(id, permission_type);
+      let reqdata = {
+        templateId: id,
+        type: permission_type ? 2 : 1,
+      };
+      if (!permission_type) {
+        //  公共权限
+        const { person } = this.form;
+
+        const principalId = [];
+        const principalName = [];
+        const principalMent = [];
+        person.forEach((el) => {
+          principalMent.push(el.split(",")[0].split("-")[0]);
+          principalId.push(el.split(",")[0].split("-")[1]);
+          principalName.push(el.split(",")[1]);
+        });
+        reqdata.principalId = principalId.join(",");
+        reqdata.principalName = principalName.join(",");
+        reqdata.principalMent = principalName.join(",");
+      } else {
+        const { charge } = this.form;
+        //  特殊权限
+        reqdata.specialAuth = charge.map((el) =>
+          JSON.stringify({
+            allowEditingColumns: `${el.col_start},${el.col_end}`,
+            rowNum: `${el.row_start},${el.row_end}`,
+            principalMent: el.person.split(",")[0].split("-")[0],
+            principalId: el.person.split(",")[0].split("-")[1],
+            principalName: el.person.split(",")[1],
+          })
+        );
+      }
+      const {
+        data: { result, desc },
+      } = await this.$http({
+        url: this.id
+          ? "/market/CMKFileTemplateAuthority/CMKFileTemplateAuthorityUpdate"
+          : "/market/CMKFileTemplateAuthority/CMKFileTemplateAuthorityAdd",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: reqdata,
+      });
+      if (result) {
+        this.$message.error(desc);
+      } else {
+        this.$message.success(desc);
+      }
+      return result;
+    },
+    async handleSave(type) {
+      let edit_url = "";
+      switch (this.attribute) {
+        case "template":
+          edit_url = "";
+          break;
+        case "order":
+          edit_url = "";
+          break;
+        case "file":
+          edit_url = "/market/CMKIssued/CMKIssuedSubmit";
+          break;
+      }
+      const sheet_name = window.luckysheet.getSheet().name;
+      const data = window.luckysheet.getSheet(sheet_name);
+      const workbook_name = window.luckysheet.getWorkbookName();
+      if (!this.id) {
+        // 新增时添加权限
+        const {
+          data: { body },
+        } = await this.$http({
+          url: "/market/CMKFileTemplate/CMKFileTemplateAdd", // 新增
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: {
+            id: this.template_id,
+            templateContent: JSON.stringify(data),
+            templateName: workbook_name,
+            issuedId: this.issued_id,
+            status: type,
+          },
+        });
+        await this.handleAddAuth({ id: body });
+        this.$emit("save");
+      } else {
+        // 职位
+        let duty = JSON.parse(sessionStorage.userInfo).duty;
+        if (duty === "7") {
+          this.manager_approve = true;
+        } else {
+          if (type === "2") {
+            // 暂存
+            await this.$http({
+              url: "/market/CMKFileTemplate/UptateCMKFileTemplateById", // 新增
+              method: "post",
+              headers: {
+                "Content-Type": "application/json",
+              },
+              data: {
+                templateId: this.id,
+                templateContent: JSON.stringify(data),
+                templateName: workbook_name,
+                status: type,
+              },
+            });
+            this.$emit("save");
+            return;
+          }
+          // 员工提交
+          this.rowList.shift();
+          let reqdata = {
+            rowIndex: [...new Set(this.rowList)]
+              .sort(function (a, b) {
+                return a - b;
+              })
+              .join(","),
+            rowContent: [...new Set(this.rowList)]
+              .sort(function (a, b) {
+                return a - b;
+              })
+              .map((el) => {
+                return data.data[el];
+              }),
+          };
+          await this.$http({
+            url: edit_url, //提交
+            method: "post",
+            headers: {
+              "Content-Type": "application/json",
+            },
+            data: {
+              id: this.template_id,
+              templateContent: JSON.stringify(data),
+              templateName: workbook_name,
+              issuedId: this.issued_id,
+              rowJson: JSON.stringify(reqdata),
+            },
+          });
+          this.$emit("save");
+        }
+      }
+    },
+    // 判断数组是否有值
+    confirmArrayData(data) {
+      if (data instanceof Array) {
+        let flag = 0;
+        if (data.length) {
+          data.forEach((el) => {
+            if (el instanceof Object) {
+              flag = flag + 1;
+            }
+          });
+          if (flag) {
+            return true;
+          } else {
+            return false;
+          }
+        } else {
+          return false;
+        }
+      } else {
+        return false;
+      }
+    },
+    async handleAuth() {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          if (this.handleForbid()) {
+            this.$message.error("请完善可编辑信息");
+            return false;
+          }
+          if (this.id) {
+            this.handleAddAuth({ id: this.id });
+          }
+          this.handleVisible();
+        }
+      });
+    },
+    // 通用方法用于转化全局
+    paramsArr(start, end) {
+      const arr = [];
+      console.log(start, end);
+      for (let i = Number(start); i <= Number(end); i++) {
+        arr.push(i);
+      }
+      return arr.join(",");
+    },
+    filterName(id, arr) {
+      return arr.filter((el) => el.secLeaderLogin === id)[0].secLeaderName;
+    },
+    handleCharge(type) {
+      switch (type) {
+        case "add":
+          this.form.charge.push({
+            person: "",
+          });
+          this.handleForbid();
+          break;
+        case "delete":
+          this.form.charge.pop();
+          this.handleForbid();
+          break;
+      }
+    },
+    handleVisible() {
+      this.visible = !this.visible;
+    },
+    handleInput(index, name, value) {
+      let reg = /^[0-9]*$/;
+      if (!reg.test(value)) {
+        this.form.charge[index][name] = this.form.charge[index][name].substr(
+          0,
+          this.form.charge[index][name].length - 1
+        );
+        this.$message.error("该处只能填写数字");
+      }
+    },
+    async handleApprove(type) {
+      if (type) {
+        if (this.approveForm.type) {
+          if (this.approveForm.type === "3" && !this.approveForm.comments) {
+            this.$message.error("请输入其他审批意见");
+            return;
+          }
+        } else {
+          this.$message.error("请选择审批意见");
+          return;
+        }
+        const sheet_name = window.luckysheet.getSheet().name;
+        const data = window.luckysheet.getSheet(sheet_name);
+        const workbook_name = window.luckysheet.getWorkbookName();
+        // 经理提交
+        this.rowList.shift();
+        let reqdata = {
+          rowIndex: [...new Set(this.rowList)]
+            .sort(function (a, b) {
+              return a - b;
+            })
+            .join(","),
+          rowContent: [...new Set(this.rowList)]
+            .sort(function (a, b) {
+              return a - b;
+            })
+            .map((el) => {
+              return data.data[el];
+            }),
+        };
+        await this.$http({
+          url: "/market/CMKIssued/CMKIssuedSubmit", // 提交
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: {
+            id: this.template_id,
+            templateContent: JSON.stringify(data),
+            templateName: workbook_name,
+            issuedId: this.issued_id,
+            rowJson: JSON.stringify(reqdata),
+          },
+        });
+        let params = {
+          id: this.issued_id,
+          reviewOpinion:
+            this.approveForm.type === "3"
+              ? this.approveForm.comments
+              : this.approveForm.type,
+        };
+        switch (type) {
+          case "1":
+            params = {
+              ...params,
+              operateName: "结束",
+              status: 3,
+            };
+            break;
+          case "4":
+            params = {
+              ...params,
+              operateName: "转副总审批",
+              reviewType: 2,
+            };
+            break;
+          case "3":
+            params = {
+              ...params,
+              operateName: "转总经理审批",
+              reviewType: 3,
+            };
+            break;
+        }
+        await this.$http({
+          url: "/market/CMKIssued/CMKIssuedCheck", // 审批
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: params,
+        });
+        this.$message({
+          type: "success",
+          message: "审批成功",
+        });
+        this.manager_approve = false;
+        this.$emit("save");
+      } else {
+        this.manager_approve = false;
+      }
+    },
+    handleFullscreen() {
+      const element = document.body;
+      const is_fullscreen =
+        document.fullScreen ||
+        document.mozFullScreen ||
+        document.webkitIsFullScreen;
+      if (!is_fullscreen) {
+        //进入全屏,多重短路表达式
+        (element.requestFullscreen && element.requestFullscreen()) ||
+          (element.mozRequestFullScreen && element.mozRequestFullScreen()) ||
+          (element.webkitRequestFullscreen &&
+            element.webkitRequestFullscreen()) ||
+          (element.msRequestFullscreen && element.msRequestFullscreen());
+      } else {
+        //退出全屏,三目运算符
+        document.exitFullscreen
+          ? document.exitFullscreen()
+          : document.mozCancelFullScreen
+          ? document.mozCancelFullScreen()
+          : document.webkitExitFullscreen
+          ? document.webkitExitFullscreen()
+          : "";
+      }
+    },
+    handleResave() {
+      const sheet_name = window.luckysheet.getSheet().name;
+      const data = window.luckysheet.getSheet(sheet_name);
+      const workbook_name = window.luckysheet.getWorkbookName();
+      this.$http({
+        url: "/market/CMKFileTemplate/UptateCMKFileTemplateById",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          templateId: this.id,
+          templateContent: JSON.stringify(data),
+          templateName: workbook_name,
+          status: "0",
+        },
+      }).then(() => {
+        this.$emit("save");
+      });
+    },
+    handleChargeList() {
+      this.$http({
+        url: "/market/techcentergj/queryLeaderList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((response) => {
+        this.charge_list = response.data.map((element) => ({
+          label: `${element.ou} ${element.secLeaderName}`,
+          value: `${element.ou}-${element.secLeaderLogin},${element.secLeaderName}`,
+        }));
+      });
+    },
+  },
+  mounted() {
+    console.log(this.destroy, "destroy");
+    this.handleInit();
+    this.handleChargeList();
+  },
+  destroyed() {
+    window.luckysheet.destroy();
+  },
+};
+</script>
+
+<style lang="scss" scope>
+.sheet-container {
+  position: fixed;
+  width: calc(100% - 40px);
+  height: 100%;
+  &-block {
+    overflow: hidden;
+    position: absolute;
+    width: 100%;
+    height: 75%;
+  }
+}
+.form {
+  &-input {
+    margin-top: 5px;
+    .el-input {
+      width: 150px;
+      .el-input__inner {
+        height: 30px !important;
+        line-height: 30px !important;
+      }
+    }
+  }
+  &-content {
+    margin: 0px 10px;
+  }
+  &-select {
+    .el-input {
+      width: 100px;
+      .el-input__inner {
+        height: 30px !important;
+        line-height: 30px !important;
+      }
+    }
+  }
+}
+</style>

+ 239 - 0
src/pages/main/collect/components/table.vue

@@ -0,0 +1,239 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-11-01 18:02:58
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-02-10 18:31:51
+ * @FilePath     : /spfm-market-front/src/pages/main/performance/components/table.vue
+-->
+<template>
+  <el-table
+    class="simple-table"
+    :data="computed_list"
+    v-loading="loading"
+    @selection-change="handleSelectionChange"
+  >
+    <el-table-column
+      type="selection"
+      width="55"
+      :selectable="selectable"
+      v-if="multiple"
+    />
+    <el-table-column
+      v-for="(
+        { props, label, type, width, align, children, dictionary, control },
+        index
+      ) in config"
+      :key="index"
+      :prop="props"
+      :width="width"
+      :label="label"
+      :align="align || 'center'"
+    >
+      <template #default="scope">
+        <div v-if="type === 'edit'">
+          <el-input
+            v-if="scope.row[`edit`]"
+            v-model="scope.row[props]"
+            autosize
+            type="textarea"
+            @change="handleModify"
+          />
+        </div>
+        <div v-if="type === 'number'">{{ scope.$index + 1 }}</div>
+        <div v-else-if="type === 'textarea'">
+          <pre class="simple-table-break">{{ scope.row[props] }}</pre>
+        </div>
+        <div v-else-if="type === 'date'">
+          <div>{{ $formatDate(scope.row[props], "YYYY-MM-DD") }}</div>
+        </div>
+        <div v-else-if="type === 'time'">
+          <div>
+            {{ $formatDate(scope.row[props], "YYYY-MM-DD HH:00:00") }}
+          </div>
+        </div>
+        <div v-else-if="type === 'click'">
+          <div
+            v-if="control && Number(scope.row[control]) < 1 && scope.row[props]"
+          >
+            <span
+              v-for="(item, index) in scope.row[props].split(',')"
+              :key="index"
+              class="simple-table-click cursor-pointer"
+              @click="handleClick(props, { ...scope.row, index })"
+            >
+              {{ scope.row[props].split(",")[index] }}
+            </span>
+          </div>
+          <div
+            v-else-if="!control"
+            class="simple-table-click cursor-pointer"
+            @click="handleClick(props, scope.row)"
+          >
+            {{ scope.row[props] }}
+          </div>
+          <div v-else class="cursor-pointer">
+            {{ scope.row[props] }}
+          </div>
+        </div>
+        <div v-else-if="type === 'dictionary'">
+          {{ dictionary[scope.row[props]] }}
+        </div>
+        <div v-else-if="type === 'file'">
+          <div v-if="scope.row[props] && scope.row[props].length">
+            <div
+              v-for="({ fileName }, index) in scope.row[props]"
+              :key="index"
+              @click="downloadFile({ index, rows: scope.row })"
+              class="simple-table-click cursor-pointer margin-left-10"
+            >
+              {{ fileName }}
+            </div>
+          </div>
+          <div v-else></div>
+        </div>
+        <div v-else>{{ scope.row[props] }}</div>
+      </template>
+      <template v-if="children">
+        <el-table-column
+          v-for="({ props, label, width, align, type }, index) in children"
+          :key="index"
+          :prop="props"
+          :width="width"
+          :label="label"
+          :align="align || 'center'"
+        >
+          <template #default="scope">
+            <div v-if="type === 'edit'">
+              <el-input
+                v-model="scope.row[props]"
+                @change="handleModify"
+                autosize
+                type="textarea"
+              />
+            </div>
+            <div v-else>{{ scope.row[props] }}</div>
+          </template>
+          <!-- <template v-if="variable">
+            <div>{{ scope.row[props] }}</div>
+          </template> -->
+        </el-table-column>
+      </template>
+    </el-table-column>
+    <el-table-column
+      v-if="handleRow.length"
+      label="操作"
+      :align="'center'"
+      :width="handleRow.length * 50"
+    >
+      <template slot-scope="scope">
+        <span
+          v-for="({ label, props, popconfirm, visible }, index) in handleRow"
+          :key="index"
+          class="padding-right-5"
+        >
+          <!--            v-if="handleFormat(visible, scope.row)"-->
+          <span v-if="handleFormat(visible, scope.row)">
+            <!-- <el-popconfirm
+              v-if="popconfirm"
+              :title="`确定要${label}吗?`"
+              @confirm="handleClick(props, scope.row)"
+              @cancel="handleCancel"
+            >
+              <el-button slot="reference" type="text" size="small">{{
+                label
+              }}</el-button>
+            </el-popconfirm> -->
+            <el-button
+              v-if="popconfirm"
+              type="text"
+              size="small"
+              @click="handleConfirm(label, props, scope.row)"
+              >{{ label }}</el-button
+            >
+            <el-button
+              v-else
+              @click="handleClick(props, scope.row)"
+              type="text"
+              size="small"
+              >{{ label }}</el-button
+            >
+          </span>
+        </span>
+      </template>
+    </el-table-column>
+  </el-table>
+</template>
+<script>
+export default {
+  props: {
+    list: {
+      type: Array,
+      default: () => [],
+    },
+    config: {
+      type: Array,
+      default: () => [],
+    },
+    multiple: {
+      type: Boolean,
+      default: false,
+    },
+    selectable: {
+      type: Function,
+    },
+    loading: {
+      type: Boolean,
+      default: false,
+    },
+    handleRow: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  computed: {
+    computed_list() {
+      return this.list.map((element) => ({
+        ...element,
+      }));
+    },
+  },
+  methods: {
+    handleFormat(params, data) {
+      let visible = true;
+      if (params) {
+        visible = false;
+        Object.keys(params).forEach((element) => {
+          if (params[element].includes(data[element])) {
+            visible = true;
+          }
+        });
+      }
+      return visible;
+    },
+    handleConfirm(label, props, row) {
+      this.$confirm(`确定要${label}吗?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "error",
+      })
+        .then(() => {
+          this.$emit(props, row);
+        })
+        .catch(() => {});
+    },
+    handleClick(props, row) {
+      this.$emit(props, row);
+    },
+    handleCancel() {},
+    handleSelectionChange(val) {
+      this.$emit("selection", val);
+    },
+    downloadFile(val) {
+      this.$emit("download", val);
+    },
+    handleModify() {
+      this.$emit("modify", this.computed_list);
+    },
+  },
+};
+</script>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 200 - 0
src/pages/main/collect/index.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1038 - 0
src/pages/main/collect/launch.vue


La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 1216 - 1074
src/pages/main/file/flieList.vue


+ 254 - 0
src/pages/main/itknowledgetop/addKnowledge.vue

@@ -0,0 +1,254 @@
+<template>
+  <fullscreen class="mc-container">
+    <div class="container-box">
+      <h2>新增知识库</h2>
+      <el-row :gutter="20" style="margin-top: 15px">
+        <el-col :span="24"
+          ><el-form
+            :model="formData"
+            :rules="rules"
+            ref="ruleForm"
+            label-width="50px"
+            class="demo-ruleForm"
+          >
+            <el-col :span="10">
+              <el-form-item label="标题" prop="title">
+                <el-input
+                  v-model="formData.title"
+                  placeholder="请输入标题"
+                ></el-input>
+              </el-form-item>
+              <el-form-item prop="pubType" label="类型">
+                <el-select
+                  style="width: 100%"
+                  :popper-append-to-body="false"
+                  v-model="formData.pubType"
+                  placeholder="发布类型"
+                  clearable
+                >
+                  <el-option
+                    v-for="item in knowledgeType"
+                    :key="item.id"
+                    :label="item.pubType"
+                    :value="item.id"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+              <el-form-item label="目录" prop="catalogDesc">
+                <div style="display: flex">
+                  <el-input
+                    v-model="formData.catalogDesc"
+                    readonly
+                    placeholder="请选择目录"
+                  ></el-input>
+                  <el-button @click="selectCatalogs">选择</el-button>
+                </div>
+              </el-form-item>
+              <el-form-item label="附件" prop="catalog">
+                <myUpload
+                  @uploadBack="uploadBack"
+                  :fileInfo="fileInfo"
+                  :fileList="fileInfo.fileList"
+                >
+                </myUpload>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="submitForm('ruleForm')"
+                  >立即创建</el-button
+                >
+                <el-button @click="resetForm('ruleForm')">取消</el-button>
+              </el-form-item>
+            </el-col>
+            <el-col :span="14">
+              <el-form-item label="内容" prop="content">
+                <p-editor-tiny
+                  imgType="upload"
+                  v-model="formData.content"
+                ></p-editor-tiny
+              ></el-form-item>
+            </el-col> </el-form
+        ></el-col>
+      </el-row>
+    </div>
+    <el-dialog
+      title="目录树"
+      :visible.sync="catalogDialogVisible"
+      width="45%"
+      :modal-append-to-body="false"
+    >
+      <el-tree
+        class="filter-tree"
+        :data="treeData"
+        node-key="catalog"
+        :props="defaultProps"
+        default-expand-all
+        :filter-node-method="filterNode"
+        @node-click="nodeClick"
+        ref="tree"
+      >
+      </el-tree>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="clearCatalog">取 消</el-button>
+        <el-button type="primary" @click="trueCatalog">确 定</el-button>
+      </span>
+    </el-dialog>
+  </fullscreen>
+</template><script>
+import myUpload from "../../../components/upload";
+export default {
+  data() {
+    return {
+      catalogDialogVisible: false,
+      departmentDialogVisible: false,
+      formData: {
+        title: "",
+        catalog: "",
+        catalogDesc: "",
+        content: "",
+        pubType: "",
+      },
+      rules: {
+        title: [{ required: true, message: "请输入标题", trigger: "blur" }],
+        catalogDesc: [
+          { required: true, message: "请选择目录", trigger: "change" },
+        ],
+        pubType: [{ required: true, message: "请选择类型", trigger: "change" }],
+        content: [
+          {
+            required: true,
+            message: "请输入内容",
+            trigger: "change",
+          },
+        ],
+      },
+      filterText: "",
+      treeData: [],
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      knowledgeType: [],
+      fileInfo: {
+        limit: 5,
+        url: "/market/cknowledgenetatt/upload",
+        fileList: [],
+      },
+    };
+  },
+  components: {
+    PEditorTiny: () =>
+      import(
+        /* webpackChunkName: "peditor-tiny" */ "../../../components/p-editor-tiny"
+      ),
+    myUpload,
+  },
+  methods: {
+    uploadBack(v) {
+      this.attList = v;
+    },
+    // 选择完目录清空
+    clearCatalog() {
+      this.formData.catalogDesc = "";
+      this.formData.catalog = "";
+      this.catalogDialogVisible = false;
+    },
+    // 选择完目录确认
+    trueCatalog() {
+      this.catalogDialogVisible = false;
+    },
+    // 选择目录弹出
+    selectCatalogs() {
+      this.catalogDialogVisible = true;
+    },
+    // 选择部门弹出
+    selectDepartment() {
+      this.departmentDialogVisible = true;
+    },
+    //字典类型
+    getListype(v) {
+      this.$http({
+        url: "/market/mkKnowledgePubMsgType/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          dictCode: "pubType",
+        },
+      }).then((res) => {
+        this.knowledgeType = res.data;
+      });
+    },
+    // 树筛选
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    async submitForm(formName) {
+      let valid = await this.$refs[formName].validate().catch((err) => err);
+      if (valid) {
+        alert("submit!");
+      } else {
+        console.log("error submit!!");
+        return false;
+      }
+    }, // 树点击
+    nodeClick(index, data, node) {
+      this.formData.catalogDesc = data.data.title;
+      this.formData.catalog = data.data.id;
+    },
+    resetForm(formName) {
+      this.$refs[formName].resetFields();
+    },
+    getData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalog/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeData = res.data;
+      });
+    },
+  },
+  mounted() {
+    this.getData();
+    this.getListype();
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+};
+</script>
+<style>
+.mc-container {
+  margin: 15px;
+  background: #fff;
+  border-radius: 5px;
+  height: calc(100vh - 150px);
+  margin-bottom: 0;
+}
+.mc-container .container-box {
+  width: 100%;
+  height: 100%;
+  max-height: 96vh;
+  margin-top: 20px;
+  padding: 0 20px 0 20px;
+  overflow-x: hidden !important;
+  padding-top: 20px;
+}
+.tinymce-editor {
+  height: 300px;
+}
+.mc-container .el-upload{
+  width:100%
+}
+.mc-container .el-upload-dragger{
+  width: 100%;
+}
+</style>

+ 503 - 0
src/pages/main/itknowledgetop/catalog.vue

@@ -0,0 +1,503 @@
+<template>
+  <div class="container">
+    <div class="main-box container-box">
+      <div class="inner-left" style="overflow: hidden">
+        <div class="button-list">
+          <el-button type="primary" @click="firstMenu" plain
+            >添加一级目录</el-button
+          >
+          <el-button type="primary" @click="addMenu" plain
+            >添加子目录</el-button
+          >
+          <el-button type="primary" @click="delMenu" plain>删除</el-button>
+          <el-dropdown
+            @command="treeAction"
+            trigger="click"
+            style="margin-left: 15px"
+          >
+            <el-button type="primary" plain>
+              树操作<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item :command="1">全部展开</el-dropdown-item>
+              <el-dropdown-item :command="2">全部关闭</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </div>
+        <div class="choice-style">
+          <div class="ant-alert-info ant-alert">
+            <i style="color: #1890ff" class="el-icon-warning"></i>当前选择:{{
+              actionName
+            }}
+            <span class="canel-style" @click="canelChoice" v-show="actionName"
+              >取消选择</span
+            >
+          </div>
+        </div>
+        <div style="margin: 10px 0">
+          <el-input
+            placeholder="请输入内容"
+            v-model="filterText"
+            class="input-with-select"
+            clearable
+            @change="
+              () => {
+                if (!filterText) {
+                  searchMenu();
+                }
+              }
+            "
+          >
+            <el-button
+              slot="append"
+              @click="searchMenu"
+              icon="el-icon-search"
+            ></el-button>
+          </el-input>
+        </div>
+        <div
+          v-loading="loading"
+          style="height: calc(100% - 200px); overflow-y: scroll"
+        >
+          <el-tree
+            ref="catalogTree"
+            class="tree-line"
+            :expand-on-click-node="true"
+            :auto-expand-parent="true"
+            :default-expand-all="true"
+            :props="defaultProps"
+            :data="menuList"
+            @node-click="nodeClick"
+            :filter-node-method="filterNode"
+            node-key="id"
+          >
+            <span class="custom-tree-node" slot-scope="{ node }">
+              <span>
+                <span style="color: #009cff" class="iconfont icon-wenjianjia"></span>
+                <!-- <span
+                  v-if="
+                    node.data.hasOwnProperty('children') &&
+                    node.data.children.length > 0
+                  "
+                  style="color: #009cff"
+                  class="iconfont icon-wenjianjia"
+                ></span> -->
+                <!-- <span
+                  v-else
+                  style="color: #fdb441"
+                  class="iconfont icon-wenjian"
+                ></span> -->
+                <span
+                  :style="
+                    node.data.hasOwnProperty('parent')
+                      ? 'font-size:14px;padding-left:5px'
+                      : 'font-size:12px;padding-left:5px'
+                  "
+                  >{{ node.data.title }}</span
+                >
+              </span>
+            </span>
+          </el-tree>
+        </div>
+        <div class="tree-action"></div>
+      </div>
+      <div class="inner-right">
+        <div v-if="actionName">
+          <div class="choice-style" style="width: 80%; margin: 15px auto">
+            <div class="ant-alert-info ant-alert">
+              <i style="color: #1890ff" class="el-icon-warning"></i>请编辑信息
+            </div>
+          </div>
+          <el-form
+            :model="formData"
+            :rules="rules"
+            ref="ruleForm"
+            label-width="100px"
+            class="demo-ruleForm"
+            style="width: 80%; margin: 50px auto"
+          >
+            <el-form-item label="目录名称" prop="title">
+              <el-input
+                v-model="formData.title"
+                placeholder="请输入标题"
+              ></el-input>
+            </el-form-item>
+            <el-form-item
+              prop="parentId"
+              v-if="actionName != 'add'"
+              label="父级编码"
+            >
+              <el-input
+                disabled
+                v-model="formData.parentId"
+                placeholder="请输入父级编码"
+              ></el-input>
+            </el-form-item>
+            <el-form-item
+              label="父级名称"
+              v-if="actionName != 'add'"
+              prop="parentName"
+            >
+              <el-input
+                disabled
+                v-model="formData.parentName"
+                readonly
+                placeholder="请输入父级名称"
+              ></el-input>
+            </el-form-item>
+            <el-form-item label="操作人" prop="createName">
+              <el-input
+                v-model="formData.createName"
+                readonly
+                placeholder="请输入操作人"
+              ></el-input>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="submitForm('ruleForm')">{{
+                subType
+              }}</el-button>
+              <el-button @click="resetForm('ruleForm')">取消</el-button>
+            </el-form-item>
+          </el-form>
+        </div>
+        <div v-else style="text-align: center">
+          <img src="../../../assets/404.png" alt="" />
+          <div>请先选择一个目录</div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  data() {
+    return {
+      loading: false,
+      defaultExpand: true,
+      functionCode: "",
+      filterText: "", // tree搜索value
+      actionName: "", // 当前选择节点名称
+      menuList: [], // tree数据源
+      checkedMenu: [], // 选中节点的functionCode
+      checkedNodes: [], // 选中节点的node值
+      roleData: "", // 某一条数据
+      formData: {
+        id: "",
+        title: "",
+        createName: JSON.parse(sessionStorage.userInfo).loginName,
+        createId: JSON.parse(sessionStorage.userInfo).loginNo,
+        orgName: JSON.parse(sessionStorage.userInfo).groupName,
+        orgId: JSON.parse(sessionStorage.userInfo).groupId,
+        parentId: "",
+        parentName: "",
+      },
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      rules: {
+        title: [{ required: true, message: "请输入标题", trigger: "change" }],
+        parentId: [
+          { required: false, message: "请选择父级编码", trigger: "change" },
+        ],
+      },
+      subType: "",
+    };
+  },
+  methods: {
+    async submitForm(formName) {
+      let valid = await this.$refs[formName].validate().catch((err) => err);
+      if (valid) {
+        this.$http({
+          url:
+            this.subType == "保存"
+              ? "/market/mkKnowledgeCatalogNet/add"
+              : "/market/mkKnowledgeCatalogNet/update",
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: this.formData,
+        }).then((res) => {
+          if (res.data.result == 0) {
+            this.$message({
+              type: "success",
+              message: res.data.desc,
+            });
+            this.actionName = "";
+            this.getData();
+          }
+        });
+      } else {
+        console.log("error submit!!");
+        return false;
+      }
+    },
+    resetForm(formName) {
+      this.actionName = "";
+      this.$refs[formName].resetFields();
+    },
+    addMenu() {
+      if (!this.actionName) {
+        this.$message("请先点击选中要增加菜单的位置");
+      } else {
+        this.subType = "保存";
+        this.formData.parentId = this.formData.id;
+        this.formData.parentName = this.formData.title;
+        this.formData.title = "";
+        this.formData.id = "";
+      }
+    },
+    treeAction(val) {
+      val == 1 ? (this.defaultExpand = true) : (this.defaultExpand = false);
+      for (let i = 0; i < this.$refs.catalogTree.store._getAllNodes().length; i++) {
+        this.$refs.catalogTree.store._getAllNodes()[i].expanded = this.defaultExpand;
+      }
+    },
+    canelChoice() {
+      this.actionName = "";
+      this.formData.title = "";
+    },
+    delMenu() {
+      if (!this.formData.id) {
+        this.$message("请先点击选中要删除的菜单");
+      } else {
+        this.$confirm("即将删除此条数据, 是否删除?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.$http({
+              url: "/market/mkKnowledgeCatalogNet/del",
+              method: "post",
+              headers: {
+                "Content-Type": "application/json",
+              },
+              data: {
+                id: this.formData.id,
+              },
+            }).then((res) => {
+              if (res.data.result == 0) {
+                this.$notify({
+                  title: "成功",
+                  message: res.data.desc,
+                  type: "success",
+                });
+                this.actionName = "";
+                this.getData();
+              }
+            });
+          })
+          .catch(() => {});
+      }
+    },
+    // 添加一级菜单
+    firstMenu() {
+      this.actionName = "add";
+      this.subType = "保存";
+      this.formData.title = "";
+      this.formData.parentId = "";
+      this.formData.parentName = "";
+      this.formData.id = "";
+    },
+    // 搜索按钮事件
+    searchMenu() {
+      this.$refs.tree.filter(this.filterText);
+    },
+    // tree过滤方法
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.functionName.indexOf(value) !== -1;
+    },
+    // 点击树节点事件
+    nodeClick(a, b, c, d) {
+      let nodeData = JSON.parse(JSON.stringify(b.data));
+      this.formData.title = nodeData.title;
+      this.formData.parentId = nodeData.parentId;
+      this.formData.parentName = nodeData.parentName;
+      this.formData.id = nodeData.id;
+      delete Object["children"];
+      this.actionName = nodeData.title;
+      this.subType = "修改";
+    },
+    closeDialog() {
+      this.actionName = "";
+      this.getTreeData({});
+    },
+    // 树形图 复选框监听事件
+    checkChange(a, b, c, d) {
+      this.checkedNodes = b.checkedNodes;
+    },
+    getData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalogNet/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.menuList = res.data;
+      });
+    },
+  },
+  mounted() {
+    this.getData();
+  },
+};
+</script>
+<style lang="scss" scoped>
+.container {
+  background-color: #f0f2f5;
+
+  .el-col {
+    background-color: white;
+    padding: 0 20px;
+  }
+
+  .container-box {
+    padding: 0;
+    margin-top: 0;
+    height: 100%;
+  }
+
+  .main-box {
+    overflow: hidden;
+    display: flex;
+
+    > div {
+      background-color: white;
+    }
+
+    .inner-left {
+      width: 40%;
+      padding: 0 20px;
+
+      .canel-style {
+        color: #1890ff;
+        cursor: pointer;
+        padding-left: 10px;
+      }
+    }
+
+    .inner-right {
+      width: 58%;
+      margin-left: 2%;
+      overflow-y: auto;
+    }
+  }
+}
+
+.el-button + .el-button {
+  margin-left: 20px;
+}
+
+.button-list {
+  padding: 30px 0 10px 0;
+}
+
+.choice-style {
+  background: rgb(255, 255, 255);
+}
+
+.tree-action {
+  bottom: 0;
+  width: 100%;
+  // border-top: 1px solid #e8e8e8;
+  padding: 10px 16px;
+  text-align: left;
+  left: 0;
+  background: #fff;
+  border-radius: 0 0 2px 2px;
+}
+
+.tree-line {
+  .el-tree-node__content {
+    padding-left: 0 !important;
+  }
+
+  .el-tree-node__expand-icon.is-leaf {
+    display: none !important;
+  }
+
+  .el-tree-node {
+    position: relative;
+    padding-left: 16px; // 缩进量
+  }
+
+  .el-tree-node__children {
+    padding-left: 16px; // 缩进量
+  }
+
+  // 竖线
+  .el-tree-node::before {
+    content: "";
+    height: 100%;
+    width: 1px;
+    position: absolute;
+    left: -3px;
+    top: -17px;
+    border-width: 1px;
+    border-left: 1px dashed #52627c;
+  }
+
+  // 当前层最后一个节点的竖线高度固定
+  .el-tree-node:last-child::before {
+    height: 38px; // 可以自己调节到合适数值
+  }
+
+  // 横线
+  .el-tree-node::after {
+    content: "";
+    width: 24px;
+    height: 20px;
+    position: absolute;
+    left: -3px;
+    top: 20px;
+    border-width: 1px;
+    border-top: 1px dashed #52627c;
+  }
+
+  // 去掉最顶层的虚线,放最下面样式才不会被上面的覆盖了
+  & > .el-tree-node::after {
+    border-top: none;
+  }
+
+  & > .el-tree-node::before {
+    border-left: none;
+  }
+
+  // 展开关闭的icon
+  .el-tree-node__expand-icon {
+    font-size: 16px;
+
+    // 叶子节点(无子节点)
+    &.is-leaf {
+      color: transparent;
+      // display: none; // 也可以去掉
+    }
+  }
+}
+
+.ant-alert-info {
+  background-color: #e6f7ff;
+  border: 1px solid #91d5ff;
+}
+
+.ant-alert {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  color: rgb(0, 0, 0);
+  font-size: 14px;
+  font-variant: tabular-nums;
+  line-height: 1.5;
+  list-style: none;
+  font-feature-settings: "tnum";
+  position: relative;
+  padding: 8px 15px 8px 37px;
+  word-wrap: break-word;
+  border-radius: 4px;
+}
+</style>

+ 724 - 0
src/pages/main/itknowledgetop/copyIndex.vue

@@ -0,0 +1,724 @@
+<template>
+
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+            <div class="search">
+                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(1)">添加
+                </el-button>
+            </div>
+            <div class="tabbox">
+                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                    tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                    <el-table-column prop="knowledgeTitle" label="标题">
+                    </el-table-column>
+                    <el-table-column label="发布工号">
+                        <template slot-scope="scope">
+                            <span class="">{{scope.row.opNo}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="发布姓名">
+                        <template slot-scope="scope">
+                            <span>{{$desensitization(scope.row.opName,1)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="pubDeptName" label="发布部门">
+                    </el-table-column>
+                    <el-table-column prop="pubTypeName" label="发布类型">
+                    </el-table-column>
+                    <el-table-column prop="pubTime" label="发布时间">
+                    </el-table-column>
+                    <el-table-column prop="stsDesc" label="状态">
+                    </el-table-column>
+
+                    <el-table-column label="操作" width="160px" align="center">
+                        <template slot-scope="scope">
+                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)">查看</el-button>
+                            <el-button size="mini" v-if="scope.row.sts != 1" type="primary"
+                                @click="dialogCheck(3,scope.row)">修改</el-button>
+                            <el-button size="mini" v-if="scope.row.sts != 1" type="danger" @click="delLine(scope.row)">
+                                删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+
+            <el-dialog :title="titname + '知识'" :visible.sync="dialogStatus" width="50%" :close-on-press-escape="false"
+                :show-close="true" :before-close="closedia" :destroy-on-close="true" :modal-append-to-body="false"
+                :close-on-click-modal="false">
+                <div v-loading="loadinged">
+                    <el-form :model="infolist" style="height: 50vh;overflow-y: scroll;" ref="infolist" :rules="rules">
+                        <div class="info-line">
+                            <el-form-item prop="knowledgeTitle">
+                                <span>标题</span>
+                                <el-input v-model="infolist.knowledgeTitle" placeholder="标题" :disabled="disableStatus">
+                                </el-input>
+                            </el-form-item>
+                            <el-form-item prop="pubType">
+                                <span>发布类型</span>
+                                <el-select :popper-append-to-body="false" v-model="infolist.pubType" placeholder="发布类型"
+                                    clearable :disabled="disableStatus" @change="verifcheck(1)">
+                                    <el-option v-for="item in knowledge.type.options" :key="item.dataCode"
+                                        :label="item.dataName" :value="item.dataCode">
+                                    </el-option>
+                                </el-select>
+                            </el-form-item>
+                        </div>
+
+                        <div v-if="titname == '查看'">
+                            <div class="info-line">
+                                <el-form-item prop="opName">
+                                    <span>发布姓名</span>
+                                    <el-input v-model="infolist.opName" placeholder="发布姓名" disabled="disabled">
+                                    </el-input>
+                                </el-form-item>
+                                <el-form-item prop="opNo">
+                                    <span>发布工号</span>
+                                    <el-input v-model="infolist.opNo" placeholder="发布工号" disabled="disabled"></el-input>
+                                </el-form-item>
+                            </div>
+                            <el-form-item class="info-line online">
+                                <span>发布部门</span>
+                                <el-input v-model="infolist.pubDeptName" placeholder="发布部门" disabled></el-input>
+                            </el-form-item>
+                        </div>
+
+                        <el-form-item prop="visiblec" class="info-line online">
+                            <span>可见部门</span>
+                            <deptTree class="tree" @treeCheck="treeCheck" :defaultList="defaultList" :type="depttype"></deptTree>
+                        </el-form-item>
+
+
+                        <el-form-item class="info-line online" v-if="titname != '新建'">
+                            <span>备注</span>
+                            <el-input disabled v-model="infolist.auditDesc" placeholder="备注" type="textarea" :rows="3">
+                            </el-input>
+                        </el-form-item>
+                        <div style="padding-left: 80px" v-if="!disableStatus">
+                            <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo" :fileList="fileInfo.fileList">
+                            </myUpload>
+                        </div>
+                        <div style="padding:0 20px 10px 100px" v-if="disableStatus">
+                            <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
+                        </div>
+                    </el-form>
+                    <div class="dialog-footer myfooter">
+                        <el-button @click="dialogCli(2)" v-if="disableStatus">确 定</el-button>
+                        <el-button type="primary" @click="dialogCli(1)" v-if="!disableStatus">保 存</el-button>
+                        <el-button type="primary" @click="dialogCli(3)" v-if="!disableStatus">发 布</el-button>
+                        <el-button @click="dialogCli(2)">取 消</el-button>
+                    </div>
+                </div>
+            </el-dialog>
+            <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
+                v-if="centerDialogVisible"></myMessage>
+        </div>
+    </fullscreen>
+
+</template>
+<script>
+    import myUpload from '../../../components/upload'
+    import uploadDown from '../../../components/uploadDown'
+    import mySearch from '../../../components/search'
+    import toolList from '../../../components/toolList'
+    import myMessage from "../../../components/myMessage.vue"
+    import deptTree from "../../../components/deptTree.vue"
+
+    export default {
+        components: {
+            myUpload,
+            uploadDown,
+            mySearch,
+            toolList,
+            myMessage,
+            deptTree
+        },
+        data() {
+            const knowledgeTitle = (rule, value, callback) => {
+                if (!this.infolist.knowledgeTitle) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opName = (rule, value, callback) => {
+                if (!this.infolist.opName) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const pubType = (rule, value, callback) => {
+                if (!this.infolist.pubType) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opNo = (rule, value, callback) => {
+                if (!this.infolist.opNo) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            return {
+                rules: {
+                    opNo: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opNo
+                    }],
+                    pubType: [{
+                        required: true,
+                        trigger: 'change',
+                        validator: pubType
+                    }],
+                    opName: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opName
+                    }],
+                    knowledgeTitle: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: knowledgeTitle
+                    }],
+                },
+                tooltit: '知识库管理',
+                fileInfo: {
+                    limit: 5,
+                    url: '/market/cknowledgeatt/upload',
+                    fileList: []
+                },
+                fullscreen: false,
+                total: 0,
+                pageSize: 1,
+                knowledge: {
+                    type: {
+                        value: '',
+                        options: []
+                    },
+                    startime: null,
+                    endtime: null,
+                },
+                tableData: [],
+                dialogStatus: false,
+                infolist: {},
+                typeOptions: [],
+                titname: '',
+                disableStatus: false,
+                fileList: [],
+                visiblec: [],
+                visibleList: [],
+                attList: [],
+                datalist: {
+                    url: '/market/compatt/downfile',
+                    type: 1
+                },
+                uploadstatus: false,
+                userInfo: {},
+                searchList: [{
+                        type: 'sel',
+                        tit: '发布类型',
+                        value: '',
+                        width: '19%',
+                        options: []
+                    },
+                    {
+                        type: 'input',
+                        tit: '发布标题',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '开始时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '结束时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'input',
+                        tit: '关键字',
+                        value: '',
+                        width: '19%',
+                    },
+                ],
+                params: {},
+                centerDialogVisible: false,
+                messTit: '',
+                delid: '',
+                loading: false,
+                loadinged: false,
+                treeList: [],
+                defaultList:[],
+                depttype:0,
+            }
+        },
+        methods: {
+            treeCheck(v){
+                this.treeList = v;
+            },
+            closedia() {
+                this.infolist = {};
+                this.dialogStatus = false;
+                this.fileInfo.fileList = [];
+                this.defaultList = [];
+                this.depttype = 0;
+            },
+            uploadBack(v) {
+                this.attList = v;
+            },
+            //搜索数据
+            searchInfo(v) {
+                this.params = {};
+                v[0] ? this.params.pubType = v[0] : '';
+                v[1] ? this.params.knowledgeTitle = v[1] : '';
+                v[2] ? this.params.opTimeFrom = this.$formatDate(v[2], "YYYY-MM-DD") : '';
+                v[3] ? this.params.opTimeTo = this.$formatDate(v[3], "YYYY-MM-DD") : '';
+                if (v[4]) {
+                    this.params = {};
+                    this.params.keyWord = v[4]
+                }
+                this.getList(this.params, this.pageSize);
+            },
+            //获取列表
+            getList(v, n) {
+                this.pageSize = n;
+                let _this = this;
+                this.loading = true;
+                this.tableData = [];
+                this.$http({
+                    url: "/market/cknowledge/queryListByPubDept",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                    },
+                    data: v,
+                }).then((res) => {
+                    this.tableData = res.data.data;
+                    this.total = res.data.totalRecord;
+                    this.loading = false;
+                });
+            },
+            //获取部门
+            getDepot() {
+                this.$http({
+                    url: "/sysmgr/sysdept/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {},
+                }).then((res) => {
+                    this.typeOptions = res.data;
+                });
+            },
+            //字典类型
+            getListype(v) {
+                this.$http({
+                    url: "/market/mkKnowledgePubMsgType/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        dictCode: 'pubType'
+                    },
+                }).then((res) => {
+                    let listopt = [];
+                    res.data.forEach(item => {
+                        listopt.push({
+                            dataCode: item.id,
+                            dataName: item.pubType,
+                        })
+                    })
+                    this.searchList[0].options = listopt;
+                    this.knowledge.type.options = listopt;
+                });
+            },
+            //功能栏
+            iconCli(v) {
+                if (v === 1) {
+                    this.getList(this.params, this.pageSize);
+                }
+                if (v === 2) {
+                    this.fullscreen = !this.fullscreen
+                }
+            },
+            // 分页
+            currchange(v) {
+                this.pageSize = v;
+                this.getList(this.params, this.pageSize);
+            },
+            //查看 修改 新增
+            dialogCheck(v, n) {
+                this.dialogStatus = true;
+                this.disableStatus = false;
+                this.visiblec = [];
+                this.defaultList = [];
+                this.infolist = {};
+                if (v === 1) {
+                    this.titname = '新建';
+                    this.infolist = {};
+                    this.defaultList = [];
+                    this.depttype = 0;
+                    this.getUser();
+                    return
+                } else if (v === 2) {
+                    this.titname = '查看';
+                    this.disableStatus = true;
+                } else if (v === 3) {
+                    this.titname = '修改';
+                    this.loadinged = true;
+                }
+                this.$http({
+                    url: "/market/cknowledge/queryInfo",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        id: n.id
+                    },
+                }).then((res) => {
+                    res.data.opName = this.$desensitization(res.data.opName,1);
+                    this.datalist.attList = res.data.attList;
+                    this.uploadstatus = true;
+                    this.infolist = res.data;
+                    this.fileInfo.fileList = [];
+                    this.attList = [];
+                    this.treeList = this.infolist.visibleList;
+                    res.data.attList.forEach(item => {
+                        this.fileInfo.fileList.push({
+                            name: item.fileName,
+                            url: '',
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName: item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime,
+                        });
+                        this.attList.push({
+                            name: item.fileName,
+                            url: '',
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName: item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime,
+                        });
+                    })
+                    res.data.visibleList.forEach(item => {
+                        this.defaultList.push(item.deptId);
+                    })
+                    this.depttype = 2;
+                    this.loadinged = false;
+                });
+            },
+            //添加 修改
+            dialogCli(v) {
+                this.uploadstatus = false;
+                this.datalist.attList = [];
+                this.fileInfo.fileList = [];
+                if (v === 2) {
+                    this.getUser();
+                    this.dialogStatus = false;
+                    this.defaultList = [];
+                    this.depttype = 0;
+                    return
+                }
+                this.infolist.pubTime = this.$formatDate(new Date(), "YYYY-MM-DD");
+                if (this.titname === '新建') {
+                    this.submitInfo("/market/cknowledge/save", v);
+                } else if (this.titname === '修改') {
+                    this.submitInfo("/market/cknowledge/update", v);
+                }
+            },
+            submitInfo(u, v) {
+                let _this = this;
+                this.$refs.infolist.validate(valid => {
+                    if (valid) {
+                        this.infolist.sts = "0";
+                        this.infolist.stsDesc = "草稿";
+                        this.infolist.opNo = this.userInfo.loginNo;
+                        this.infolist.opName = this.userInfo.loginName;
+                        this.infolist.contactPhone = this.userInfo.phoneNo;
+                        if (v === 3) {
+                            this.infolist.sts = "2";
+                            this.infolist.stsDesc = "待审核";
+                        }
+                        let attList = [];
+                        for (let i = 0; i < this.attList.length; i++) {
+                            attList.push({
+                                id: this.attList[i].id,
+                                fileCode: this.attList[i].fileCode,
+                                fileName: this.attList[i].fileName,
+                                opName: this.attList[i].opName,
+                                opNo: this.attList[i].opNo,
+                                opTime: this.attList[i].opTime,
+                            });
+                        }
+                        this.loadinged = true;
+                        this.$http({
+                            url: u,
+                            method: "post",
+                            headers: {
+                                "Content-Type": "application/json",
+                            },
+                            data: {
+                                knowledge: this.infolist,
+                                attList: attList,
+                                visibleList: this.treeList
+                            },
+                        }).then((res) => {
+                            this.loadinged = false;
+                            if (res.data.result === 1) {
+                                _this.$message({
+                                    message: res.data.desc,
+                                    type: 'error'
+                                });
+                            } else {
+                                _this.$message({
+                                    message: '成功',
+                                    type: 'success'
+                                });
+                                _this.fileInfo.fileList = [];
+                                _this.infolist = {};
+                                _this.dialogStatus = false;
+                                _this.getList(_this.params, _this.pageSize);
+                                _this.defaultList = [];
+                                _this.depttype = 0;
+                            }
+                        })
+                    }
+                })
+            },
+            //处理所需数据
+            verifcheck(v) {
+                if (v === 1) {
+                    for (let i = 0; i < this.knowledge.type.options.length; i++) {
+                        if (this.knowledge.type.options[i].dataCode == this.infolist.pubType) {
+                            this.infolist.pubTypeName = this.knowledge.type.options[i].dataName
+                        }
+                    }
+                }
+            },
+            closeMessage(v) {
+                this.centerDialogVisible = false;
+                let _this = this;
+                if (v === 1) {
+                    this.$http({
+                        url: "/market/cknowledge/queryInfo",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: {
+                            id: this.delid
+                        },
+                    }).then((res) => {
+                        let attList = [];
+                        for (let i = 0; i < res.data.attList.length; i++) {
+                            attList.push({
+                                id: res.data.attList[i].id
+                            })
+                        }
+                        _this.$http({
+                            url: "/market/cknowledge/delete",
+                            method: "post",
+                            headers: {
+                                "Content-Type": "application/json",
+                            },
+                            data: {
+                                knowledge: {
+                                    id: this.delid
+                                },
+                                attList: attList,
+                                visibleList: res.data.visibleList
+                            }
+                        }).then((res) => {
+                            if (res.data.result === 1) {
+                                _this.$message({
+                                    message: res.data.desc,
+                                    type: 'error'
+                                });
+                            } else {
+                                _this.$message({
+                                    message: '删除成功',
+                                    type: 'success'
+                                });
+                                _this.getList(this.params, this.pageSize);
+                            }
+                        });
+                    });
+                }
+            },
+            //删除
+            delLine(v) {
+                this.centerDialogVisible = true;
+                this.messTit = '即将删除此条数据, 是否删除?';
+                this.delid = v.id;
+            },
+            getUser() {
+                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+                this.infolist = {};
+                this.infolist.opNo = this.userInfo.loginNo;
+                // this.infolist.pubDeptId = this.userInfo.group;
+                // this.infolist.pubDeptName = this.userInfo.groupName;
+                this.infolist.opName = this.userInfo.loginName;
+                this.infolist.contactPhone = this.userInfo.phoneNo;
+            },
+        },
+        mounted() {
+            this.getList(this.params, this.pageSize);
+            this.getDepot();
+            this.getListype();
+            this.getUser();
+        },
+        created() {
+
+        }
+    }
+</script>
+<style scoped lang="scss">
+    @import "../../../assets/style";
+
+    .iconfont {
+        font-size: 42px;
+    }
+
+    .icon-excel {
+        color: #67DB63;
+    }
+
+    .icon-word {
+        color: #FF654E;
+    }
+
+    .icon-ppt {
+        color: #FF8943;
+    }
+
+    .icon-wenjian {
+        color: #ccc;
+    }
+
+    .el-icon-picture {
+        font-size: 36px;
+        color: #ccc;
+        background: #fff;
+        padding: 4px 2px;
+        margin-bottom: 2px;
+    }
+
+    .back-box {
+        margin-top: 20px;
+        background: #F2F2F2;
+        padding: 20px;
+
+        div {
+            display: inline-block;
+            text-align: center;
+            margin-right: 20px;
+            cursor: pointer;
+
+            span {
+                display: block;
+                width: 80px;
+                overflow: hidden;
+                padding-top: 10px;
+                margin: 0 10px;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                display: -webkit-box;
+                /* 将对象作为弹性伸缩盒子模型显示 */
+                -webkit-line-clamp: 1;
+                /* 控制最多显示几行 */
+                -webkit-box-orient: vertical;
+                /* 设置或检索伸缩盒对象的子元素的排列方式 */
+            }
+        }
+    }
+
+    .titbox {
+        div {
+            float: right;
+
+            i {
+                font-size: 22px;
+                margin-left: 20px;
+                cursor: pointer;
+            }
+        }
+    }
+
+    .tabbox {
+        margin-top: 15px;
+    }
+
+    .pageBox {
+        text-align: right;
+        margin-top: 10px;
+    }
+
+    .info-line {
+        width: 100%;
+        display: block;
+        padding-left: 20px;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+        .tree{
+            width: calc(100% - 100px);
+        }
+    }
+
+    .online {
+        width: 100%;
+
+        .el-select {
+            width: calc(100% - 100px);
+        }
+
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+</style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 2 - 0
src/pages/main/itknowledgetop/data.js


+ 193 - 0
src/pages/main/itknowledgetop/index.vue

@@ -0,0 +1,193 @@
+<template>
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <h2 style="margin-top: 20px;">IT知识库</h2>
+            <div class="adv-type">
+                <div
+                    class="wfour"
+                    @click="jumpinfo('/itknowledgeManagement', '知识库管理')"
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识库管理</span>
+                </div>
+                <!-- <div
+                    class="wfour"
+                    @click="jumpinfo('/knowledgeExaminetop', '知识库审核')"
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识库审核</span>
+                </div> -->
+                <div
+                    class="wfour"
+                    @click="jumpinfo('/itknowledgeTypetop', '知识类型管理')"
+                    v-if="lockFlag == 'add'"
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识类型管理</span>
+                </div>
+                <div
+                    class="wfour"
+                    @click="
+                        jumpinfo('/itknowledgeCatalogtop', '知识库目录管理')
+                    "
+                    v-if="lockFlag == 'add'"
+                >
+                    <span><i class="el-icon-folder-opened"></i></span>
+                    <span>知识库目录管理</span>
+                </div>
+            </div>
+        </div>
+    </fullscreen>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import myMessage from "../../../components/myMessage.vue";
+import toolList from "../../../components/toolList";
+import myUpload from "../../../components/upload";
+
+export default {
+    components: {
+        mySearch,
+        myMessage,
+        toolList,
+        myUpload
+    },
+    data() {
+        return {
+            fullscreen: false,
+            lockFlag: "see",
+            province: true
+        };
+    },
+    methods: {
+        jumpinfop(p, v, n) {
+            this.$router.push({
+                path: p,
+                query: {
+                    type: v
+                }
+            });
+            this.setabList(n, p + "?type=" + v);
+        },
+        jumpinfo(p, n) {
+            this.$router.push({
+                path: p
+            });
+            this.setabList(n, p);
+        },
+        setabList(n, p) {
+            let params = {
+                children: "",
+                name: n,
+                rountPath: p,
+                target: "_self"
+            };
+            for (let i = 0; i < this.$store.state.tabList.length; i++) {
+                if (this.$store.state.tabList[i].name === params.name) {
+                    this.$store.state.tabList[i] = params;
+                }
+            }
+            let set = new Set([...this.$store.state.tabList, params]);
+            set.add(params);
+            this.$store.commit("setDefaultActive", params.rountPath);
+            this.$store.commit("setTabList", Array.from(set));
+        },
+         getRole(){
+            this.$http({
+                url:"/market/mkNewknowledge/queryRole",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {}
+            }).then(res => {
+                console.log("vue"+res.data);
+                if(res.data == "1"){
+                    this.lockFlag = 'add';//管理员
+                }else{
+                    this.lockFlag = 'updata';//普通员工
+                }
+            });
+        },
+        // getUser() {
+        //     this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+        //     let Menus = JSON.parse(window.sessionStorage.childrenMenus);
+        //     for (let i = 0; i < Menus.length; i++) {
+        //         if (
+        //             Menus[i].systemflag == 1 &&
+        //             Menus[i].jspUrl == "/publicityAccount"
+        //         ) {
+        //             this.lockFlag = "add"; //省级
+        //         }
+        //         if (
+        //             Menus[i].systemflag == 1 &&
+        //             Menus[i].jspUrl == "/publicity"
+        //         ) {
+        //             this.lockFlag = "updata"; //管理员
+        //             i = Menus.length;
+        //         }
+        //     }
+        //     for (let i = 0; i < Menus.length; i++) {
+        //         if (
+        //             Menus[i].systemflag == 1 &&
+        //             Menus[i].jspUrl == "/province"
+        //         ) {
+        //             this.province = true; //省公司
+        //         }
+        //     }
+        // }
+    },
+    mounted() {
+        this.getRole();
+        // this.getUser();
+    },
+    created() {}
+};
+</script>
+<style scoped lang="scss">
+.container-box {
+    height: calc(100vh - 200px);
+    overflow-y: scroll;
+    padding-bottom: 20px;
+}
+.adv-type {
+    margin-top: 20px;
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    // border: 1px solid #ddd;
+    border-radius: 5px;
+    padding: 20px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    div {
+        width: 33%;
+        text-align: center;
+        height: 80px;
+        overflow: hidden;
+        min-width: 100px;
+        cursor: pointer;
+        padding-top: 10px;
+        margin: 10px 0;
+    }
+    div:hover {
+        background: #cfe8fc;
+        border-radius: 5px;
+    }
+    span {
+        width: 100%;
+        display: inline-block;
+        height: 40px;
+        // line-height: 40px;
+        i {
+            color: #0074d9;
+            font-size: 36px;
+        }
+    }
+    .wfour {
+        width: 25%;
+    }
+    .wfive {
+        width: 20%;
+    }
+}
+</style>

+ 566 - 0
src/pages/main/itknowledgetop/knowledgeExamine.vue

@@ -0,0 +1,566 @@
+<template>
+
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+
+        <div class="container-box">
+            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+            <div class="search">
+                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+            </div>
+            <div class="tabbox">
+                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                    tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                    <el-table-column prop="knowledgeTitle" label="标题">
+                    </el-table-column>
+                    <el-table-column label="发布工号">
+                        <template slot-scope="scope">
+                            <span class="">{{scope.row.opNo}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column label="发布姓名">
+                        <template slot-scope="scope">
+                            <span>{{$desensitization(scope.row.opName,1)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="pubDeptName" label="发布部门">
+                    </el-table-column>
+                    <el-table-column prop="pubTypeName" label="发布类型">
+                    </el-table-column>
+                    <el-table-column prop="pubTime" label="发布时间">
+                    </el-table-column>
+                    <el-table-column prop="stsDesc" label="状态">
+                    </el-table-column>
+
+                    <el-table-column label="操作" width="100px" align="center">
+                        <template slot-scope="scope">
+                            <el-button size="mini" v-if="scope.row.sts == 2" :disabled="!btnctrlStatus" type="danger"
+                                @click="dialogCheck(scope.row)">审核</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+
+            <el-dialog title="审核知识" :visible.sync="dialogStatus" width="50%" :close-on-press-escape="false"
+                :show-close="true" :before-close="closedia" :destroy-on-close="true" :modal-append-to-body="false"
+                :close-on-click-modal="false">
+                <div v-loading="loadinged">
+                    <el-form style="height: 50vh;overflow-y: scroll;" :model="infolist" ref="infolist" :rules="rules">
+                        <div class="info-line">
+                            <el-form-item>
+                                <span>标题</span>
+                                <el-input v-model="infolist.knowledgeTitle" disabled></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>发布类型</span>
+                                <el-input v-model="infolist.pubTypeName" disabled></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>发布姓名</span>
+                                <el-input v-model="infolist.opName" disabled></el-input>
+                            </el-form-item>
+                            <el-form-item>
+                                <span>发布工号</span>
+                                <el-input v-model="infolist.opNo" disabled></el-input>
+                            </el-form-item>
+                        </div>
+                        <el-form-item class="info-line online">
+                            <span>发布部门</span>
+                            <el-input v-model="infolist.pubDeptName" disabled></el-input>
+                        </el-form-item>
+                        <el-form-item class="info-line online">
+                            <span>可见部门</span>
+                            <deptTree class="tree" @treeCheck="treeCheck" :defaultList="defaultList" :type="depttype"></deptTree>
+                        </el-form-item>
+                        <el-form-item class="info-line online">
+                            <span>备注</span>
+                            <el-input v-model="infolist.auditDesc" placeholder="备注" type="textarea" :rows="3">
+                            </el-input>
+                        </el-form-item>
+                        <div style="padding:0 20px 10px 100px">
+                            <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
+                        </div>
+                    </el-form>
+                    <div class="dialog-footer myfooter">
+                        <el-button type="primary" @click="dialogCli(1)">通 过</el-button>
+                        <el-button type="primary" @click="dialogCli(3)">打 回</el-button>
+                        <el-button @click="dialogCli(2)">取 消</el-button>
+                    </div>
+                </div>
+            </el-dialog>
+        </div>
+    </fullscreen>
+
+</template>
+<script>
+    import myUpload from '../../../components/upload'
+    import uploadDown from '../../../components/uploadDown'
+    import mySearch from '../../../components/search'
+    import toolList from '../../../components/toolList'
+    import deptTree from '../../../components/deptTree.vue'
+
+    export default {
+        components: {
+            myUpload,
+            uploadDown,
+            mySearch,
+            toolList,
+            deptTree
+        },
+        data() {
+            const knowledgeTitle = (rule, value, callback) => {
+                if (!this.infolist.knowledgeTitle) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opName = (rule, value, callback) => {
+                if (!this.infolist.opName) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const pubType = (rule, value, callback) => {
+                if (!this.infolist.pubType) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            const opNo = (rule, value, callback) => {
+                if (!this.infolist.opNo) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            return {
+                rules: {
+                    opNo: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opNo
+                    }],
+                    pubType: [{
+                        required: true,
+                        trigger: 'change',
+                        validator: pubType
+                    }],
+                    opName: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: opName
+                    }],
+                    knowledgeTitle: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: knowledgeTitle
+                    }],
+                },
+                tooltit: '知识库审核',
+                fileInfo: {
+                    limit: 5,
+                    url: '/market/cknowledgenetatt/upload',
+                    fileList: []
+                },
+                fullscreen: false,
+                total: 0,
+                pageSize: 1,
+                knowledge: {
+                    type: {
+                        value: '',
+                        options: []
+                    },
+                    startime: null,
+                    endtime: null,
+                },
+                tableData: [],
+                dialogStatus: false,
+                infolist: {},
+                titname: '',
+                disableStatus: false,
+                fileList: [],
+                visiblec: '',
+                visibleList: [],
+                attList: [],
+                datalist: {
+                    url: '/market/compatt/downfile',
+                    type: 1
+                },
+                uploadstatus: false,
+                userInfo: {},
+                searchList: [{
+                        type: 'sel',
+                        tit: '发布类型',
+                        value: '',
+                        width: '19%',
+                        options: []
+                    },
+                    {
+                        type: 'input',
+                        tit: '发布标题',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '开始时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'date',
+                        tit: '结束时间',
+                        value: '',
+                        width: '19%',
+                    },
+                    {
+                        type: 'input',
+                        tit: '关键字',
+                        value: '',
+                        width: '19%',
+                    },
+                ],
+                params: {},
+                centerDialogVisible: false,
+                messTit: '',
+                delid: '',
+                loading: false,
+                loadinged: false,
+                btnctrlStatus: false,
+                treeList: [],
+                defaultList:[],
+                depttype:0,
+            }
+        },
+        methods: {
+            treeCheck(v){
+                this.treeList = v;
+            },
+            closedia() {
+                this.infolist = {};
+                this.dialogStatus = false;
+                this.fileInfo.fileList = [];
+                this.defaultList = [];
+                this.depttype = 0;
+            },
+            //搜索数据
+            searchInfo(v) {
+                this.params = {};
+                v[0] ? this.params.pubType = v[0] : '';
+                v[1] ? this.params.knowledgeTitle = v[1] : '';
+                v[2] ? this.params.opTimeFrom = this.$formatDate(v[2], "YYYY-MM-DD") : '';
+                v[3] ? this.params.opTimeTo = this.$formatDate(v[3], "YYYY-MM-DD") : '';
+                if (v[4]) {
+                    this.params = {};
+                    this.params.keyWord = v[4]
+                }
+                this.getList(this.params, this.pageSize);
+            },
+            //获取列表
+            getList(v, n) {
+                this.pageSize = n;
+                let _this = this;
+                this.loading = true;
+                this.tableData = [];
+                this.$http({
+                    url: "/market/cknowledgenet/queryChkPage",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                    },
+                    data: v,
+                }).then((res) => {
+                    this.tableData = res.data.data;
+                    this.total = res.data.totalRecord;
+                    this.loading = false;
+                });
+            },
+            //字典
+            getListype(v) {
+                this.$http({
+                    url: "/market/mkKnowledgePubMsgTypeNet/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        dictCode: 'pubType'
+                    },
+                }).then((res) => {
+                    let listopt = [];
+                    res.data.forEach(item => {
+                        listopt.push({
+                            dataCode: item.id,
+                            dataName: item.pubType,
+                        })
+                    })
+                    this.searchList[0].options = listopt;
+                    this.knowledge.type.options = listopt;
+                });
+            },
+            //功能栏
+            iconCli(v) {
+                if (v === 1) {
+                    this.getList(this.params, this.pageSize);
+                }
+                if (v === 2) {
+                    this.fullscreen = !this.fullscreen
+                }
+            },
+            // 分页
+            currchange(v) {
+                this.pageSize = v;
+                this.getList(this.params, this.pageSize);
+            },
+            //查看 修改 新增
+            dialogCheck(v) {
+                this.dialogStatus = true;
+                this.visiblec = '';
+                this.infolist = {};
+                this.$http({
+                    url: "/market/cknowledgenet/queryInfo",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        id: v.id
+                    },
+                }).then((res) => {
+                    res.data.opName = this.$desensitization(res.data.opName,1);
+                    this.datalist.attList = res.data.attList;
+                    this.uploadstatus = true;
+                    this.infolist = res.data;
+                    this.fileInfo.fileList = [];
+                    this.attList = this.infolist.attList;
+                    this.treeList = this.infolist.visibleList;
+                    this.defaultList = [];
+                    res.data.attList.forEach(item => {
+                        this.fileInfo.fileList.push({
+                            name: item.fileName,
+                            url: '',
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName: item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime,
+                        });
+                    })
+                    res.data.visibleList.forEach(item => {
+                        this.defaultList.push(item.deptId);
+                    })
+                    this.depttype = 2;
+                    this.loadinged = false;
+                });
+            },
+            //添加 修改
+            dialogCli(v) {
+                this.uploadstatus = false;
+                this.datalist.attList = [];
+                this.fileInfo.fileList = [];
+                if (v === 2) {
+                    this.getUser();
+                    this.dialogStatus = false;
+                    this.defaultList = [];
+                    this.depttype = 0;
+                    return
+                }
+                this.infolist.sts = v;
+                v == 1 ? this.infolist.stsDesc = "通过" : this.infolist.stsDesc = "打回";
+                this.infolist.auditNo = this.userInfo.loginNo;
+                this.infolist.auditName = this.userInfo.loginName;
+                this.infolist.auditTime = this.$formatDate(new Date(), "YYYY-MM-DD");
+                this.submitInfo("/market/cknowledgenet/update", v);
+            },
+            submitInfo(u, v) {
+                let _this = this;
+                this.loadinged = true;
+                this.$http({
+                    url: u,
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        knowledge: this.infolist,
+                        attList: this.attList,
+                        visibleList: this.treeList
+                    },
+                }).then((res) => {
+                    this.loadinged = false;
+                    if (res.data.result === 1) {
+                        _this.$message({
+                            message: res.data.desc,
+                            type: 'error'
+                        });
+                    } else {
+                        _this.$message({
+                            message: '成功',
+                            type: 'success'
+                        });
+                        _this.fileInfo.fileList = [];
+                        _this.infolist = {};
+                        _this.dialogStatus = false;
+                        _this.getList(_this.params, _this.pageSize);
+                        _this.defaultList = [];
+                        _this.depttype = 0;
+                    }
+                })
+            },
+            ctrlbtn() {
+                let v = JSON.parse(window.sessionStorage.childrenMenus);
+                for (let i = 0; i < v.length; i++) {
+                    if (v[i].jspUrl == this.$route.path && v[i].systemflag == '1') {
+                        this.btnctrlStatus = true;
+                        return
+                    }
+                }
+            },
+            getUser() {
+                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+            }
+        },
+        mounted() {
+            this.getList(this.params, this.pageSize);
+            this.getListype();
+            this.ctrlbtn();
+        },
+        created() {
+
+        }
+    }
+</script>
+<style scoped lang="scss">
+    @import "../../../assets/style";
+
+    .iconfont {
+        font-size: 42px;
+    }
+
+    .icon-excel {
+        color: #67DB63;
+    }
+
+    .icon-word {
+        color: #FF654E;
+    }
+
+    .icon-ppt {
+        color: #FF8943;
+    }
+
+    .icon-wenjian {
+        color: #ccc;
+    }
+
+    .el-icon-picture {
+        font-size: 36px;
+        color: #ccc;
+        background: #fff;
+        padding: 4px 2px;
+        margin-bottom: 2px;
+    }
+
+    .back-box {
+        margin-top: 20px;
+        background: #F2F2F2;
+        padding: 20px;
+
+        div {
+            display: inline-block;
+            text-align: center;
+            margin-right: 20px;
+            cursor: pointer;
+
+            span {
+                display: block;
+                width: 80px;
+                overflow: hidden;
+                padding-top: 10px;
+                margin: 0 10px;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                display: -webkit-box;
+                /* 将对象作为弹性伸缩盒子模型显示 */
+                -webkit-line-clamp: 1;
+                /* 控制最多显示几行 */
+                -webkit-box-orient: vertical;
+                /* 设置或检索伸缩盒对象的子元素的排列方式 */
+            }
+        }
+    }
+
+    .titbox {
+        div {
+            float: right;
+
+            i {
+                font-size: 22px;
+                margin-left: 20px;
+                cursor: pointer;
+            }
+        }
+    }
+
+    .tabbox {
+        margin-top: 15px;
+    }
+
+    .pageBox {
+        text-align: right;
+        margin-top: 10px;
+    }
+
+    .info-line {
+        width: 100%;
+        display: block;
+        padding-left: 20px;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+        .tree{
+            width: calc(100% - 100px);
+        }
+    }
+
+    .online {
+        width: 100%;
+
+        .el-select {
+            width: calc(100% - 100px);
+        }
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+</style>

+ 987 - 0
src/pages/main/itknowledgetop/knowledgeManagement.vue

@@ -0,0 +1,987 @@
+<template>
+  <fullscreen :fullscreen.sync="fullscreen" class="container">
+    <div class="container-box">
+      <toolList @iconCli="iconCli" :tooltit="tooltit"></toolList>
+      <el-row :gutter="20" style="height: 100%">
+        <el-col :span="4" style="height: 100%">
+          <el-input
+            style="margin-top: 20px"
+            placeholder="输入关键字进行过滤"
+            v-model="filterText"
+          >
+          </el-input>
+          <div class="choice-style">
+            <div class="ant-alert-info ant-alert">
+              <i style="color: #1890ff" class="el-icon-warning"></i>当前选择:{{
+                actionName || "无"
+              }}
+              <div class="canel-style" @click="canelChoice" v-show="actionName">
+                取消选择
+              </div>
+            </div>
+          </div>
+          <div class="tree-box">
+            <el-tree
+              class="filter-tree"
+              :data="treeData"
+              node-key="id"
+              :props="defaultProps"
+              default-expand-all
+              :filter-node-method="filterNode"
+              @node-click="checkNode"
+              ref="tree"
+            ><span class="custom-tree-node" slot-scope="{ node }">
+              <span>
+                <span style="color: #009cff" class="iconfont icon-wenjianjia"></span>
+                <!-- <span
+                  v-if="
+                    node.data.hasOwnProperty('children') &&
+                    node.data.children.length > 0
+                  "
+                  style="color: #009cff"
+                  class="iconfont icon-wenjianjia"
+                ></span> -->
+                <!-- <span
+                  v-else
+                  style="color: #fdb441"
+                  class="iconfont icon-wenjian"
+                ></span> -->
+                <span
+                  :style="
+                    node.data.hasOwnProperty('parent')
+                      ? 'font-size:14px;padding-left:5px'
+                      : 'font-size:12px;padding-left:5px'
+                  "
+                  >{{ node.data.title }}</span
+                >
+              </span>
+            </span>
+            </el-tree>
+          </div>
+        </el-col>
+        <el-col :span="20" style="height: 100%">
+          <div class="search">
+            <mySearch
+              :searchList="searchList"
+              @searchInfo="searchInfo"
+            ></mySearch>
+            <el-button
+              class="btn-check"
+              size="medium"
+              type="primary"
+              @click="dialogCheck(1)"
+              >添加
+            </el-button>
+          </div>
+          <div class="tabbox">
+            <el-table
+              height="calc(100% - 40px)"
+              class="com-table"
+              ref="multipleTable"
+              :data="tableData"
+              tooltip-effect="dark"
+              size="small"
+              border
+              style="width: 100%"
+              v-loading="loading"
+              @sort-change="sortChange"
+            >
+              <el-table-column prop="title" show-overflow-tooltip label="标题">
+              </el-table-column>
+              <el-table-column label="发布工号">
+                <template slot-scope="scope">
+                  <span class="">{{ scope.row.handlerId }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column label="发布姓名">
+                <template slot-scope="scope">
+                  <span>{{ $desensitization(scope.row.handler, 1) }}</span>
+                </template>
+              </el-table-column>
+              <el-table-column
+                prop="orgName"
+                show-overflow-tooltip
+                label="发布部门"
+              >
+              </el-table-column>
+              <el-table-column prop="typeName" label="发布类型">
+              </el-table-column>
+              <el-table-column
+                prop="catalogName"
+                show-overflow-tooltip
+                label="归属目录"
+              >
+              </el-table-column>
+              <el-table-column
+                prop="createTime"
+                show-overflow-tooltip
+                label="发布时间"
+                width="140"
+              >
+              </el-table-column>
+              <!-- <el-table-column prop="stsDesc" label="状态"> </el-table-column> -->
+              <el-table-column
+                prop="hits"
+                width="90"
+                label="点击量"
+                sortable="custom"
+              >
+              </el-table-column>
+              <el-table-column label="操作" width="250px" align="center">
+                <template slot-scope="scope">
+                  <el-button
+                    size="mini"
+                    type="success"
+                    @click="collectionHandle(scope.row)"
+                    plain
+                    >{{
+                      scope.row.collection == "0" ? "点击收藏" : "取消收藏"
+                    }}</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    type="primary"
+                    plain
+                    @click="dialogCheck(2, scope.row)"
+                    >查看</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    v-if="scope.row.sts != 1"
+                    type="primary"
+                    plain
+                    @click="dialogCheck(3, scope.row)"
+                    >修改</el-button
+                  >
+                  <el-button
+                    size="mini"
+                    v-if="scope.row.sts != 1"
+                    type="danger"
+                    plain
+                    @click="delLine(scope.row)"
+                  >
+                    删除</el-button
+                  >
+                </template>
+              </el-table-column>
+            </el-table>
+            <el-pagination
+              class="pageBox"
+              @current-change="currchange"
+              layout="prev, pager, next"
+              background
+              :total="total"
+            >
+            </el-pagination></div
+        ></el-col>
+      </el-row>
+
+      <el-dialog
+        :title="titname + '知识'"
+        :visible.sync="dialogStatus"
+        width="50%"
+        :close-on-press-escape="false"
+        :show-close="true"
+        :fullscreen="fullscreen"
+        :before-close="closedia"
+        :destroy-on-close="true"
+        :modal-append-to-body="false"
+        :close-on-click-modal="false"
+      >
+        <div slot="title">
+          <div>
+            {{ titname + "知识"
+            }}<i
+              class="el-icon-full-screen"
+              style="float: right; margin-right: 30px"
+              @click="
+                () => {
+                  fullscreen = !fullscreen;
+                }
+              "
+            ></i>
+          </div>
+        </div>
+        <div v-loading="loadinged">
+          <el-form
+            v-if="titname != '查看'"
+            :model="infolist"
+            :style="fullscreen ? '' : 'height: 50vh; overflow-y: scroll'"
+            ref="infolist"
+            :rules="rules"
+          >
+            <div class="info-line">
+              <el-form-item prop="title">
+                <span>标题</span>
+                <el-input v-model="infolist.title" placeholder="标题">
+                </el-input>
+              </el-form-item>
+              <el-form-item prop="type">
+                <span>发布类型</span>
+                <el-select
+                  :popper-append-to-body="false"
+                  v-model="infolist.type"
+                  placeholder="发布类型"
+                  clearable
+                  @change="verifcheck(1)"
+                >
+                  <el-option
+                    v-for="item in knowledge.type.options"
+                    :key="item.dataCode"
+                    :label="item.dataName"
+                    :value="item.dataCode"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </div>
+            <el-form-item prop="catalogName" class="info-line online">
+              <span>目录</span>
+              <div class="treebox">
+                <el-select
+                  v-model="infolist.catalogName"
+                  placeholder="请选择报表路径"
+                  ref="selectReport"
+                >
+                  <el-option
+                    style="height:auto;background-color:#fff"
+                    :value="infolist.catalogName"
+                    :label="infolist.catalogName"
+                  >
+                    <el-tree
+                      :data="treeData"
+                      :props="defaultProps"
+                      @node-click="nodeClick"
+                    ></el-tree>
+                  </el-option>
+                </el-select>
+              </div>
+              <!-- <div class="treebox tree">
+                <p style="padding-left: 10px">
+                  当前选择: <span>{{ infolist.catalogName }}</span>
+                </p>
+                <el-tree
+                  class="tree"
+                  :data="treeData"
+                  node-key="id"
+                  :props="defaultProps"
+                  @node-click="nodeClick"
+                ></el-tree>
+              </div> -->
+            </el-form-item>
+            <el-form-item class="info-line online" prop="text">
+              <span>内容</span>
+              <p-editor-tiny
+                imgType="upload"
+                v-model="infolist.text"
+              ></p-editor-tiny>
+            </el-form-item>
+            <div style="padding-left: 80px">
+              <myUpload
+                @uploadBack="uploadBack"
+                :fileInfo="fileInfo"
+                :fileList="fileInfo.fileList"
+              >
+              </myUpload>
+            </div>
+          </el-form>
+          <div v-loading="loadinged" v-else>
+            <h3 style="text-align: center; margin: 10px 0">
+              {{ infolist.title }}
+            </h3>
+            <div style="font-size: 12px; color: grey; margin: 10px 0">
+              发布时间:{{ infolist.createTime || "暂无" }} 发布人:{{
+                infolist.handler || "暂无"
+              }}
+            </div>
+            <div v-html="infolist.text"></div>
+            <div style="margin: 10px 0">
+              附件:
+              <uploadDown
+                :datalist="datalist"
+                :dialogStatus="uploadstatus"
+              ></uploadDown>
+            </div>
+          </div>
+          <div class="dialog-footer myfooter">
+            <el-button
+              type="primary"
+              v-if="titname != '查看'"
+              @click="dialogCli(1)"
+              >保 存</el-button
+            >
+            <el-button @click="dialogCli(2)">取 消</el-button>
+          </div>
+        </div>
+      </el-dialog>
+      <myMessage
+        :messTit="messTit"
+        @closeMessage="closeMessage"
+        :centerDialogVisible="centerDialogVisible"
+        v-if="centerDialogVisible"
+      ></myMessage>
+    </div>
+  </fullscreen>
+</template>
+<script>
+import myUpload from "../../../components/upload";
+import uploadDown from "../../../components/uploadDown";
+import mySearch from "../../../components/search";
+import toolList from "../../../components/toolList";
+import myMessage from "../../../components/myMessage.vue";
+export default {
+  components: {
+    myMessage,
+    myUpload,
+    uploadDown,
+    mySearch,
+    toolList,
+    PEditorTiny: () =>
+      import(
+        /* webpackChunkName: "peditor-tiny" */ "../../../components/p-editor-tiny"
+      ),
+  },
+  data() {
+    const catalogName = (rule, value, callback) => {
+      if (!this.infolist.catalogName) {
+        callback(new Error("不能为空"));
+      } else {
+        callback();
+      }
+    };
+    return {
+      actionName: "",
+      htmlS: "",
+      filterText: "",
+      choiceName: "", // 点击树提示当前选择项
+      treeData: [], //  目录树数据
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      fullscreen: false, // 是否全屏控制按钮
+      rules: {
+        type: [
+          {
+            required: true,
+            trigger: "change",
+            message: "请选择类型",
+          },
+        ],
+        title: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "请输入标题",
+          },
+        ],
+        text: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "请输入内容",
+          },
+        ],
+        catalogName: [
+          {
+            required: true,
+            trigger: "blur",
+            message: "请选择目录",
+            validator: catalogName,
+          },
+        ],
+      },
+      tooltit: "知识库管理",
+      fileInfo: {
+        limit: 5,
+        url: "/market/cknowledgeatt/upload",
+        fileList: [],
+      },
+      total: 0,
+      pageSize: 1,
+      knowledge: {
+        type: {
+          options: [],
+        },
+      },
+      tableData: [], // 表格数据源
+      dialogStatus: false, // 弹窗开启关闭
+      infolist: {}, // 提交表单数据源
+      typeOptions: [], // 类型数据源
+      titname: "", // 操作名称 -- 新增、修改、查看
+      fileList: [], // 回显附件数据源
+      attList: [], // 修改附件数据源
+      uploadstatus: false,
+      userInfo: {}, // 登录用户信息
+      searchList: [
+        {
+          type: "sel",
+          tit: "类型",
+          value: "",
+          width: "100%",
+          options: [],
+        },
+        {
+          type: "input",
+          tit: "标题",
+          value: "",
+          width: "100%",
+        },
+        {
+          type: "sel",
+          tit: "状态",
+          value: "",
+          width: "100%",
+          options: [
+            {
+              dataCode: "0",
+              dataName: "未收藏",
+            },
+            {
+              dataCode: "1",
+              dataName: "已收藏",
+            },
+          ],
+        },
+      ],
+      params: {},
+      centerDialogVisible: false,
+      messTit: "",
+      dataId: "",
+      loading: false,
+      loadinged: false,
+      datalist: {
+        url: "/market/compatt/downfile",
+        type: 2,
+      },
+    };
+  },
+  methods: {
+    canelChoice() {
+      this.params.catalogId = "";
+      this.actionName = "";
+      this.getList(this.params, this.pageSize);
+    },
+    collectionHandle(val) {
+      this.$http({
+        url: "/market/cnewknowledgenet/collection",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          id: val.id,
+          collection: val.collection == "0" ? "1" : "0",
+        },
+      }).then((res) => {
+        if (res.data.result === 1) {
+          this.$message({
+            message: res.data.desc,
+            type: "error",
+          });
+        } else {
+          this.$message({
+            message: "成功",
+            type: "success",
+          });
+          this.getList(this.params, this.pageSize);
+        }
+      });
+    },
+    sortChange(val) {
+      if (val.prop == "hits") {
+        this.params.hits = val.order;
+      }
+      this.getList(this.params, this.pageSize);
+    },
+    checkNode(index, data, node) {
+      this.actionName = data.label;
+      this.searchList.map((item) => {
+        item.value = "";
+      });
+      this.params.type = "";
+      this.params.title = "";
+      this.params.collection = "";
+      this.params.catalogId = data.key;
+      this.getList(this.params, this.pageSize);
+    },
+    // 树筛选
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.title.indexOf(value) !== -1;
+    },
+    // 树点击
+    nodeClick(index, data, node) {
+      this.infolist.catalogName = data.data.title;
+      this.infolist.catalogId = data.data.id;
+      this.$forceUpdate();
+    },
+    // 获取树
+    getTreeData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalogNet/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeData = res.data;
+      });
+    },
+    // 关闭弹窗
+    closedia() {
+      this.fullscreen = false;
+      this.infolist = {};
+      this.dialogStatus = false;
+      this.fileInfo.fileList = [];
+      this.getList(this.params, this.pageSize);
+    },
+    // 上传回调
+    uploadBack(v) {
+      this.attList = v;
+    },
+    //搜索数据
+    searchInfo(v) {
+      this.params = {};
+      v[0] ? (this.params.type = v[0]) : "";
+      v[1] ? (this.params.title = v[1]) : "";
+      v[2] ? (this.params.collection = v[2]) : "";
+      this.getList(this.params, this.pageSize);
+    },
+    //获取列表
+    getList(v, n) {
+      this.pageSize = n;
+      this.loading = true;
+      this.tableData = [];
+      this.$http({
+        url: "/market/mkNewknowledgeNet/queryPage",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+          page: '{"pageNo":"' + n + '","pageSize":"10"}',
+        },
+        data: v,
+      }).then((res) => {
+        this.tableData = res.data.data;
+        this.total = res.data.totalRecord;
+        this.loading = false;
+      });
+    },
+    //字典类型
+    getListype(v) {
+      this.$http({
+        url: "/market/mkKnowledgePubMsgTypeNet/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          dictCode: "pubType",
+        },
+      }).then((res) => {
+        let listopt = [];
+        res.data.forEach((item) => {
+          listopt.push({
+            dataCode: item.id,
+            dataName: item.pubType,
+          });
+        });
+        this.searchList[0].options = listopt;
+        this.knowledge.type.options = listopt;
+      });
+    },
+    //功能栏
+    iconCli(v) {
+      if (v === 1) {
+        this.getList(this.params, this.pageSize);
+      }
+      if (v === 2) {
+        this.fullscreen = !this.fullscreen;
+        // let isFullscreen =
+        //   document.body.scrollHeight == window.screen.height &&
+        //   document.body.scrollWidth == window.screen.width;
+        // if (!isFullscreen) {
+        //   this.requestFullscreen();
+        // } else {
+        //   this.exitFullscreen();
+        // }
+      }
+    },
+    // 全屏
+    requestFullscreen() {
+      const element = element || document.documentElement;
+      if (element.requestFullscreen) {
+        element.requestFullscreen();
+      } else if (element.msRequestFullscreen) {
+        element.msRequestFullscreen();
+      } else if (element.mozRequestFullScreen) {
+        element.mozRequestFullScreen();
+      } else if (element.webkitRequestFullscreen) {
+        element.webkitRequestFullscreen();
+      }
+    },
+    // 退出全屏
+    exitFullscreen() {
+      const element = element || document.documentElement;
+      if (document.exitFullscreen) {
+        document.exitFullscreen();
+      } else if (document.msExitFullscreen) {
+        document.msExitFullscreen();
+      } else if (document.mozCancelFullScreen) {
+        document.mozCancelFullScreen();
+      } else if (document.webkitCancelFullScreen) {
+        document.webkitCancelFullScreen();
+      }
+    },
+    // 分页
+    currchange(v) {
+      this.pageSize = v;
+      this.getList(this.params, this.pageSize);
+    },
+    //查看 修改 新增
+    dialogCheck(v, n) {
+      this.dialogStatus = true;
+      this.infolist = {};
+      if (v === 1) {
+        this.titname = "新建";
+        this.infolist = {};
+        this.getUser();
+        return;
+      } else if (v === 2) {
+        this.titname = "查看";
+        this.loadinged = true;
+      } else if (v === 3) {
+        this.titname = "修改";
+        this.loadinged = true;
+      }
+      this.$http({
+        url: "/market/cnewknowledgenet/queryInfo",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          id: n.id,
+        },
+      }).then((res) => {
+        this.datalist.attList = res.data.attList;
+        this.uploadstatus = true;
+        this.infolist = res.data;
+        this.fileInfo.fileList = [];
+        this.attList = [];
+        res.data.attList.forEach((item) => {
+          this.fileInfo.fileList.push({
+            name: item.fileName,
+            url: "",
+            id: item.id,
+            fileName: item.fileName,
+            fileCode: item.fileCode,
+            opName: item.opName,
+            opNo: item.opNo,
+            opTime: item.opTime,
+          });
+          this.attList.push({
+            name: item.fileName,
+            url: "",
+            id: item.id,
+            fileName: item.fileName,
+            fileCode: item.fileCode,
+            opName: item.opName,
+            opNo: item.opNo,
+            opTime: item.opTime,
+          });
+        });
+        this.loadinged = false;
+      });
+    },
+    //添加 修改
+    dialogCli(v) {
+      this.uploadstatus = false;
+      this.fileInfo.fileList = [];
+      if (v === 2) {
+        this.getUser();
+        this.dialogStatus = false;
+        this.getList(this.params, this.pageSize);
+        return;
+      }
+      if (this.titname === "新建") {
+        this.submitInfo("/market/cnewknowledgenet/addSave", v);
+      } else if (this.titname === "修改") {
+        this.submitInfo("/market/cnewknowledgenet/update ", v);
+      }
+    },
+    submitInfo(u, v) {
+      this.$refs.infolist.validate((valid) => {
+        if (valid) {
+          let attList = [];
+          for (let i = 0; i < this.attList.length; i++) {
+            attList.push({
+              id: this.attList[i].id,
+              fileCode: this.attList[i].fileCode,
+              fileName: this.attList[i].fileName,
+              opName: this.attList[i].opName,
+              opNo: this.attList[i].opNo,
+              opTime: this.attList[i].opTime,
+            });
+          }
+          this.loadinged = true;
+          this.$http({
+            url: u,
+            method: "post",
+            headers: {
+              "Content-Type": "application/json",
+            },
+            data: {
+              newKnowleDge: this.infolist,
+              attList: attList,
+            },
+          }).then((res) => {
+            this.loadinged = false;
+            if (res.data.result === 1) {
+              this.$message({
+                message: res.data.desc,
+                type: "error",
+              });
+            } else {
+              this.$message({
+                message: "成功",
+                type: "success",
+              });
+              this.fileInfo.fileList = [];
+              this.infolist = {};
+              this.dialogStatus = false;
+              this.getList(this.params, this.pageSize);
+            }
+          });
+        }
+      });
+    },
+    //处理所需数据
+    verifcheck(v) {
+      if (v === 1) {
+        for (let i = 0; i < this.knowledge.type.options.length; i++) {
+          if (this.knowledge.type.options[i].dataCode == this.infolist.type) {
+            this.infolist.typeName = this.knowledge.type.options[i].dataName;
+          }
+        }
+      }
+    },
+    //删除
+    delLine(val) {
+      this.centerDialogVisible = true;
+      this.messTit = "即将删除此条数据, 是否删除?";
+      this.dataId = val.id;
+    },
+    closeMessage(v) {
+      this.centerDialogVisible = false;
+      if (v === 1) {
+        this.$http({
+          url: "/market/cnewknowledgenet/delete",
+          method: "post",
+          headers: {
+            "Content-Type": "application/json",
+          },
+          data: { id: this.dataId },
+        }).then((res) => {
+          this.$message({
+            message: "删除成功",
+            type: "success",
+          });
+          this.getList(this.params, this.pageSize);
+        });
+      }
+    },
+    getUser() {
+      this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+      this.infolist = {};
+      this.infolist.handler = this.userInfo.loginNo;
+      this.infolist.orgId = this.userInfo.groupId;
+      this.infolist.orgName = this.userInfo.groupName;
+      this.infolist.handlerId = this.userInfo.loginName;
+    },
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+  mounted() {
+    this.getList(this.params, this.pageSize);
+    this.getListype();
+    this.getUser();
+    this.getTreeData();
+  },
+  created() {},
+};
+</script>
+<style>
+.el-select-dropdown__item {
+  /* padding: 0 !important; */
+}
+</style>
+<style scoped lang="scss">
+@import "../../../assets/style";
+
+// .iconfont {
+//   font-size: 42px;
+// }
+
+.icon-excel {
+  color: #67db63;
+}
+
+.icon-word {
+  color: #ff654e;
+}
+
+.icon-ppt {
+  color: #ff8943;
+}
+
+.icon-wenjian {
+  color: #ccc;
+}
+.tinymce-editor {
+  width: calc(100% - 100px) !important;
+}
+.el-icon-picture {
+  font-size: 36px;
+  color: #ccc;
+  background: #fff;
+  padding: 4px 2px;
+  margin-bottom: 2px;
+}
+.el-icon-full-screen {
+  cursor: pointer;
+}
+.back-box {
+  margin-top: 20px;
+  background: #f2f2f2;
+  padding: 20px;
+
+  div {
+    display: inline-block;
+    text-align: center;
+    margin-right: 20px;
+    cursor: pointer;
+
+    span {
+      display: block;
+      width: 80px;
+      overflow: hidden;
+      padding-top: 10px;
+      margin: 0 10px;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      display: -webkit-box;
+      /* 将对象作为弹性伸缩盒子模型显示 */
+      -webkit-line-clamp: 1;
+      /* 控制最多显示几行 */
+      -webkit-box-orient: vertical;
+      /* 设置或检索伸缩盒对象的子元素的排列方式 */
+    }
+  }
+}
+.tree-box {
+  height: calc(100% - 170px);
+  overflow: auto;
+  border: 1px solid #dcdfe6;
+  border-top: none;
+}
+
+.titbox {
+  div {
+    float: right;
+
+    i {
+      font-size: 22px;
+      margin-left: 20px;
+      cursor: pointer;
+    }
+  }
+}
+
+.tabbox {
+  margin-top: 15px;
+}
+
+.pageBox {
+  text-align: right;
+  margin-top: 10px;
+}
+
+.info-line {
+  width: 100%;
+  display: block;
+  padding-left: 20px;
+
+  div {
+    width: 50%;
+    display: inline-block;
+  }
+
+  span {
+    width: 80px;
+    display: inline-block;
+    text-align: left;
+
+    i {
+      color: red;
+      display: inline-block;
+      padding-right: 5px;
+    }
+  }
+
+  .el-select,
+  .el-input {
+    width: calc(100% - 100px);
+  }
+  .tree {
+    width: calc(100% - 100px);
+  }
+}
+
+.online {
+  width: 100%;
+
+  .el-select {
+    width: calc(100% - 100px);
+  }
+
+  span {
+    vertical-align: top;
+  }
+
+  .el-textarea {
+    width: calc(100% - 100px);
+  }
+}
+.choice-style {
+  background: rgb(255, 255, 255);
+}
+.ant-alert-info {
+  background-color: #e6f7ff;
+  border: 1px solid #91d5ff;
+}
+.ant-alert {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  color: rgb(0, 0, 0);
+  font-size: 14px;
+  font-variant: tabular-nums;
+  line-height: 1.5;
+  list-style: none;
+  font-feature-settings: "tnum";
+  position: relative;
+  padding: 5px 0;
+  word-wrap: break-word;
+  border-radius: 4px;
+}
+.canel-style {
+  color: #1890ff;
+  cursor: pointer;
+  padding-left: 10px;
+}
+</style>

+ 374 - 0
src/pages/main/itknowledgetop/knowledgeType.vue

@@ -0,0 +1,374 @@
+<template>
+
+    <fullscreen :fullscreen.sync="fullscreen" class="container">
+        <div class="container-box">
+            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+            <div class="search">
+                <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+                <el-button class="btn-check" size="medium" type="primary" @click="dialogCheck(3)">添加
+                </el-button>
+            </div>
+            <div class="tabbox">
+                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                    tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                    <el-table-column prop="pubType" label="知识类型">
+                    </el-table-column>
+                    <el-table-column prop="createName" label="配置姓名">
+                        <template slot-scope="scope">
+                            <span>{{$desensitization(scope.row.createName,1)}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createNo" label="配置工号">
+                        <template slot-scope="scope">
+                            <span class="">{{scope.row.createNo}}</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="createTime" label="配置时间">
+                    </el-table-column>
+                    <el-table-column label="操作" width="160px" align="center">
+                        <template slot-scope="scope">
+                            <el-button size="mini" type="primary" @click="dialogCheck(1,scope.row)">查看</el-button>
+                            <el-button size="mini" type="primary" @click="dialogCheck(2,scope.row)">修改</el-button>
+                            <el-button size="mini" type="danger" @click="delLine(scope.row)">删除</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                    :total="total">
+                </el-pagination>
+            </div>
+        </div>
+
+        <el-dialog :title="titname + '知识类型'" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
+            :modal-append-to-body="false" :close-on-click-modal="false" :before-close="closedia">
+            <div v-loading="loadinged">
+                <el-form :model="infolist" ref="infolist" :rules="rules">
+                    <div class="info-line">
+                        <el-form-item prop="pubType">
+                            <span>知识类型</span>
+                            <el-input v-model="infolist.pubType" placeholder="知识类型" :disabled="disableStatus"></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <span>创建时间</span>
+                            <el-date-picker v-model="infolist.createTime" type="date" placeholder="创建时间" disabled>
+                            </el-date-picker>
+                        </el-form-item>
+                    </div>
+
+                    <div class="info-line">
+                        <el-form-item>
+                            <span>创建工号</span>
+                            <el-input v-model="infolist.createNo" placeholder="创建工号" disabled></el-input>
+                        </el-form-item>
+                        <el-form-item>
+                            <span>创建姓名</span>
+                            <el-input v-model="infolist.createName" placeholder="" disabled></el-input>
+                        </el-form-item>
+                    </div>
+                </el-form>
+
+                <div slot="footer" class="dialog-footer myfooter">
+                    <el-button type="primary" @click="dialogCli(2)" v-if="titname !== '查看'">确 定</el-button>
+                    <el-button @click="dialogCli(1)" v-if="titname === '查看'">确 定</el-button>
+                    <el-button @click="dialogCli(1)">取 消</el-button>
+                </div>
+            </div>
+        </el-dialog>
+
+        <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible" v-if="centerDialogVisible"></myMessage>
+    </fullscreen>
+
+</template>
+<script>
+    import mySearch from "../../../components/search.vue";
+    import myUpload from '../../../components/upload'
+    import myMessage from "../../../components/myMessage.vue"
+    import toolList from '../../../components/toolList'
+
+    export default {
+        components: {
+            mySearch,
+            myUpload,
+            myMessage,
+            toolList
+        },
+        data() {
+            const pubType = (rule, value, callback) => {
+                if (!this.infolist.pubType) {
+                    callback(new Error('不能为空'))
+                } else {
+                    callback()
+                }
+            }
+            return {
+                rules: {
+                    pubType: [{
+                        required: true,
+                        trigger: 'blur',
+                        validator: pubType
+                    }],
+                },
+                searchList: [
+                    {
+                        type: 'input',
+                        tit: '知识类型',
+                        value: '',
+                        width: '98%',
+                    },
+                ],
+                tooltit:'知识类型管理',
+                fullscreen: false,
+                total: 0,
+                pageSize: 1,
+                tableData: [{}],
+                dialogStatus: false,
+                disableStatus: false,
+                titname: '',
+                infolist: {},
+                userInfo: {},
+                params: {},
+                centerDialogVisible: false,
+                messTit: '',
+                delid: '',
+                loading:false,
+                loadinged:false,
+            }
+        },
+        methods: {
+            closedia() {
+                this.infolist = {};
+                this.dialogStatus = false;
+            },
+            //搜索数据
+            searchInfo(v) {
+                this.params = {};
+                v[0] ? this.params.pubType = v[0] : '';
+                this.getList(this.params, this.pageSize);
+            },
+            //获取列表
+            getList(v, n) {
+                this.pageSize = n;
+                let _this = this;
+                this.loading = true;
+                this.tableData = [];
+                this.$http({
+                    url: "/market/mkKnowledgePubMsgTypeNet/queryPage",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                        "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                    },
+                    data: v,
+                }).then((res) => {
+                    this.tableData = res.data.data;
+                    this.total = res.data.totalRecord;
+                    this.loading = false;
+                });
+            },
+            // 分页
+            currchange(v) {
+                this.pageSize = v;
+                this.getList(this.params, this.pageSize);
+            },
+            //申请
+            dialogCheck(v, n) {
+                this.dialogStatus = true;
+                this.infolist = Object.assign({}, n);
+                this.infolist.createNo = this.userInfo.loginNo;
+                this.infolist.createName = this.userInfo.loginName;
+                if (v === 1) {
+                    this.titname = '查看';
+                    this.disableStatus = true;
+                } else if (v === 2) {
+                    this.titname = '修改';
+                    this.disableStatus = false;
+                } else if (v === 3) {
+                    this.titname = '添加';
+                    this.disableStatus = false;
+                    return
+                }
+                this.infolist.createName = this.$desensitization(this.infolist.createName,1);
+            },
+            //添加
+            dialogCli(v) {
+                if (v === 1) {
+                    this.infolist = {};
+                    this.dialogStatus = false;
+                    return
+                } else {
+                    this.infolist.createNo = this.userInfo.loginNo;
+                    this.infolist.createName = this.userInfo.loginName;
+                    this.infolist.createTime = this.$formatDate(new Date(), "YYYY-MM-DD");
+                    if (this.titname === '添加') {
+                        this.submitInfo("/market/cpubMsgNetType/add");
+                    } else if (this.titname === '修改') {
+                        this.submitInfo("/market/mkKnowledgePubMsgTypeNet/update", v);
+                    }
+
+                }
+            },
+            submitInfo(u) {
+                let _this = this;
+                this.$refs.infolist.validate(valid => {
+                    if (valid) {
+                        this.loadinged = true;
+                        this.$http({
+                            url: u,
+                            method: "post",
+                            headers: {
+                                "Content-Type": "application/json",
+                            },
+                            data: this.infolist,
+                        }).then((res) => {
+                            this.loadinged = false;
+                            if (res.data.result === 1) {
+                                _this.$message({
+                                    message: res.data.desc,
+                                    type: 'error'
+                                });
+                            } else {
+                                _this.$message({
+                                    message: '成功',
+                                    type: 'success'
+                                });
+                                _this.infolist = {};
+                                _this.dialogStatus = false;
+                                _this.getList({}, _this.pageSize);
+                            }
+
+                        });
+                    }
+                })
+            },
+            closeMessage(v) {
+                this.centerDialogVisible = false;
+                let _this = this;
+                if (v === 1) {
+                    _this.$http({
+                        url: "/market/mkKnowledgePubMsgTypeNet/del",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: {
+                            id: this.delid
+                        },
+                    }).then((res) => {
+                        if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        } else {
+                            _this.$message({
+                                message: '删除成功',
+                                type: 'success'
+                            });
+                            _this.getList(this.params, this.pageSize);
+                        }
+                    });
+                }
+            },
+            //删除
+            delLine(v) {
+                this.centerDialogVisible = true;
+                this.messTit = '即将删除此条数据, 是否删除?';
+                this.delid = v.id;
+            },
+            //文件返回值
+            uploadBack(v) {
+                console.log(v)
+            },
+            //功能栏
+            iconCli(v) {
+                if (v === 1) {
+                    this.getList(this.params, this.pageSize);
+                }
+                if (v === 2) {
+                    this.fullscreen = !this.fullscreen
+                }
+            },
+            getUser() {
+                this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+            }
+        },
+        mounted() {
+            this.getList({}, 1);
+            this.getUser();
+        },
+        created() {
+
+        }
+    }
+</script>
+<style scoped lang="scss">
+    .onetab {
+        margin-bottom: 20px;
+        padding: 0 20px;
+    }
+
+    .titbox {
+        div {
+            float: right;
+
+            i {
+                font-size: 22px;
+                margin-left: 20px;
+                cursor: pointer;
+            }
+        }
+    }
+
+    .tabbox {
+        margin-top: 15px;
+    }
+
+    .pageBox {
+        text-align: right;
+        margin-top: 10px;
+    }
+
+    .info-line {
+        width: 100%;
+        display: block;
+        padding-left: 20px;
+
+        div {
+            width: 50%;
+            display: inline-block;
+        }
+
+        span {
+            width: 80px;
+            display: inline-block;
+            text-align: left;
+
+            i {
+                color: red;
+                display: inline-block;
+                padding-right: 5px;
+            }
+        }
+
+        .el-select,
+        .el-input {
+            width: calc(100% - 100px);
+        }
+    }
+
+    .online {
+        width: 100%;
+
+        .el-select {
+            width: calc(100% - 100px);
+        }
+
+        span {
+            vertical-align: top;
+        }
+
+        .el-textarea {
+            width: calc(100% - 100px);
+        }
+    }
+</style>

+ 366 - 0
src/pages/main/itknowledgetop/mcIndex.vue

@@ -0,0 +1,366 @@
+<template>
+  <fullscreen :fullscreen.sync="fullscreen" class="container">
+    <div class="container-box">
+      <el-row :gutter="20">
+        <el-col :span="4">
+          <el-input placeholder="输入关键字进行过滤" v-model="filterText">
+          </el-input>
+          <div class="tree-box">
+            <el-tree
+              class="filter-tree"
+              :data="treeData"
+              node-key="catalog"
+              :props="defaultProps"
+              default-expand-all
+              :filter-node-method="filterNode"
+              @node-click="nodeClick"
+              ref="tree"
+            >
+            </el-tree>
+          </div>
+        </el-col>
+        <el-col :span="20">
+          <el-input
+            v-model="params.knowledgeName"
+            style="width: 200px"
+            placeholder="知识标题"
+          ></el-input>
+          <el-select
+            :popper-append-to-body="false"
+            v-model="params.pubType"
+            placeholder="发布类型"
+            clearable
+          >
+            <el-option
+              v-for="item in knowledgeTypeOpation"
+              :key="item.id"
+              :label="item.pubType"
+              :value="item.id"
+            >
+            </el-option>
+          </el-select>
+          <el-button>查询</el-button>
+          <el-radio-group v-model="params.knowledgeType" @change="checkType">
+            <el-radio-button label="a">正常</el-radio-button>
+            <el-radio-button label="1">已收藏</el-radio-button>
+          </el-radio-group>
+          <el-button @click="addKnowledge" style="float: right">添加</el-button>
+          <el-table border ref="filterTable" :data="tableData" style="width: 100%;margin-top:20px">
+            <el-table-column prop="title" label="知识标题"> </el-table-column>
+            <el-table-column prop="address" label="地区"> </el-table-column>
+            <el-table-column prop="time" label="时间" sortable>
+            </el-table-column>
+            <el-table-column prop="point" label="点击量" sortable>
+            </el-table-column>
+            <el-table-column prop="address" label="操作">
+              <template slot-scope="scope">
+                <el-button
+                  plain
+                  size="mini"
+                  type="primary"
+                  @click="detailes(scope.row)"
+                  >查看</el-button
+                >
+                <el-button
+                  plain
+                  size="mini"
+                  type="success"
+                  @click="collection(scope.row)"
+                  >{{ scope.row.collectionDesc }}</el-button
+                >
+                <el-button
+                  plain
+                  size="mini"
+                  type="danger"
+                  @click="detailes(scope.row)"
+                  >修改</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+          <el-pagination
+            class="pageBox"
+            @current-change="currchange"
+            layout="prev, pager, next"
+            background
+            :total="total"
+          >
+          </el-pagination>
+        </el-col>
+      </el-row>
+    </div>
+    <el-dialog
+      title="增加知识库"
+      :visible.sync="dialogVisible"
+      width="45%"
+      :modal-append-to-body="false"
+    >
+      <el-form :model="formData" ref="infolist">
+        <el-form-item prop="title">
+          <span>标题</span>
+          <el-input v-model="formData.knowledgeTitle" placeholder="标题">
+          </el-input>
+        </el-form-item>
+        <el-form-item prop="catalog">
+          <span>目录</span>
+          <el-tree
+            class="filter-tree"
+            :data="treeData"
+            node-key="catalog"
+            :props="defaultProps"
+            default-expand-all
+            :filter-node-method="filterNode"
+            @node-click="nodeClick"
+            ref="tree"
+          >
+          </el-tree>
+        </el-form-item>
+        <el-form-item prop="content">
+          <span>内容</span>
+          <p-editor-tiny
+            imgType="upload"
+            v-model="formData.content"
+          ></p-editor-tiny>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="dialogVisible = false"
+          >确 定</el-button
+        >
+      </span>
+    </el-dialog>
+  </fullscreen>
+</template>
+<script>
+export default {
+  components: {
+    PEditorTiny: () =>
+      import(
+        /* webpackChunkName: "peditor-tiny" */ "../../../components/p-editor-tiny"
+      ),
+  },
+  data() {
+    return {
+      total: 0,
+      pageSize: 1,
+      formData: {
+        title: "",
+        catalog: "",
+        department: "",
+        content: "",
+      },
+      dialogVisible: false,
+      fullscreen: false,
+      params: {
+        knowledgeType: "a",
+        knowledgeName: "",
+        pubType: "",
+      },
+
+      dataSourse: [
+        {
+          title: "知识库标题1",
+          address: "哈尔滨",
+          time: "2016-05-02",
+          point: "106",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "1",
+        },
+        {
+          title: "知识库标题2",
+          address: "哈尔滨",
+          time: "2016-05-01",
+          point: "3",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "2",
+        },
+        {
+          title: "知识库标题3",
+          address: "哈尔滨",
+          time: "2016-04-02",
+          point: "1",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "3",
+        },
+        {
+          title: "知识库标题4",
+          address: "哈尔滨",
+          time: "2016-03-02",
+          point: "101",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "3",
+        },
+      ],
+      tableData: [
+        {
+          title: "知识库标题1",
+          address: "哈尔滨",
+          time: "2016-05-02",
+          point: "106",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "1",
+        },
+        {
+          title: "知识库标题2",
+          address: "哈尔滨",
+          time: "2016-05-01",
+          point: "3",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "2",
+        },
+        {
+          title: "知识库标题3",
+          address: "哈尔滨",
+          time: "2016-04-02",
+          point: "1",
+          collection: "1",
+          collectionDesc: "已收藏",
+          catalog: "3",
+        },
+        {
+          title: "知识库标题4",
+          address: "哈尔滨",
+          time: "2016-03-02",
+          point: "101",
+          collection: "0",
+          collectionDesc: "未收藏",
+          catalog: "3",
+        },
+      ],
+      filterText: "",
+      treeData: [],
+      defaultProps: {
+        children: "children",
+        label: "title",
+      },
+      knowledgeTypeOpation: [],
+    };
+  },
+  methods: {
+    // 分页
+    currchange(v) {
+      this.pageSize = v;
+    },
+    //字典类型
+    getListype(v) {
+      this.$http({
+        url: "/market/mkKnowledgePubMsgTypeNet/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          dictCode: "pubType",
+        },
+      }).then((res) => {
+        this.knowledgeTypeOpation = res.data;
+      });
+    },
+    addKnowledge() {
+      this.$router.push("/additknowledge");
+      //   this.dialogVisible = true;
+    },
+    //  查看
+    detailes(val) {
+      console.log(val);
+    },
+    // 树点击
+    nodeClick(index, data, node) {
+      let dataArr = JSON.parse(JSON.stringify(this.dataSourse));
+      let catalog = data.data.hasOwnProperty("catalog")
+        ? data.data.catalog
+        : "";
+      if (catalog) {
+        this.tableData = dataArr.filter((item) => {
+          if (item.catalog == catalog) {
+            return item;
+          }
+        });
+      } else {
+        this.tableData = this.dataSourse;
+      }
+    },
+    // 列表筛选
+    checkType(val) {
+      if (val != "a") {
+        this.tableData = this.tableData.filter((item) => {
+          if (item.collection == val) {
+            return item;
+          }
+        });
+      } else {
+        this.tableData = this.dataSourse;
+      }
+    },
+    // 树筛选
+    filterNode(value, data) {
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
+    resetDateFilter() {
+      this.$refs.filterTable.clearFilter("date");
+    },
+    clearFilter() {
+      this.$refs.filterTable.clearFilter();
+    },
+    // 列表数据格式化
+    formatter(row, column) {
+      return row.address;
+    },
+    // 列表筛选
+    filterTag(value, row) {
+      return row.tag === value;
+    },
+    // 收藏
+    collection(val) {
+      if (val.collection == "1") {
+        val.collection = "0";
+        val.collectionDesc = "为收藏";
+      } else {
+        val.collection = "1";
+        val.collectionDesc = "已收藏";
+      }
+    },
+    getData() {
+      this.$http({
+        url: "/market/mkKnowledgeCatalogNet/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {},
+      }).then((res) => {
+        this.treeData = res.data;
+      });
+    },
+  },
+  mounted() {
+    this.getListype();
+    this.getData();
+  },
+  watch: {
+    filterText(val) {
+      this.$refs.tree.filter(val);
+    },
+  },
+};
+</script>
+<style>
+.pageBox {
+  text-align: right;
+  margin-top: 10px;
+}
+.tree-box {
+  height: 400px;
+  overflow: auto;
+  border: 1px solid #dcdfe6;
+  border-top: none;
+}
+</style>

+ 20 - 0
src/pages/main/knowledgetop/index.vue

@@ -20,6 +20,7 @@
                 <div
                 <div
                     class="wfour"
                     class="wfour"
                     @click="jumpinfo('/knowledgeTypetop', '知识类型管理')"
                     @click="jumpinfo('/knowledgeTypetop', '知识类型管理')"
+                     v-if="lockFlag == 'add'"
                 >
                 >
                     <span><i class="el-icon-folder-opened"></i></span>
                     <span><i class="el-icon-folder-opened"></i></span>
                     <span>知识类型管理</span>
                     <span>知识类型管理</span>
@@ -29,6 +30,7 @@
                     @click="
                     @click="
                         jumpinfo('/knowledgeCatalogtop', '知识库目录管理')
                         jumpinfo('/knowledgeCatalogtop', '知识库目录管理')
                     "
                     "
+                     v-if="lockFlag == 'add'"
                 >
                 >
                     <span><i class="el-icon-folder-opened"></i></span>
                     <span><i class="el-icon-folder-opened"></i></span>
                     <span>知识库目录管理</span>
                     <span>知识库目录管理</span>
@@ -90,6 +92,23 @@ export default {
             this.$store.commit("setDefaultActive", params.rountPath);
             this.$store.commit("setDefaultActive", params.rountPath);
             this.$store.commit("setTabList", Array.from(set));
             this.$store.commit("setTabList", Array.from(set));
         },
         },
+        getRole(){
+            this.$http({
+                url:"/market/mkNewknowledge/queryRole",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {}
+            }).then(res => {
+                console.log("vue"+res.data);
+                if(res.data == "1"){
+                    this.lockFlag = 'add';//管理员
+                }else{
+                    this.lockFlag = 'updata';//普通员工
+                }
+            });
+        },
         // getUser() {
         // getUser() {
         //     this.userInfo = JSON.parse(window.sessionStorage.userInfo);
         //     this.userInfo = JSON.parse(window.sessionStorage.userInfo);
         //     let Menus = JSON.parse(window.sessionStorage.childrenMenus);
         //     let Menus = JSON.parse(window.sessionStorage.childrenMenus);
@@ -119,6 +138,7 @@ export default {
         // }
         // }
     },
     },
     mounted() {
     mounted() {
+        this.getRole();
         // this.getUser();
         // this.getUser();
     },
     },
     created() {}
     created() {}

+ 224 - 0
src/pages/main/logQuery/logQueryList.vue

@@ -0,0 +1,224 @@
+<template>
+  <!-- <div style="height: 95%"> -->
+
+  <div class="container" style="padding: 20px 15px 15px 15px">
+    <h2 style="margin: 15px">操作日志查询</h2>
+    <div class="search" style="margin: 15px">
+      <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+    </div>
+    <el-table
+      height="calc(80% - 40px)"
+      v-loading="loading"
+      class="com-table"
+      ref="multipleTable"
+      :data="tableData"
+      tooltip-effect="dark"
+      size="small"
+      border
+      style="width: 100%"
+    >
+      <el-table-column
+        align="center"
+        prop="slaveNumber"
+        label="操作账号"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="sourceIp"
+        show-overflow-tooltip
+        label="访问IP"
+      >
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="moduleName"
+        show-overflow-tooltip
+        label="操作模块"
+      >
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="operationContent"
+        show-overflow-tooltip
+        label="操作明细"
+      >
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="operationTime"
+        show-overflow-tooltip
+        label="访问时间"
+      >
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      class="pageBox"
+      @current-change="currchange"
+      layout="prev, pager, next"
+      background
+      :total="total"
+    >
+    </el-pagination>
+  </div>
+</template>
+<script>
+import mySearch from "../../../components/search";
+export default {
+  components: {
+    mySearch,
+  },
+  data() {
+    return {
+      total: 0,
+      loading: false,
+      pageSize: 1,
+      params: {
+        slaveNumber: "",
+      },
+      searchList: [
+        {
+          type: "input",
+          tit: "日志操作账号",
+          value: "",
+          width: "100%",
+          options: [],
+        },
+      ],
+      tableData: [
+        {
+          slaveNumber: "admin",
+          sourceIp: "100.220.100.100",
+          moduleName: "全量业务明细报表",
+          operationContent: "全量业务明细报表1111",
+          operationTime: "2021-03-10",
+        },
+        {
+          slaveNumber: "admin",
+          sourceIp: "100.20.100.109",
+          moduleName: "全量业务",
+          operationContent: "全量业务明细报表22222",
+          operationTime: "2021-04-15",
+        },
+      ],
+    };
+  },
+  methods: {
+    //搜索数据
+    searchInfo(v) {
+      this.params = {};
+      v[0] ? (this.params.slaveNumber = v[0]) : "";
+      this.getList(this.params, this.pageSize);
+    },
+    //获取列表
+    getList(v, n) {
+      // this.loading = true;
+      this.pageSize = n;
+      this.$http({
+        url: "/market/selectLogs/queryPage",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+          page: '{"pageNo":"' + n + '","pageSize":"10"}',
+        },
+        data: v,
+      }).then((res) => {
+        this.loading = false;
+        this.tableData = res.data.data;
+        this.total = res.data.totalRecord;
+        // console.log(this.tableData);
+      });
+    },
+    // 分页
+    currchange(v) {
+      this.pageSize = v;
+      this.getList(this.params, this.pageSize);
+    },
+  },
+  mounted() {
+    // this.getOpations();
+    this.getList(this.params, this.pageSize);
+    // 获取权限
+  },
+  watch: {
+    $route() {
+      this.getList(this.params, this.pageSize);
+    },
+  },
+};
+</script>
+<style scoped>
+.el-upload-list {
+  float: right;
+}
+.el-input__suffix {
+  cursor: pointer;
+}
+.container .el-upload {
+  width: auto !important;
+}
+</style>
+<style scoped lang="scss">
+.btn-default {
+  display: inline;
+  margin-left: 10px;
+}
+.titbox {
+  div {
+    float: right;
+
+    i {
+      font-size: 22px;
+      margin-left: 20px;
+      cursor: pointer;
+    }
+  }
+}
+
+.tabbox {
+  margin-top: 15px;
+}
+
+.pageBox {
+  text-align: right;
+  float: right;
+  margin-top: 10px;
+}
+.info-line {
+  width: 100%;
+  display: block;
+
+  span {
+    width: 80px;
+    display: inline-block;
+    text-align: left;
+
+    i {
+      color: red;
+      display: inline-block;
+      padding-right: 5px;
+    }
+  }
+
+  .el-select,
+  .el-input {
+    width: calc(100% - 100px);
+  }
+}
+.online {
+  width: 100%;
+
+  .el-select {
+    width: calc(100% - 100px);
+  }
+
+  span {
+    vertical-align: top;
+  }
+
+  .el-textarea {
+    width: calc(100% - 100px);
+  }
+}
+</style>

+ 4 - 2
src/pages/main/organizaStructure/index.vue

@@ -15,9 +15,11 @@
             <div class="box-level1" @click="infochose(1)">{{title2.roleName}} ({{title2.cnt}}) 人</div>
             <div class="box-level1" @click="infochose(1)">{{title2.roleName}} ({{title2.cnt}}) 人</div>
             <div class="top-box">
             <div class="top-box">
                 <div class="box-level2" v-for="item in regionList">
                 <div class="box-level2" v-for="item in regionList">
-                    <span @click="jumpto(2,item,2,1)">{{item.roleName}} ({{item.cnt}}) 人</span>
+                    <span v-if="item.roleName == '稽核中心'" style="background: #108ee9;height: 41px;" @click="jumpto(2,item,2,1)">{{item.roleName}} ({{item.cnt}}) 人</span>
+                    <span v-else @click="jumpto(2,item,2,1)">{{item.roleName}} ({{item.cnt}}) 人</span>
                     <div class="box-level3" v-for="items in item.thirdList">
                     <div class="box-level3" v-for="items in item.thirdList">
-                        <span @click="jumpto(2,items,2,1)">{{items.roleName}} ({{items.cnt}}) 人</span>
+                        <span v-if="items.roleName == '稽核管理'" style="background: #32ccfe;height: 41px;" @click="jumpto(2,items,2,1)">{{items.roleName}} ({{items.cnt}}) 人</span>
+                        <span v-else @click="jumpto(2,items,2,1)">{{items.roleName}} ({{items.cnt}}) 人</span>
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>

+ 406 - 6
src/pages/main/performance/components/form.vue

@@ -1,13 +1,18 @@
 <!--
 <!--
  * @Author       : yuanrunwei
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:03:02
  * @Date         : 2021-11-01 18:03:02
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-01-10 19:27:43
+ * @LastEditors: daiqisheng
+ * @LastEditTime: 2022-04-25 12:16:31
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\form.vue
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\form.vue
 -->
 -->
 <template>
 <template>
-  <el-form :inline="true" :model="object">
-    <el-row :gutter="24">
+  <el-form
+    :inline="true"
+    :model="object"
+    label-position="left"
+    label-width="80px"
+  >
+    <!-- <el-row :gutter="24" v-if="form.length < 5">
       <el-col
       <el-col
         v-for="({ props, label, type, dictionary }, index) in form"
         v-for="({ props, label, type, dictionary }, index) in form"
         :key="index"
         :key="index"
@@ -37,6 +42,16 @@
             >
             >
             </el-date-picker>
             </el-date-picker>
           </template>
           </template>
+          <template v-else-if="type === 'dateRange'">
+            <el-date-picker
+              v-model="object[props]"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+            >
+            </el-date-picker>
+          </template>
           <template v-else>
           <template v-else>
             <el-input
             <el-input
               v-model="object[props]"
               v-model="object[props]"
@@ -46,6 +61,7 @@
           </template>
           </template>
         </el-form-item>
         </el-form-item>
       </el-col>
       </el-col>
+      <div v-if="form.length < 4"></div>
       <el-col :span="6">
       <el-col :span="6">
         <el-form-item>
         <el-form-item>
           <el-button type="primary" @click="handleSearch">搜索</el-button>
           <el-button type="primary" @click="handleSearch">搜索</el-button>
@@ -57,10 +73,341 @@
           :key="index"
           :key="index"
           @click="handleSubmit(props)"
           @click="handleSubmit(props)"
         >
         >
-          <i v-if="!unlogo" class="el-icon-document-add font-weight-bold" />{{ label }}
+          <i v-if="!unlogo" class="el-icon-document-add font-weight-bold" />{{
+            label
+          }}
         </el-button>
         </el-button>
       </el-col>
       </el-col>
-    </el-row>
+    </el-row> -->
+
+    <div v-if="form.length < 5" class="margin-bottom-10">
+      <div class="template-input width-100">
+        <div class="template-input width-80">
+          <div
+            class="margin-right-10"
+            v-for="({ props, label, type, dictionary }, index) in form.slice(
+              0,
+              2
+            )"
+            :key="index"
+          >
+            <el-form-item :label="label">
+              <template v-if="type === 'select'">
+                <el-select
+                  v-model="object[props]"
+                  :placeholder="label"
+                  filterable
+                  clearable
+                >
+                  <el-option
+                    :label="label"
+                    :value="value"
+                    v-for="({ label, value }, index) in dictionary"
+                    :key="index"
+                  ></el-option>
+                </el-select>
+              </template>
+              <template
+                v-else-if="['datetime', 'date', 'month'].includes(type)"
+              >
+                <el-date-picker
+                  v-model="object[props]"
+                  :type="type"
+                  :placeholder="label"
+                >
+                </el-date-picker>
+              </template>
+              <template v-else-if="type === 'dateRange'">
+                <el-date-picker
+                  v-model="object[props]"
+                  type="datetimerange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                >
+                </el-date-picker>
+              </template>
+              <template v-else>
+                <el-input
+                  v-model="object[props]"
+                  :placeholder="label"
+                  clearable
+                ></el-input>
+              </template>
+            </el-form-item>
+          </div>
+        </div>
+        <div class="width-20 flex-justify-align-end">
+          <el-form-item>
+            <el-button type="primary" @click="handleSearch">搜索</el-button>
+          </el-form-item>
+        </div>
+      </div>
+      <div class="template-input width-100 margin-top-10 margin-bottom-10">
+        <div
+          class="margin-right-10"
+          v-for="({ props, label, type, dictionary }, index) in form.slice(2)"
+          :key="index"
+          :span="6"
+        >
+          <el-form-item :label="label">
+            <template v-if="type === 'select'">
+              <el-select
+                v-model="object[props]"
+                :placeholder="label"
+                filterable
+                clearable
+              >
+                <el-option
+                  :label="label"
+                  :value="value"
+                  v-for="({ label, value }, index) in dictionary"
+                  :key="index"
+                ></el-option>
+              </el-select>
+            </template>
+            <template v-else-if="['datetime', 'date', 'month'].includes(type)">
+              <el-date-picker
+                v-model="object[props]"
+                :type="type"
+                :placeholder="label"
+              >
+              </el-date-picker>
+            </template>
+            <template v-else-if="type === 'dateRange'">
+              <el-date-picker
+                v-model="object[props]"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              >
+              </el-date-picker>
+            </template>
+            <template v-else>
+              <el-input
+                v-model="object[props]"
+                :placeholder="label"
+                clearable
+              ></el-input>
+            </template>
+          </el-form-item>
+        </div>
+      </div>
+      <p class="width-100 flex-justify-align-end margin-top-10">
+        <el-button
+          v-for="({ label, props, unlogo }, index) in handle"
+          :key="index"
+          @click="handleSubmit(props)"
+        >
+          <i v-if="!unlogo" class="el-icon-document-add font-weight-bold" />{{
+            label
+          }}
+        </el-button>
+      </p>
+      <!-- 输入框 -->
+      <!-- <div class="template-input">
+        <div
+          class="flex-1 margin-right-10"
+          v-for="({ props, label, type, dictionary }, index) in form"
+          :key="index"
+          :span="6"
+        >
+          <el-form-item :label="label">
+            <template v-if="type === 'select'">
+              <el-select
+                v-model="object[props]"
+                :placeholder="label"
+                filterable
+                clearable
+              >
+                <el-option
+                  :label="label"
+                  :value="value"
+                  v-for="({ label, value }, index) in dictionary"
+                  :key="index"
+                ></el-option>
+              </el-select>
+            </template>
+            <template v-else-if="['datetime', 'date', 'month'].includes(type)">
+              <el-date-picker
+                v-model="object[props]"
+                :type="type"
+                :placeholder="label"
+              >
+              </el-date-picker>
+            </template>
+            <template v-else-if="type === 'dateRange'">
+              <el-date-picker
+                v-model="object[props]"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              >
+              </el-date-picker>
+            </template>
+            <template v-else>
+              <el-input
+                v-model="object[props]"
+                :placeholder="label"
+                clearable
+              ></el-input>
+            </template>
+          </el-form-item>
+        </div>
+      </div> -->
+      <!-- 按钮 -->
+      <!-- <div class="template-input">
+        <el-form-item>
+          <el-button type="primary" @click="handleSearch">搜索</el-button>
+        </el-form-item>
+      </div>
+      <p class="width-100 flex-justify-align-end margin-top-10">
+        <el-button
+          v-for="({ label, props, unlogo }, index) in handle"
+          :key="index"
+          @click="handleSubmit(props)"
+        >
+          <i v-if="!unlogo" class="el-icon-document-add font-weight-bold" />{{
+            label
+          }}
+        </el-button>
+      </p> -->
+    </div>
+    <div v-else>
+      <div class="template-content">
+        <div class="template-left">
+          <div class="template-head">
+            <div
+              v-for="({ props, label, type, dictionary }, index) in form.slice(
+                0,
+                1
+              )"
+              :key="index"
+              :span="6"
+            >
+              <el-form-item :label="label">
+                <template v-if="type === 'select'">
+                  <el-select
+                    v-model="object[props]"
+                    :placeholder="label"
+                    filterable
+                    clearable
+                  >
+                    <el-option
+                      :label="label"
+                      :value="value"
+                      v-for="({ label, value }, index) in dictionary"
+                      :key="index"
+                    ></el-option>
+                  </el-select>
+                </template>
+                <template
+                  v-else-if="['datetime', 'date', 'month'].includes(type)"
+                >
+                  <el-date-picker
+                    v-model="object[props]"
+                    :type="type"
+                    :placeholder="label"
+                  >
+                  </el-date-picker>
+                </template>
+                <template v-else-if="type === 'dateRange'">
+                  <el-date-picker
+                    v-model="object[props]"
+                    type="datetimerange"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                  >
+                  </el-date-picker>
+                </template>
+                <template v-else>
+                  <el-input
+                    v-model="object[props]"
+                    :placeholder="label"
+                    clearable
+                  ></el-input>
+                </template>
+              </el-form-item>
+            </div>
+          </div>
+          <div class="template-head">
+            <div
+              class="margin-right-10"
+              v-for="({ props, label, type, dictionary }, index) in form.slice(
+                1
+              )"
+              :key="index"
+              :span="6"
+            >
+              <el-form-item :label="label">
+                <template v-if="type === 'select'">
+                  <el-select
+                    v-model="object[props]"
+                    :placeholder="label"
+                    filterable
+                    clearable
+                  >
+                    <el-option
+                      :label="label"
+                      :value="value"
+                      v-for="({ label, value }, index) in dictionary"
+                      :key="index"
+                    ></el-option>
+                  </el-select>
+                </template>
+                <template
+                  v-else-if="['datetime', 'date', 'month'].includes(type)"
+                >
+                  <el-date-picker
+                    v-model="object[props]"
+                    :type="type"
+                    :placeholder="label"
+                  >
+                  </el-date-picker>
+                </template>
+                <template v-else-if="type === 'dateRange'">
+                  <el-date-picker
+                    v-model="object[props]"
+                    type="datetimerange"
+                    range-separator="至"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                  >
+                  </el-date-picker>
+                </template>
+                <template v-else>
+                  <el-input
+                    v-model="object[props]"
+                    :placeholder="label"
+                    clearable
+                  ></el-input>
+                </template>
+              </el-form-item>
+            </div>
+          </div>
+        </div>
+        <div class="template-right margin-top-10">
+          <el-form-item class="template-search">
+            <el-button type="primary" @click="handleSearch">搜索</el-button>
+          </el-form-item>
+        </div>
+      </div>
+
+      <div class="flex-justify-align-end margin-top-40 margin-bottom-20">
+        <el-button
+          v-for="({ label, props, unlogo }, index) in handle"
+          :key="index"
+          @click="handleSubmit(props)"
+        >
+          <i v-if="!unlogo" class="el-icon-document-add font-weight-bold" />{{
+            label
+          }}
+        </el-button>
+      </div>
+    </div>
   </el-form>
   </el-form>
 </template>
 </template>
 <script>
 <script>
@@ -78,6 +425,27 @@ export default {
   data: () => ({
   data: () => ({
     object: {},
     object: {},
   }),
   }),
+  // watch: {
+  //   form() {
+  //     this.form.forEach((el) => {
+  //       if (el.default) {
+  //         this.object[el.props] = el.default;
+  //         console.log(this.object[el.props], "this.object[el.props]");
+  //       }
+  //     });
+  //   },
+  // },
+  created() {
+    this.form.forEach((el) => {
+      if (el.default) {
+        // this.object[el.props] = el.default;
+        this.object = {
+          ...this.object,
+          [el.props]: el.default,
+        };
+      }
+    });
+  },
   methods: {
   methods: {
     handleSearch() {
     handleSearch() {
       this.$emit("search", this.object);
       this.$emit("search", this.object);
@@ -88,3 +456,35 @@ export default {
   },
   },
 };
 };
 </script>
 </script>
+<style lang="scss" scope>
+.width-100 {
+  width: 100%;
+}
+.width-80 {
+  width: 80%;
+}
+.width-20 {
+  width: 20%;
+}
+.border {
+  border: 1px solid red;
+}
+.template {
+  &-head {
+    display: flex;
+    justify-content: space-between;
+    flex-wrap: wrap;
+    margin-left: 10px;
+    margin-top: 10px;
+  }
+  &-input {
+    display: flex;
+    // flex-wrap: wrap;
+    // margin-bottom: 10px;
+  }
+  &-content {
+    display: flex;
+    justify-content: space-between;
+  }
+}
+</style>

+ 333 - 27
src/pages/main/performance/components/sheet.vue

@@ -2,12 +2,22 @@
  * @Author       : yuanrunwei
  * @Author       : yuanrunwei
  * @Date         : 2021-12-04 14:23:58
  * @Date         : 2021-12-04 14:23:58
  * @LastEditors: daiqisheng
  * @LastEditors: daiqisheng
- * @LastEditTime: 2022-03-07 17:40:14
+ * @LastEditTime: 2022-04-25 19:11:41
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
 -->
 -->
 <template>
 <template>
   <div class="sheet-container">
   <div class="sheet-container">
     <div class="flex-justify-align-end margin-bottom-20">
     <div class="flex-justify-align-end margin-bottom-20">
+      <span
+        class="margin-right-10 font-size-16"
+        v-if="['template'].includes(attribute)"
+        ><span class="sheet-container-require">*</span>模板类型:</span
+      >
+      <el-input
+        v-if="['template'].includes(attribute)"
+        v-model="templateType"
+        :disabled="type === 'view' || (type === 'edit' && attribute === 'file')"
+      ></el-input>
       <el-button
       <el-button
         type="primary"
         type="primary"
         @click="handleVisible"
         @click="handleVisible"
@@ -16,6 +26,12 @@
       >
       >
       <el-button type="primary" @click="handleDownload">导出</el-button>
       <el-button type="primary" @click="handleDownload">导出</el-button>
       <el-button type="primary" @click="handleFullscreen()">全屏显示</el-button>
       <el-button type="primary" @click="handleFullscreen()">全屏显示</el-button>
+      <el-button
+        type="primary"
+        @click="handleSupervise('confirm')"
+        v-if="['template'].includes(attribute)"
+        >督办</el-button
+      >
       <template v-if="['edit'].includes(type)">
       <template v-if="['edit'].includes(type)">
         <el-upload
         <el-upload
           v-if="!id"
           v-if="!id"
@@ -34,7 +50,11 @@
           >暂存</el-button
           >暂存</el-button
         >
         >
         <el-button
         <el-button
-          v-if="status === '2' || status === '3'"
+          v-if="
+            status === '2' ||
+            status === '3' ||
+            (status === '0' && superviseFlag === '1')
+          "
           type="primary"
           type="primary"
           @click="handleResave"
           @click="handleResave"
           :disabled="handleForbid()"
           :disabled="handleForbid()"
@@ -53,6 +73,7 @@
       </template>
       </template>
     </div>
     </div>
     <div id="luckysheet" class="sheet-container-block"></div>
     <div id="luckysheet" class="sheet-container-block"></div>
+    <!-- 设置权限的 -->
     <simple-dialog
     <simple-dialog
       title="权限设置"
       title="权限设置"
       :visible="visible"
       :visible="visible"
@@ -162,6 +183,7 @@
         ><div></div
         ><div></div
       ></template>
       ></template>
     </simple-dialog>
     </simple-dialog>
+    <!-- 科室经理提交的 -->
     <simpleDialog
     <simpleDialog
       title="提交"
       title="提交"
       :visible="manager_approve"
       :visible="manager_approve"
@@ -210,6 +232,63 @@
         </div>
         </div>
       </template>
       </template>
     </simpleDialog>
     </simpleDialog>
+    <simpleDialog
+      title="督办"
+      :visible="supervise"
+      :modal="false"
+      @confirm="handleSupervise('confirm')"
+      @cancel="handleSupervise('cancel')"
+    >
+      <span class="margin-left-20"
+        >注:设置督办后,系统会按照设定的周期自动派发</span
+      >
+      <el-form
+        :rules="superviserules"
+        :model="superviseForm"
+        ref="superviseForm"
+        class="margin-top-20"
+        label-width="120px"
+      >
+        <el-form-item prop="distribute" label="派发周期">
+          <el-select v-model="superviseForm.distribute" filterable>
+            <!-- 0.月 1.季度 2.半年 3.年 -->
+            <el-option
+              v-for="({ label, value }, index) in [
+                { label: '月', value: '0' },
+                { label: '季度', value: '1' },
+                { label: '半年', value: '2' },
+                { label: '年', value: '3' },
+              ]"
+              :key="index"
+              :label="label"
+              :value="value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item prop="write" label="填报日期">
+          <el-date-picker
+            v-model="superviseForm.write"
+            type="date"
+            @change="handleWrite"
+            :picker-options="pickWrite"
+          >
+          </el-date-picker
+        ></el-form-item>
+        <el-form-item prop="endTime" label="截止时间">
+          <el-date-picker
+            v-model="superviseForm.endTime"
+            @change="handleEnd"
+            type="datetime"
+            :unlink-panels="true"
+            :picker-options="pickOptions"
+          >
+          </el-date-picker
+        ></el-form-item>
+      </el-form>
+      <template v-if="id && type === 'view'" v-slot:footer
+        ><div></div
+      ></template>
+    </simpleDialog>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -233,10 +312,12 @@ export default {
     id: {
     id: {
       default: null,
       default: null,
     },
     },
+    // 接收人
     receiver: {
     receiver: {
       type: String,
       type: String,
       default: "",
       default: "",
     },
     },
+    // 模板状态按钮判断
     status: { type: String, default: "" },
     status: { type: String, default: "" },
   },
   },
   data() {
   data() {
@@ -277,14 +358,45 @@ export default {
           },
           },
         ],
         ],
       },
       },
-
+      superviserules: {
+        distribute: [
+          { required: true, message: "请选择派发周期", trigger: "change" },
+        ],
+        write: [
+          { required: true, message: "请选择填报周期", trigger: "change" },
+        ],
+        endTime: [
+          { required: true, message: "请选择截止时间", trigger: "change" },
+        ],
+      },
+      superviseForm: {
+        distribute: "", // 派单周期
+        write: "", // 填写周期
+        endTime: "", // 截止时间
+      },
+      originSuperviseForm: {},
+      pickOptions: {
+        disabledDate(time) {
+          return time.getTime() < new Date().getTime() - 8.64e7;
+        },
+      },
+      pickWrite: {
+        disabledDate(time) {
+          return time.getTime() < new Date().getTime() - 8.64e7;
+        },
+      },
       // 可提交标志
       // 可提交标志
       addFlag: "0",
       addFlag: "0",
+      // 督办标志
+      superviseFlag: null,
       rowList: [],
       rowList: [],
       isDisable: true,
       isDisable: true,
       issued_id: null,
       issued_id: null,
       template_id: null,
       template_id: null,
       visible: false,
       visible: false,
+      templateType: "",
+      // 督办
+      supervise: false,
       manager_approve: false,
       manager_approve: false,
       row_list: [],
       row_list: [],
       column_list: [],
       column_list: [],
@@ -309,6 +421,47 @@ export default {
         this.handleCreate();
         this.handleCreate();
       }
       }
     },
     },
+    // 填报日期
+    handleWrite(value) {
+      if (value) {
+        let range =
+          new Date().getTime() > value.getTime()
+            ? new Date().getTime()
+            : value.getTime();
+        this.pickOptions = {
+          disabledDate(time) {
+            return time.getTime() < range;
+          },
+        };
+      } else {
+        this.pickOptions = {
+          disabledDate(time) {
+            return time.getTime() < new Date().getTime() - 864000;
+          },
+        };
+      }
+    },
+    handleEnd(value) {
+      if (value) {
+        this.pickWrite = {
+          disabledDate(time) {
+            return time.getTime() > value.getTime();
+          },
+        };
+        if (
+          this.superviseForm.write &&
+          value.getTime() < this.superviseForm.write.getTime()
+        ) {
+          this.superviseForm.endTime = "";
+        }
+      } else {
+        this.pickWrite = {
+          disabledDate(time) {
+            return time.getTime() - 864000 < new Date().getTime();
+          },
+        };
+      }
+    },
     // // 权限选择
     // // 权限选择
     // handleRadio(e){
     // handleRadio(e){
     //     console.log(e,'e');
     //     console.log(e,'e');
@@ -356,7 +509,12 @@ export default {
           issuedId,
           issuedId,
           templateId,
           templateId,
           list,
           list,
+          superviseFlag,
+          templateType,
           addFlag,
           addFlag,
+          distributeEndTime,
+          distributeTime,
+          distributeType,
         },
         },
       } = await this.$http({
       } = await this.$http({
         url,
         url,
@@ -366,6 +524,15 @@ export default {
         },
         },
         data: params,
         data: params,
       });
       });
+      this.superviseFlag = superviseFlag;
+      if (superviseFlag === "1") {
+        this.superviseForm = {
+          distribute: distributeType, // 派单周期
+          write: distributeTime, // 填写周期
+          endTime: distributeEndTime, // 截止时间
+        };
+      }
+      this.templateType = templateType;
       this.template_id = templateId;
       this.template_id = templateId;
       this.issued_id = issuedId;
       this.issued_id = issuedId;
       this.addFlag = addFlag;
       this.addFlag = addFlag;
@@ -439,6 +606,44 @@ export default {
         type: "json",
         type: "json",
       });
       });
     },
     },
+    handleSupervise(data) {
+      if (data === "cancel") {
+        this.supervise = false;
+        this.superviseForm = {
+          ...this.originSuperviseForm,
+        };
+        return;
+      }
+      if (this.supervise === false) {
+        this.supervise = true;
+        this.originSuperviseForm = {
+          ...this.superviseForm,
+        };
+      } else {
+        let filled =
+          Object.keys(this.superviseForm).length === 3 &&
+          Object.values(this.superviseForm).filter((el) => el !== "").length ===
+            3;
+        if (filled) {
+          let time = new Date().getTime();
+          if (time > this.superviseForm.endTime.getTime()) {
+            this.$message.error("截止时间不能小于当前时间");
+            return;
+          }
+          this.superviseForm = {
+            ...this.superviseForm,
+            endTime: this.$formatDate(
+              this.superviseForm.endTime,
+              "YYYY-MM-DD HH:mm:ss"
+            ), // 督办设置的截止时间
+            write: this.$formatDate(this.superviseForm.write, "YYYY-MM-DD"), // 派发时间–或者叫—填报时间
+          };
+          this.supervise = false;
+        } else {
+          this.$message.error("请填写完整必要的信息");
+        }
+      }
+    },
     handleForbid() {
     handleForbid() {
       // const object = {};
       // const object = {};
       const { permission_type } = this.form;
       const { permission_type } = this.form;
@@ -487,6 +692,7 @@ export default {
           //   that.rowList.push(row);
           //   that.rowList.push(row);
           // },
           // },
           cellUpdateBefore: function (row, column) {
           cellUpdateBefore: function (row, column) {
+            console.log(row, column);
             if (!that.handleAllow({ row, column })) {
             if (!that.handleAllow({ row, column })) {
               return false;
               return false;
             }
             }
@@ -502,13 +708,20 @@ export default {
               }
               }
             }
             }
           },
           },
+          rangePasteBefore: function ([
+            { row_focus: row, column_focus: column },
+          ]) {
+            if (!that.handleAllow({ row, column })) {
+              that.$message.error("您没有编辑权限");
+              return false
+            }
+          },
           updated: function ({ range }) {
           updated: function ({ range }) {
             const middle = range.map((el) => {
             const middle = range.map((el) => {
               return that.paramsArr(el.row[0], el.row[1]);
               return that.paramsArr(el.row[0], el.row[1]);
             });
             });
             let changedList = middle.join(",").split(",");
             let changedList = middle.join(",").split(",");
             that.rowList.push(...changedList);
             that.rowList.push(...changedList);
-            console.log(that.rowList, "that.rowList");
           },
           },
         },
         },
       };
       };
@@ -581,7 +794,7 @@ export default {
         });
         });
         reqdata.principalId = principalId.join(",");
         reqdata.principalId = principalId.join(",");
         reqdata.principalName = principalName.join(",");
         reqdata.principalName = principalName.join(",");
-        reqdata.principalMent = principalName.join(",");
+        reqdata.principalMent = principalMent.join(",");
       } else {
       } else {
         const { charge } = this.form;
         const { charge } = this.form;
         //  特殊权限
         //  特殊权限
@@ -627,11 +840,42 @@ export default {
           edit_url = "/market/CMKIssued/CMKIssuedSubmit";
           edit_url = "/market/CMKIssued/CMKIssuedSubmit";
           break;
           break;
       }
       }
+
       const sheet_name = window.luckysheet.getSheet().name;
       const sheet_name = window.luckysheet.getSheet().name;
       const data = window.luckysheet.getSheet(sheet_name);
       const data = window.luckysheet.getSheet(sheet_name);
       const workbook_name = window.luckysheet.getWorkbookName();
       const workbook_name = window.luckysheet.getWorkbookName();
       if (!this.id) {
       if (!this.id) {
         // 新增时添加权限
         // 新增时添加权限
+        let value = {};
+        if (!this.templateType) {
+          this.$message.error("请输入模板类型");
+          return;
+        }
+        if (
+          Object.values(this.superviseForm).filter((el) => el !== "").length ===
+          3
+        ) {
+          value = {
+            distributeEndTime: this.superviseForm.endTime, // 督办设置的截止时间
+            distributeTime: this.superviseForm.write, // 派发时间–或者叫—填报时间
+            distributeType: this.superviseForm.distribute, //派发周期类型 派发周期类型 0.月 1.季度 2.半年 3.年
+            superviseFlag: 1, //督办标识 0.不是 1.是
+            templateType: this.templateType, //模板类型
+            templateContent: JSON.stringify(data), //文件内容
+            templateName: workbook_name, //模板名称
+            templateUrl: "", //文件链接
+            status: type,
+          };
+        } else {
+          value = {
+            superviseFlag: 0, //督办标识 0.不是 1.是
+            templateType: this.templateType, //模板类型
+            templateContent: JSON.stringify(data), //文件内容
+            templateName: workbook_name, //模板名称
+            templateUrl: "", //文件链接
+            status: type,
+          };
+        }
         const {
         const {
           data: { body },
           data: { body },
         } = await this.$http({
         } = await this.$http({
@@ -640,36 +884,58 @@ export default {
           headers: {
           headers: {
             "Content-Type": "application/json",
             "Content-Type": "application/json",
           },
           },
-          data: {
-            id: this.template_id,
-            templateContent: JSON.stringify(data),
-            templateName: workbook_name,
-            issuedId: this.issued_id,
-            status: type,
-          },
+          data: value,
         });
         });
         await this.handleAddAuth({ id: body });
         await this.handleAddAuth({ id: body });
         this.$emit("save");
         this.$emit("save");
       } else {
       } else {
         // 职位
         // 职位
         let duty = JSON.parse(sessionStorage.userInfo).duty;
         let duty = JSON.parse(sessionStorage.userInfo).duty;
-        if (duty === "7") {
+        if (duty === "7" && type === "0") {
           this.manager_approve = true;
           this.manager_approve = true;
         } else {
         } else {
           if (type === "2") {
           if (type === "2") {
             // 暂存
             // 暂存
+            let value = {};
+            if (!this.templateType) {
+              this.$message.error("请输入模板类型");
+              return;
+            }
+            if (
+              Object.values(this.superviseForm).filter((el) => el !== "")
+                .length === 3
+            ) {
+              value = {
+                templateId: this.id,
+                distributeEndTime: this.superviseForm.endTime, // 督办设置的截止时间
+                distributeTime: this.superviseForm.write, // 派发时间–或者叫—填报时间
+                distributeType: this.superviseForm.distribute, //派发周期类型 派发周期类型 0.月 1.季度 2.半年 3.年
+                superviseFlag: 1, //督办标识 0.不是 1.是
+                templateType: this.templateType, //模板类型
+                templateContent: JSON.stringify(data), //文件内容
+                templateName: workbook_name, //模板名称
+                templateUrl: "", //文件链接
+                status: type,
+              };
+            } else {
+              value = {
+                templateId: this.id,
+                superviseFlag: 0, //督办标识 0.不是 1.是
+                templateType: this.templateType, //模板类型
+                templateContent: JSON.stringify(data), //文件内容
+                templateName: workbook_name, //模板名称
+                templateUrl: "", //文件链接
+                status: type,
+              };
+            }
+
             await this.$http({
             await this.$http({
-              url: "/market/CMKFileTemplate/UptateCMKFileTemplateById", // 新增
+              url: "/market/CMKFileTemplate/UptateCMKFileTemplateById", //
               method: "post",
               method: "post",
               headers: {
               headers: {
                 "Content-Type": "application/json",
                 "Content-Type": "application/json",
               },
               },
-              data: {
-                templateId: this.id,
-                templateContent: JSON.stringify(data),
-                templateName: workbook_name,
-                status: type,
-              },
+              data: value,
             });
             });
             this.$emit("save");
             this.$emit("save");
             return;
             return;
@@ -903,19 +1169,51 @@ export default {
       const sheet_name = window.luckysheet.getSheet().name;
       const sheet_name = window.luckysheet.getSheet().name;
       const data = window.luckysheet.getSheet(sheet_name);
       const data = window.luckysheet.getSheet(sheet_name);
       const workbook_name = window.luckysheet.getWorkbookName();
       const workbook_name = window.luckysheet.getWorkbookName();
+
+      let value = {};
+      if (!this.templateType) {
+        this.$message.error("请输入模板类型");
+        return;
+      }
+      if (
+        Object.values(this.superviseForm).filter((el) => el !== "").length === 3
+      ) {
+        value = {
+          templateId: this.id,
+          distributeEndTime: this.superviseForm.endTime, // 督办设置的截止时间
+          distributeTime: this.superviseForm.write, // 派发时间–或者叫—填报时间
+          distributeType: this.superviseForm.distribute, //派发周期类型 派发周期类型 0.月 1.季度 2.半年 3.年
+          superviseFlag: 1, //督办标识 0.不是 1.是
+          templateType: this.templateType, //模板类型
+          templateContent: JSON.stringify(data), //文件内容
+          templateName: workbook_name, //模板名称
+          templateUrl: "", //文件链接
+          status: "0",
+        };
+      } else {
+        value = {
+          templateId: this.id,
+          superviseFlag: 0, //督办标识 0.不是 1.是
+          templateType: this.templateType, //模板类型
+          templateContent: JSON.stringify(data), //文件内容
+          templateName: workbook_name, //模板名称
+          templateUrl: "", //文件链接
+          status: "0",
+        };
+      }
+
       this.$http({
       this.$http({
         url: "/market/CMKFileTemplate/UptateCMKFileTemplateById",
         url: "/market/CMKFileTemplate/UptateCMKFileTemplateById",
         method: "post",
         method: "post",
         headers: {
         headers: {
           "Content-Type": "application/json",
           "Content-Type": "application/json",
         },
         },
-        data: {
-          templateId: this.id,
-          templateContent: JSON.stringify(data),
-          templateName: workbook_name,
-          status: "0",
-        },
+        data: value,
       }).then(() => {
       }).then(() => {
+        this.$message({
+          type: "success",
+          message: "保存成功",
+        });
         this.$emit("save");
         this.$emit("save");
       });
       });
     },
     },
@@ -936,7 +1234,8 @@ export default {
     },
     },
   },
   },
   mounted() {
   mounted() {
-    console.log(this.destroy, "destroy");
+    console.log(this.attribute, "attribute");
+    console.log(this.type, "type");
     this.handleInit();
     this.handleInit();
     this.handleChargeList();
     this.handleChargeList();
   },
   },
@@ -957,6 +1256,13 @@ export default {
     width: 100%;
     width: 100%;
     height: 75%;
     height: 75%;
   }
   }
+  &-require {
+    color: red;
+  }
+  .el-input {
+    width: 200px;
+    margin-right: 10px;
+  }
 }
 }
 .form {
 .form {
   &-input {
   &-input {

+ 30 - 6
src/pages/main/performance/components/table.vue

@@ -1,8 +1,8 @@
 <!--
 <!--
  * @Author       : yuanrunwei
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:02:58
  * @Date         : 2021-11-01 18:02:58
- * @LastEditors: Please set LastEditors
- * @LastEditTime: 2022-02-10 18:31:51
+ * @LastEditors: daiqisheng
+ * @LastEditTime: 2022-04-25 12:11:10
  * @FilePath     : /spfm-market-front/src/pages/main/performance/components/table.vue
  * @FilePath     : /spfm-market-front/src/pages/main/performance/components/table.vue
 -->
 -->
 <template>
 <template>
@@ -10,6 +10,7 @@
     class="simple-table"
     class="simple-table"
     :data="computed_list"
     :data="computed_list"
     v-loading="loading"
     v-loading="loading"
+    style="width: 100%"
     @selection-change="handleSelectionChange"
     @selection-change="handleSelectionChange"
   >
   >
     <el-table-column
     <el-table-column
@@ -121,6 +122,7 @@
     </el-table-column>
     </el-table-column>
     <el-table-column
     <el-table-column
       v-if="handleRow.length"
       v-if="handleRow.length"
+      fixed="right"
       label="操作"
       label="操作"
       :align="'center'"
       :align="'center'"
       :width="handleRow.length * 50"
       :width="handleRow.length * 50"
@@ -201,11 +203,33 @@ export default {
       let visible = true;
       let visible = true;
       if (params) {
       if (params) {
         visible = false;
         visible = false;
-        Object.keys(params).forEach((element) => {
-          if (params[element].includes(data[element])) {
-            visible = true;
+        if (Object.keys(params).length === 1) {
+          Object.keys(params).forEach((element) => {
+            if (params[element].includes(data[element])) {
+              visible = true;
+            }
+          });
+        } else {
+          let sum = 0;
+          if (Object.keys(params).indexOf("flag") && params["flag"] === "or") {
+            Object.keys(params).forEach((element) => {
+              if (params[element].includes(data[element])) {
+                visible = true;
+              }
+            });
+          } else {
+            Object.keys(params).forEach((element) => {
+              if (params[element].includes(data[element])) {
+                sum = sum + 1;
+              }
+            });
+            if (Object.keys(params).length === sum) {
+              visible = true;
+            } else {
+              visible = false;
+            }
           }
           }
-        });
+        }
       }
       }
       return visible;
       return visible;
     },
     },

+ 102 - 4
src/pages/main/performance/department.vue

@@ -1,7 +1,12 @@
 <template>
 <template>
   <div>
   <div>
     <div class="simple-container">
     <div class="simple-container">
-      <simple-form :form="table_form" @search="handleSearch"> </simple-form>
+      <simple-form
+        :form="table_form"
+        @search="handleSearch"
+        class="department-form"
+      >
+      </simple-form>
       <simple-table
       <simple-table
         :list="table_list"
         :list="table_list"
         :config="table_config"
         :config="table_config"
@@ -10,6 +15,8 @@
         @check="handleCheck"
         @check="handleCheck"
         @edit="handleEdit"
         @edit="handleEdit"
         @delete="handleDelete"
         @delete="handleDelete"
+        @remove="handleRemove"
+        @urge="handleUrge"
         @receiverName="handleReceiver"
         @receiverName="handleReceiver"
       ></simple-table>
       ></simple-table>
       <simple-pagination
       <simple-pagination
@@ -45,7 +52,9 @@
               <el-button
               <el-button
                 type="primary"
                 type="primary"
                 v-if="
                 v-if="
-                  edit_form.status === '2' &&
+                  (edit_form.status === '2' ||
+                    edit_form.status === '6' ||
+                    edit_form.status === '7') &&
                   (duty === '7' || duty === '3' || duty === '4') &&
                   (duty === '7' || duty === '3' || duty === '4') &&
                   reviewType === duty
                   reviewType === duty
                 "
                 "
@@ -419,10 +428,26 @@ export default {
           type: "datetime",
           type: "datetime",
         },
         },
         {
         {
+          label: "是否为督办",
+          props: "superviseFlag",
+          type: "select",
+          // 0.否  1.是
+          dictionary: [
+            {
+              label: "否",
+              value: "0",
+            },
+            {
+              label: "是",
+              value: "1",
+            },
+          ],
+        },
+        {
           label: "状态",
           label: "状态",
           props: "status",
           props: "status",
           type: "select",
           type: "select",
-          // 0.待处理  1.待汇总 2.待审批  3.已完成
+          // 0.待处理  1.待汇总 2.待审批  3.已完成  4已提交 5未提交  6待二级副总审批    7待二级正总审批
           dictionary: [
           dictionary: [
             {
             {
               label: "已撤回",
               label: "已撤回",
@@ -440,10 +465,27 @@ export default {
               label: "待审批",
               label: "待审批",
               value: "2",
               value: "2",
             },
             },
+
             {
             {
               label: "已完成",
               label: "已完成",
               value: "3",
               value: "3",
             },
             },
+            {
+              label: "已提交",
+              value: "4",
+            },
+            {
+              label: "未提交",
+              value: "5",
+            },
+            {
+              label: "待二级副总审批",
+              value: "6",
+            },
+            {
+              label: "待二级正总审批",
+              value: "7",
+            },
           ],
           ],
         },
         },
       ],
       ],
@@ -471,6 +513,21 @@ export default {
             withdrawFlag: ["0"],
             withdrawFlag: ["0"],
           },
           },
         },
         },
+        {
+          label: "删除",
+          props: "remove",
+          popconfirm: true,
+          visible: {
+            withdrawFlag: ["0"],
+          },
+        },
+        // {
+        //   label: "催办",
+        //   props: "urge",
+        //   visible: {
+        //     superviseFlag: ["1"],
+        //   },
+        // },
       ],
       ],
       //  表头配置
       //  表头配置
       table_config: [
       table_config: [
@@ -525,6 +582,18 @@ export default {
             3: "已完成",
             3: "已完成",
             4: "已提交",
             4: "已提交",
             5: "未提交",
             5: "未提交",
+            6: "待二级副总审批",
+            7: "待二级正总审批",
+          },
+        },
+        {
+          label: "是否为督办",
+          props: "superviseFlag",
+          type: "dictionary",
+          dictionary: {
+            null: "否",
+            0: "否",
+            1: "是",
           },
           },
         },
         },
       ],
       ],
@@ -590,9 +659,10 @@ export default {
       this.table_search = {
       this.table_search = {
         ...data,
         ...data,
         issuedDate: data.issuedDate
         issuedDate: data.issuedDate
-          ? this.$formatDate(data.issuedDate, "YYYY-MM-DD HH:00:00")
+          ? this.$formatDate(data.issuedDate, "YYYY-MM-DD HH:mm:ss")
           : data.issuedDate,
           : data.issuedDate,
       };
       };
+      console.log(this.table_search, "daaad");
       this.page = 1;
       this.page = 1;
       this.handleInit({
       this.handleInit({
         ...this.table_search,
         ...this.table_search,
@@ -685,6 +755,26 @@ export default {
         });
         });
       });
       });
     },
     },
+    handleRemove({ id }) {
+      console.log(id, "id");
+      this.$http({
+        url: "/market/CMKIssued/CMKRemoveIssuedById",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          id,
+        },
+      }).then(() => {
+        this.$message.success("删除成功, 请重新创建模版");
+        this.handleInit({
+          ...this.table_search,
+          page: this.page,
+          pageSize: this.rows,
+        });
+      });
+    },
     // dialog事件
     // dialog事件
     //权限管理事件
     //权限管理事件
     handleApprove() {
     handleApprove() {
@@ -997,6 +1087,9 @@ export default {
       }
       }
       return arr.join(",");
       return arr.join(",");
     },
     },
+    handleUrge() {
+      console.log("这里是催办的方法");
+    },
     handleConfirm(visible) {
     handleConfirm(visible) {
       console.log(visible);
       console.log(visible);
       this.track_visible = visible;
       this.track_visible = visible;
@@ -1058,4 +1151,9 @@ export default {
     display: none !important;
     display: none !important;
   }
   }
 }
 }
+.department-form {
+  .el-form-item .el-input {
+    width: 220px;
+  }
+}
 </style>
 </style>

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 191 - 192
src/pages/main/performance/index.vue


+ 65 - 14
src/pages/main/performance/mould.vue

@@ -56,6 +56,7 @@
         <el-form-item
         <el-form-item
           label="截止时间"
           label="截止时间"
           prop="endTime"
           prop="endTime"
+          v-if="superviseFlag !== '1'"
           :rules="{
           :rules="{
             required: true,
             required: true,
             message: '截止时间不能为空',
             message: '截止时间不能为空',
@@ -65,7 +66,7 @@
           <el-date-picker
           <el-date-picker
             v-model="issue_form.endTime"
             v-model="issue_form.endTime"
             type="datetime"
             type="datetime"
-            format="yyyy-MM-dd HH:00:00"
+            format="yyyy-MM-dd HH:mm:ss"
           >
           >
           </el-date-picker>
           </el-date-picker>
         </el-form-item>
         </el-form-item>
@@ -147,6 +148,7 @@ export default {
         precautions: "",
         precautions: "",
         endTime: "",
         endTime: "",
       },
       },
+      superviseFlag: "",
       issue_id: null,
       issue_id: null,
       // table
       // table
       table_loading: false,
       table_loading: false,
@@ -157,6 +159,11 @@ export default {
           props: "templateName",
           props: "templateName",
           type: "input",
           type: "input",
         },
         },
+        {
+          label: "模板类型",
+          props: "templateType",
+          type: "input",
+        },
       ],
       ],
       table_list: [],
       table_list: [],
       table_handle: [
       table_handle: [
@@ -170,13 +177,17 @@ export default {
           label: "下发",
           label: "下发",
           props: "issue",
           props: "issue",
           visible: {
           visible: {
-            status: ["0", "3"],
+            status: ["0"],
+            flag: "or",
+            superviseFlag: ["0"],
           },
           },
         },
         },
         {
         {
           label: "编辑",
           label: "编辑",
           props: "redit",
           props: "redit",
           visible: {
           visible: {
+            superviseFlag: ["1"],
+            flag: "or",
             status: ["2", "3"],
             status: ["2", "3"],
           },
           },
         },
         },
@@ -188,7 +199,7 @@ export default {
           label: "删除",
           label: "删除",
           props: "delete",
           props: "delete",
           visible: {
           visible: {
-            status: ["0", "2"],
+            status: ["0", "3"],
           },
           },
           popconfirm: true,
           popconfirm: true,
         },
         },
@@ -203,6 +214,10 @@ export default {
           props: "templateName",
           props: "templateName",
         },
         },
         {
         {
+          label: "模板类型",
+          props: "templateType",
+        },
+        {
           label: "配置时间",
           label: "配置时间",
           props: "updateTime",
           props: "updateTime",
         },
         },
@@ -220,6 +235,16 @@ export default {
             3: "已下发",
             3: "已下发",
           },
           },
         },
         },
+        {
+          label: "是否为督办",
+          props: "superviseFlag",
+          type: "dictionary",
+          dictionary: {
+            null: "否",
+            0: "否",
+            1: "是",
+          },
+        },
       ],
       ],
     };
     };
   },
   },
@@ -235,7 +260,7 @@ export default {
         data: {
         data: {
           page: this.page,
           page: this.page,
           pageSize: this.rows,
           pageSize: this.rows,
-          templateName: this.table_search.templateName,
+          ...this.table_search,
         },
         },
       }).then(({ data: { count, data } }) => {
       }).then(({ data: { count, data } }) => {
         this.total = count;
         this.total = count;
@@ -243,8 +268,9 @@ export default {
         this.table_loading = false;
         this.table_loading = false;
       });
       });
     },
     },
-    handleSearch({ templateName }) {
-      this.table_search = { templateName };
+    handleSearch(data) {
+      console.log(data, "data");
+      this.table_search = data;
       this.handleReset();
       this.handleReset();
       this.handleInit();
       this.handleInit();
     },
     },
@@ -269,6 +295,7 @@ export default {
           this.template_id = params ? params.id : null;
           this.template_id = params ? params.id : null;
           break;
           break;
         case "issue":
         case "issue":
+          this.superviseFlag = params ? params.superviseFlag : "";
           this.issue_visible = !this.issue_visible;
           this.issue_visible = !this.issue_visible;
           this.issue_id = params ? params.id : null;
           this.issue_id = params ? params.id : null;
           if (this.issue_visible) {
           if (this.issue_visible) {
@@ -302,20 +329,44 @@ export default {
     handleIssue() {
     handleIssue() {
       this.$refs["issue_ref"].validate((valid) => {
       this.$refs["issue_ref"].validate((valid) => {
         if (valid) {
         if (valid) {
-          this.$http({
-            url: "/market/CMKFileTemplate/issuedCMKFileTemplateById",
-            method: "post",
-            headers: {
-              "Content-Type": "application/json",
-            },
-            data: {
+          let url = "";
+          let reqdata = {};
+          if (this.superviseFlag === "1") {
+            //  调用督办的下发
+            console.log("这里调用督办的下发");
+            url = "/market/CMKFileTemplate/issuedCMKFileTemplateBySuperviseId";
+            reqdata = {
+              ...this.issue_form,
+              templateId: this.issue_id,
+            };
+          } else {
+            //  调用普通的下发
+            url = "/market/CMKFileTemplate/issuedCMKFileTemplateById";
+            reqdata = {
               ...this.issue_form,
               ...this.issue_form,
               endTime: this.$formatDate(
               endTime: this.$formatDate(
                 this.issue_form.endTime,
                 this.issue_form.endTime,
-                "YYYY-MM-DD HH:00:00"
+                "YYYY-MM-DD HH:mm:ss"
               ),
               ),
               templateId: this.issue_id,
               templateId: this.issue_id,
+            };
+            if (this.issue_form.endTime) {
+              if (
+                new Date(this.issue_form.endTime).getTime() <
+                new Date().getTime()
+              ) {
+                this.$message.error("截止时间不能小于当前时间");
+                return false;
+              }
+            }
+          }
+          this.$http({
+            url: url,
+            method: "post",
+            headers: {
+              "Content-Type": "application/json",
             },
             },
+            data: reqdata,
           }).then(() => {
           }).then(() => {
             this.handleVisible("issue");
             this.handleVisible("issue");
             this.$message.success("下发成功");
             this.$message.success("下发成功");

+ 83 - 70
src/pages/main/performance/reply.vue

@@ -41,40 +41,26 @@ export default {
       table_search: {},
       table_search: {},
       table_form: [
       table_form: [
         {
         {
-          label: "统计月份",
-          props: "time",
-          type: "month",
-        },
-        // {
-        //     label: "绩效类型",
-        //     props: "performance_type",
-        //     type: "select",
-        //     dictionary: [
-        //         {
-        //             label: "部门绩效",
-        //             value: "部门绩效",
-        //         },
-        //         {
-        //             label: "员工绩效",
-        //             value: "员工绩效",
-        //         },
-        //     ],
-        // },
-        // {
-        //     label: "绩效分类",
-        //     props: "performance_class",
-        //     type: "select",
-        //     dictionary: [
-        //         {
-        //             label: "GS",
-        //             value: "GS",
-        //         },
-        //         {
-        //             label: "KPI",
-        //             value: "KPI",
-        //         },
-        //     ],
-        // },
+          label: "统计时间",
+          props: "Time",
+          type: "dateRange",
+          default: [new Date(), new Date().setDate(new Date().getDate() + 1)],
+        },
+        {
+          label: "模板类型",
+          props: "templateType",
+          type: "input",
+        },
+        {
+          label: "模板名称",
+          props: "templateName",
+          type: "input",
+        },
+        {
+          label: "科室名称",
+          props: "deptName",
+          type: "input",
+        },
       ],
       ],
       table_list: [],
       table_list: [],
       table_handle: [
       table_handle: [
@@ -94,10 +80,18 @@ export default {
           props: "loginName",
           props: "loginName",
         },
         },
         {
         {
-          label: "待办接收数",
+          label: "接收待办数",
           props: "number",
           props: "number",
         },
         },
         {
         {
+          label: "待办完成数",
+          props: "finishAgencyNumber",
+        },
+        {
+          label: "进行中待办数",
+          props: "conductAgencyNumber",
+        },
+        {
           label: "完成回复率",
           label: "完成回复率",
           props: "percentageReply",
           props: "percentageReply",
         },
         },
@@ -109,6 +103,10 @@ export default {
           label: "累计超期时间",
           label: "累计超期时间",
           props: "day",
           props: "day",
         },
         },
+        {
+          label: "平均超期时间(天)",
+          props: "averageDay",
+        },
       ],
       ],
     };
     };
   },
   },
@@ -152,61 +150,70 @@ export default {
         responseType: "blob",
         responseType: "blob",
         data: {
         data: {
           ...this.table_search,
           ...this.table_search,
-          time: this.table_search.time ? this.$formatDate(this.table_search.time, "YYYY-MM") : '',
         },
         },
       }).then((response) => {
       }).then((response) => {
         if (window.navigator && window.navigator.msSaveOrOpenBlob) {
         if (window.navigator && window.navigator.msSaveOrOpenBlob) {
           let blob = new Blob([response.data], {
           let blob = new Blob([response.data], {
             type: "application/vnd.ms-excel",
             type: "application/vnd.ms-excel",
           });
           });
-          let month = this.table_search.time ? this.$formatDate(this.table_search.time, "YYYY年MM月") : ''
-          window.navigator.msSaveOrOpenBlob(
-            blob,`${month}回复统计.xlsx`
-          );
+          // let month = this.table_search.time
+          //   ? this.$formatDate(this.table_search.time, "YYYY年MM月")
+          //   : "";
+          window.navigator.msSaveOrOpenBlob(blob, `回复统计.xlsx`);
         } else {
         } else {
           /* 火狐谷歌的文件下载方式 */
           /* 火狐谷歌的文件下载方式 */
           var blob = new Blob([response.data]);
           var blob = new Blob([response.data]);
           var downloadElement = document.createElement("a");
           var downloadElement = document.createElement("a");
           var href = window.URL.createObjectURL(blob);
           var href = window.URL.createObjectURL(blob);
           downloadElement.href = href;
           downloadElement.href = href;
-          let month = this.table_search.time ? this.$formatDate(this.table_search.time, "YYYY年MM月") : ''
-          downloadElement.download =  `${month}回复统计.xlsx`;
+          // let month = this.table_search.time
+          //   ? this.$formatDate(this.table_search.time, "YYYY年MM月")
+          //   : "";
+          downloadElement.download = `回复统计.xlsx`;
           document.body.appendChild(downloadElement);
           document.body.appendChild(downloadElement);
           downloadElement.click();
           downloadElement.click();
           document.body.removeChild(downloadElement);
           document.body.removeChild(downloadElement);
           window.URL.revokeObjectURL(href);
           window.URL.revokeObjectURL(href);
         }
         }
       });
       });
-        // this.$http({
-        //   url: "/CMKIssued/exportCMKIssuedReplyStatistics",
-        //   method: "post",
-        //   headers: {
-        //     "Content-Type": "application/json",
-        //   },
-        //   data: {
-        //     ...this.table_search,
-        //     time: this.table_search.time ? this.table_search.time : "",
-        //   },
-        //   responseType: "blob", // 解决下载的文件乱码空白等问题
-        // }).then(({ data }) => {
-        //   console.log(data,'data');
-        //   let url = window.URL.createObjectURL(new Blob([data]));
-        //   let a = document.createElement("a");
-        //   a.setAttribute("href", url);
-        //   //   a.setAttribute('download', scope.row.fileName)
-        //   a.click();
-        // });
+      // this.$http({
+      //   url: "/CMKIssued/exportCMKIssuedReplyStatistics",
+      //   method: "post",
+      //   headers: {
+      //     "Content-Type": "application/json",
+      //   },
+      //   data: {
+      //     ...this.table_search,
+      //     time: this.table_search.time ? this.table_search.time : "",
+      //   },
+      //   responseType: "blob", // 解决下载的文件乱码空白等问题
+      // }).then(({ data }) => {
+      //   console.log(data,'data');
+      //   let url = window.URL.createObjectURL(new Blob([data]));
+      //   let a = document.createElement("a");
+      //   a.setAttribute("href", url);
+      //   //   a.setAttribute('download', scope.row.fileName)
+      //   a.click();
+      // });
       console.log("我下载了");
       console.log("我下载了");
     },
     },
     handleSearch(data) {
     handleSearch(data) {
-      let obj = {
-        ...data,
-        time: data.time
-          ? this.$formatDate(data.time, "YYYY-MM")
-          : "",
-      };
-      console.log(obj,'obj');
-      this.table_search = data;
+      let obj = data;
+      Object.values(data).forEach((el, index) => {
+        if (el instanceof Array) {
+          obj[`start${Object.keys(data)[index]}`] = this.$formatDate(
+            el[0],
+            "YYYY-MM-DD HH:mm:ss"
+          );
+          obj[`end${Object.keys(data)[index]}`] = this.$formatDate(
+            el[1],
+            "YYYY-MM-DD HH:mm:ss"
+          );
+          delete data[`${Object.keys(data)[index]}`];
+        }
+      });
+      console.log(obj);
+      this.table_search = obj;
       this.handleReset();
       this.handleReset();
       this.handleInit({ ...obj });
       this.handleInit({ ...obj });
     },
     },
@@ -219,7 +226,13 @@ export default {
     },
     },
   },
   },
   mounted() {
   mounted() {
-    this.handleInit({ time: "" });
+    this.handleInit({
+      startTime: this.$formatDate(new Date(), "YYYY-MM-DD"),
+      endTime: this.$formatDate(
+        new Date().setDate(new Date().getDate() + 1),
+        "YYYY-MM-DD"
+      ),
+    });
   },
   },
 };
 };
 </script>
 </script>