xgwangman 4 年 前
コミット
77872bf511

+ 6 - 6
src/api/api.js

@@ -8,7 +8,7 @@ export const scribeData = data => fetch.post('/entniche/subscribe/index', data);
 
 // 订阅设置页面接口
 // 订阅与分发开关
-export const subdis = data => fetch.get('/entniche/subscribe/subdis', data,true);
+export const subdis = data => fetch.post('/entniche/subscribe/subdis', data,true);
 // 获取区域设置
 export const areaGetdata = data => fetch.post('/entniche/subscribe/area/get', data);
 // 修改区域订阅设置
@@ -28,15 +28,15 @@ export const scribeKey = data => fetch.post('/entniche/subscribe/key/get', data)
 // 修改关键词设置
 export const updateKeys = data => fetch.post('/entniche/subscribe/key/update', data);
 // 全员无差别开关
-export const nodiff = data => fetch.get('/entniche/distribute/nodiff', data,true);
+export const nodiff = data => fetch.post('/entniche/distribute/nodiff', data,true);
 // 分发设置列表
 export const nodiffList = data => fetch.post('/entniche/distribute/list', data);
 // 统一订阅数据导出接口
-export const subscribeExport = data => fetch.get('/entdataexport/subscribeExport', data,true);
+export const subscribeExport = data => fetch.post('/entdataexport/subscribeExport', data,true);
 // 修改推送设置
-export const updatePush = data => fetch.get('/entniche/subscribe/pushset/update', data, true);
+export const updatePush = data => fetch.post('/entniche/subscribe/pushset/update', data, true);
 // 修改项目匹配
-export const projectUpdate = data => fetch.get('/entniche/subscribe/projectmatch/update', data, true);
+export const projectUpdate = data => fetch.post('/entniche/subscribe/projectmatch/update', data, true);
 // 修改采购单位行业设置
 export const buyerUpdate = data => fetch.post('/entniche/subscribe/buyerclass/update', data);
 // 新增分发设置
@@ -44,7 +44,7 @@ export const addDistribute = data => fetch.post('/entniche/distribute/add', data
 // 修改分发规则
 export const updateDistribute = data => fetch.post('/entniche/distribute/update', data);
 // 删除分发规则
-export const deleteDistribute = data => fetch.get('/entniche/distribute/delete', data, true);
+export const deleteDistribute = data => fetch.post('/entniche/distribute/delete', data, true);
 
 
 

+ 20 - 4
src/views/bus/components/distribute.vue

@@ -127,9 +127,9 @@ export default {
                 this.tableData.push({
                     id: el.id,
                     area: String(arr.join(",").replace(/,/g, "、")),
-                    buyerclass: String(el.buyerclass.join(",").replace(/,/g, "、")),
-                    persons: String(el.persons.join(",").replace(/,/g, "、")),
-                    items: String(el.items.join(",").replace(/,/g, "、"))
+                    buyerclass: el.buyerclass?String(el.buyerclass.join(",").replace(/,/g, "、")):'',
+                    persons: el.persons?String(el.persons.join(",").replace(/,/g, "、")):'',
+                    items: el.items?String(el.items.join(",").replace(/,/g, "、")):''
                 })
             });
         })
@@ -247,7 +247,23 @@ export default {
                         message: '添加成功',
                         type: 'success'
                     });
-                    nodiffList().then(res => {});
+                    // nodiffList().then(res => {
+                    //     this.tableData1 = res.data.rules;
+                    //     res.data.rules.forEach((el,i) => {
+                    //         let arr = [];
+                    //         for (let ares in el.area) {
+                    //             arr.push(ares)
+                    //         }
+                            // this.tableData.push({
+                            //     id: el.id,
+                            //     persons: this.addForm.people.split(',').replace(/,/g, "、"),
+                            //     items: this.addForm.name.split(',').replace(/,/g, "、"),
+                            //     area: this.addForm.split(',').replace(/,/g, "、"),
+                            //     buyerclass: this.addForm.indeus.split(',').replace(/,/g, "、")
+                            // })
+                            // conosle.log(this.tableData)
+                    //     });
+                    // })
                     this.addForm = {
                         name: '选择分类名称',
                         indeus: '选择采购单位行业'

+ 7 - 3
src/views/bus/components/editBox.vue

@@ -34,7 +34,11 @@
                                 <li v-for="item in groupData2" :key="item.id" class="li_data">
                                     <h3>{{item.letter}}</h3>
                                     <el-checkbox-group v-model="boxData.buyerclass">
-                                        <el-checkbox-button v-for="ite in item.list" :key="ite.id" :label="ite.name">{{ite.name}}</el-checkbox-button>
+                                        <el-checkbox-button 
+                                            v-for="ite in item.list" 
+                                            :key="ite.id" 
+                                            :label="ite.name"
+                                        >{{ite.name}}</el-checkbox-button>
                                     </el-checkbox-group>
                                 </li>
                             </ul>
@@ -80,7 +84,8 @@ import { industryData2, industryData3 } from'@/assets/js/industry_data.js';
 export default {
     props: {
         digs: Number,
-        boxData: {}
+        boxData: {},
+        boxFen: {}
     },
     data() {
         return {
@@ -136,7 +141,6 @@ export default {
                     
                     let current = this.InformatioType.find(n =>{
                         let reg = new RegExp(n);
-                        console.log(reg,"ddddd")
                         if(v.title.match(reg)){
                             return n
                         }

+ 50 - 38
src/views/bus/components/fenBox.vue

@@ -8,48 +8,51 @@
       center
     >
       <div class="content">
-        <div class="content_left">
-          <h4>选择</h4>
-          <div class="search">
-            <el-input v-model="searchVal" placeholder="搜索">
-              <template slot="prepend">
-                <img src="../../../assets/images/search.jpg" alt />
-              </template>
-            </el-input>
-          </div>
-          <div class="allList">
-            <div v-for="(item,i) in deal_personList" :key="item.id">
-              <h5>
-                <i class="seleced" @click="selectGroup(item,i)" :class="item.status"></i>
-                <span class="noselect" @click="toggle(item,i)">{{ item.name }}</span>
-                <i class="el-icon-arrow-down"></i>
-              </h5>
-              <div class="itemList" :class="{toggle:!item.toggle}">
-                <div
-                  v-for="val in item.users"
-                  :key="val.user_id"
-                  @click="chooseUser(val,'single')"
-                  :class="{active:val.checked}"
-                >
-                  <span class="userName">{{ val.username }}</span>
-                  <span>{{ val.phone }}</span>
+        <h2>选择分发人员</h2>
+        <div class="conts">
+          <div class="content_left">
+            <h4>选择</h4>
+            <div class="search">
+              <el-input v-model="searchVal" placeholder="搜索">
+                <template slot="prepend">
+                  <img src="../../../assets/images/search.jpg" alt />
+                </template>
+              </el-input>
+            </div>
+            <div class="allList">
+              <div v-for="(item,i) in deal_personList" :key="item.id">
+                <h5>
+                  <i class="seleced" @click="selectGroup(item,i)" :class="item.status"></i>
+                  <span class="noselect" @click="toggle(item,i)">{{ item.name }}</span>
+                  <i class="el-icon-arrow-down"></i>
+                </h5>
+                <div class="itemList" :class="{toggle:!item.toggle}">
+                  <div
+                    v-for="val in item.users"
+                    :key="val.user_id"
+                    @click="chooseUser(val,'single')"
+                    :class="{active:val.checked}"
+                  >
+                    <span class="userName">{{ val.username }}</span>
+                    <span>{{ val.phone }}</span>
+                  </div>
                 </div>
               </div>
             </div>
           </div>
-        </div>
-        <div class="content_right">
-          <h4>已选</h4>
-          <ul>
-            <li v-for="(item,i) in selectedList" :key="item.id">
-              <span class="userName">{{ item.username }}</span>
-              <span>{{ item.phone }}</span>
-              <i class="el-icon-error" @click="delChooseUser(i)"></i>
-            </li>
-          </ul>
+          <div class="content_right">
+            <h4>已选</h4>
+            <ul>
+              <li v-for="(item,i) in selectedList" :key="item.id">
+                <span class="userName">{{ item.username }}</span>
+                <span>{{ item.phone }}</span>
+                <i class="el-icon-error" @click="delChooseUser(i)"></i>
+              </li>
+            </ul>
+          </div>
         </div>
       </div>
-      <p v-if="currentIndex == 0">已选择{{ personList.checked }}人共购买{{ personList.quota }}人</p>
+      <p v-if="currentIndex == 0">已选择{{ selectedList.length }}人共购买{{ personList.quota }}人</p>
       <span slot="footer" class="dialog-footer btns">
         <button @click="saveDepart" class="save">保存</button>
         <button @click="centerDialogVisible = false" class="cancle">取消</button>
@@ -267,10 +270,19 @@ export default {
   .el-dialog__header {
     font-size: 26px;
     color: $weight_color;
+    padding: 0;
   }
   .content {
-    display: flex;
-    justify-content: space-between;
+    h2 {
+      padding: 0 0 40px 0;
+      text-align: center;
+      font-size: 20px;
+      line-height: 26px;
+    }
+    .conts {
+      display: flex;
+      justify-content: space-between;
+    }
     .content_left,
     .content_right {
       width: 400px;

+ 1 - 1
src/views/bus/components/subMage.vue

@@ -170,7 +170,7 @@ export default {
         // 获取订阅设置首页
         scribeData().then(res => {
             this.bookForm.dispense = res.data.subdis == '1' ? true : false;
-            this.boxData = res.data.subscribe;
+            this.boxData = res.data.subscribe.buyerclass?res.data.subscribe:[];
             this.bookForm.tuiRadio = res.data.subscribe.ratemode;
             this.bookForm.proPei = res.data.subscribe.projectmatch == '1' ? true : false;
             this.bookForm.indust = String(res.data.subscribe.buyerclass.join(",").replace(/,/g, "、"));

+ 3 - 3
vue.config.js

@@ -19,7 +19,7 @@ module.exports = {
         // target: "http://ent-xzhs.jianyu360.cn",
         // target: "http://127.0.0.1:815",
         // target:'http://192.168.20.214:815',//任
-        target:'http://192.168.20.241:815',
+        target:'http://192.168.20.175:815',
         changeOrigin: true,
         ws: true,
         pathRewrite: {
@@ -28,7 +28,7 @@ module.exports = {
       },
       "/entniche": {
         // target: "http://ent-xzhs.jianyu360.cn",
-        target: "http://192.168.20.241:812",
+        target: "http://192.168.20.175:812",
         // target: "http://127.0.0.1:812",
         // target:'http://192.168.20.214:812',//任
         changeOrigin: true,
@@ -40,7 +40,7 @@ module.exports = {
       "^/entdataexport": {
         // target: "http://ent-xzhs.jianyu360.cn",
         // target: "https://app2-jytest.jianyu360.cn",
-        target:'http://192.168.20.241:813',
+        target:'http://192.168.20.175:813',
         // target:'http://192.168.20.241:812',
         changeOrigin: true,
         ws: true,