guhongwei 5 лет назад
Родитель
Сommit
a7b49c9adc

+ 7 - 5
src/components/enterprise/enterprisexuqiu.vue

@@ -25,7 +25,7 @@
             </el-col>
           </el-col>
           <el-col :span="19" class="right">
-            <contextfabu v-on="$listeners" :columnName="columnName" :recruitData="recruitData"></contextfabu>
+            <contextfabu v-on="$listeners" :form="form" :columnList="columnList" :columnName="columnName" :recruitData="recruitData"></contextfabu>
           </el-col>
         </div>
       </el-col>
@@ -54,6 +54,8 @@ export default {
     columnName: null, //栏目名称
     recruitData: null,
     total: null,
+    columnList: null,
+    form: null,
   },
   components: {
     top, //头部
@@ -90,17 +92,17 @@ export default {
   overflow: hidden;
 }
 .main {
-  height: 900px;
+  height: 1100px;
   overflow: hidden;
   margin: 10px 0;
 }
 .left {
-  height: 900px;
+  height: 1100px;
   margin: 0 10px 0 0;
 }
 .leftDiao {
   background: #fff;
-  height: 530px;
+  height: 730px;
   overflow: hidden;
 }
 .leftTop {
@@ -111,7 +113,7 @@ export default {
 }
 .right {
   width: 940px;
-  height: 900px;
+  height: 1100px;
   background: #fff;
   overflow: hidden;
 }

+ 1 - 1
src/components/login.vue

@@ -16,7 +16,7 @@
       </el-col>
       <el-col :span="24" class="main">
         <div class="w_1200">
-          <mainInfo v-on="$listeners" :form="form" :forms="forms"></mainInfo>
+          <mainInfo v-on="$listeners" :form="form"></mainInfo>
         </div>
       </el-col>
       <el-col :span="24" class="foot">

+ 174 - 71
src/layout/enterprise/contextfabu.vue

@@ -6,103 +6,115 @@
           <el-tab-pane label="需求发布" name="first">
             <el-form ref="form" :model="form" label-width="80px">
               <el-form-item label="类别">
-                <el-select v-model="form.totaltype" placeholder="请选择类别" @change="indexSelect">
-                  <el-option label="服务" value="0" selected></el-option>
-                  <el-option label="产品" value="1"></el-option>
-                  <el-option label="技术" value="2"></el-option>
+                <el-select v-model="form.totaltype" placeholder="请选择类别" @change="selectType" prop="totaltype">
+                  <el-option v-for="(item, index) in typeList" :key="index" :value="item.value" :label="item.name"></el-option>
                 </el-select>
               </el-form-item>
               <el-col class="mingcheng" :span="24">
                 <el-form-item label="名称">
-                  <el-input v-model="form.totaltype" placeholder="请选择名称"></el-input>
+                  <el-input v-model="form.name" placeholder="请输入名称"></el-input>
                 </el-form-item>
               </el-col>
               <el-col class="mingcheng" :span="24">
-                <el-form-item label="类别">
-                  <el-select v-model="form.type" placeholder="请选择类型">
-                    <el-option label="服务" value="shanghai"></el-option>
-                    <el-option label="产品" value="beijing"></el-option>
-                    <el-option label="技术" value="beijings"></el-option>
+                <el-form-item label="类型">
+                  <el-select v-model="form.product_type_id" filterable @change="selectChild">
+                    <el-option v-for="(item, index) in columnList" :key="index" :value="item.id" :label="item.name"></el-option>
                   </el-select>
                 </el-form-item>
               </el-col>
-
-              <el-col :v-if="form.totaltype == 1">
-                <el-col class="mingcheng" :span="24">
-                  <el-form-item label="应用领域">
-                    <el-input v-model="form.name" placeholder="请选择名称"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col class="mingcheng" :span="24">
-                  <el-form-item label="服务范围">
-                    <el-input type="textarea" v-model="form.desc"></el-input>
-                  </el-form-item>
-                </el-col>
+              <!-- <el-col class="mingcheng" :span="24">
+                <el-form-item label="产品图片" v-model="form.url">
+                  <el-upload> </el-upload>
+                </el-form-item>
+              </el-col> -->
+              <el-col class="mingcheng" :span="24">
+                <el-form-item label="应用领域" prop="1" v-if="form.totaltype === '1' ? form.totaltype === '2' : 'qiya'">
+                  <el-input v-model="form.field" placeholder="请选择名称"></el-input>
+                </el-form-item>
               </el-col>
-              <el-col :v-else-if="form.totaltype == 0">
-                <el-col class="tables" :span="24">
-                  <el-form-item label="产品参数">
-                    <el-table :data="tableData" style="width: 100%">
-                      <el-table-column prop="date" label="参数名称" width="180"> </el-table-column>
-                      <el-table-column prop="name" label="参数内容" width="180"> </el-table-column>
-                    </el-table>
-                    <el-button type="primary">添加</el-button>
-                  </el-form-item>
-                </el-col>
+              <el-col class="mingcheng" :span="24">
+                <el-form-item label="服务范围" prop="2" v-if="form.totaltype === '0' ? form.totaltype === '1' : 'qiya'">
+                  <el-input type="textarea" v-model="form.scope"></el-input>
+                </el-form-item>
               </el-col>
-              <el-col :v-else="form.totaltype == 2">
-                <el-col class="mingcheng" :span="24">
-                  <el-form-item label="应用领域">
-                    <el-input v-model="form.name" placeholder="请选择名称"></el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col class="tables" :span="24">
-                  <el-form-item label="产品参数">
-                    <el-table :data="tableData" style="width: 100%">
-                      <el-table-column prop="date" label="参数名称" width="180"> </el-table-column>
-                      <el-table-column prop="name" label="参数内容" width="180"> </el-table-column>
-                    </el-table>
-                    <el-button type="primary">添加</el-button>
-                  </el-form-item>
-                </el-col>
+
+              <el-col class="mingcheng" :span="24">
+                <el-form-item label="产品参数" prop="2" v-if="form.totaltype === '1' ? form.totaltype === '2' : 'qiya'">
+                  <!-- <el-table :data="tableData" style="width: 100%">
+                    <el-table-column prop="arg_name" label="参数名称" width="180"> </el-table-column>
+                    <el-table-column prop="memo" label="参数内容" width="180"> </el-table-column>
+                  </el-table> -->
+                  <!-- <el-button type="primary">添加</el-button> -->
+                  <template>
+                    <div class="tableDate">
+                      <div class="button" style="width:6%;float:right;">
+                        <P><el-button class="el-icon-plus" @click.prevent="addRow()"></el-button></P>
+                        <p><el-button class="el-icon-minus" @click.prevent="delData()"></el-button></p>
+                      </div>
+                      <div class="table">
+                        <el-table :data="tableData" ref="table" tooltip-effect="dark" border stripe style="width: 93%" @selection-change="selectRow">
+                          <el-table-column type="selection" width="45" align="center"></el-table-column>
+                          <el-table-column label="序号" type="index" width="60" align="center"></el-table-column>
+
+                          <el-table-column label="产品参数">
+                            <template slot-scope="scope">
+                              <el-input class="arg_name" v-model="scope.row.require_des"></el-input>
+                            </template>
+                          </el-table-column>
+                          <el-table-column label="内容">
+                            <template slot-scope="scope">
+                              <el-input type="textarea" class="remark" v-model="scope.row.memo"></el-input>
+                            </template>
+                          </el-table-column>
+                        </el-table>
+                      </div>
+                    </div>
+                  </template>
+                </el-form-item>
                 <el-col class="mingcheng" :span="24">
-                  <el-form-item label="市场前景">
-                    <el-input type="textarea" v-model="form.desc"></el-input>
+                  <el-form-item label="市场前景" prop="2" v-if="form.totaltype === '2'">
+                    <el-input type="textarea" v-model="form.prospect"></el-input>
                   </el-form-item>
                 </el-col>
               </el-col>
 
               <el-col class="danjia" :span="24">
                 <el-form-item label="单价">
-                  <el-input v-model="form.name" placeholder="请选择名称"></el-input>
+                  <el-input v-model="form.userid" placeholder="请输入单价"></el-input>
                 </el-form-item>
               </el-col>
               <el-col class="mingcheng" :span="24">
                 <el-form-item label="单位">
-                  <el-select v-model="form.region" placeholder="请选择类型" id="select">
-                    <el-option label="公斤" value="shanghai"></el-option>
-                    <el-option label="套" value="beijing"></el-option>
-                    <el-option label="件" value="beijings"></el-option>
-                  </el-select>
+                  <el-input v-model="form.product_type_name" placeholder="请输入名称"></el-input>
                 </el-form-item>
               </el-col>
-              <el-col class="jiaoyi" :span="24">
+
+              <el-col class="mingcheng" :span="24">
                 <el-form-item label="交易方式">
-                  <el-radio-group v-model="form.resource">
-                    <el-radio label="转让"></el-radio>
-                    <el-radio label="共用"></el-radio>
-                    <el-radio label="竞价"></el-radio>
-                  </el-radio-group>
+                  <el-select v-model="form.business" placeholder="请选择交易方式">
+                    <el-option label="公用" value="0"></el-option>
+                    <el-option label="转让" value="1"></el-option>
+                    <el-option label="竞价" value="2"></el-option>
+                  </el-select>
+                </el-form-item>
+              </el-col>
+              <el-col class="mingcheng" :span="24">
+                <el-form-item label="研发阶段">
+                  <el-select v-model="form.phase" placeholder="请选择研发阶段">
+                    <el-option label="阶段成果" value="1"></el-option>
+                    <el-option label="最终成果" value="2"></el-option>
+                  </el-select>
                 </el-form-item>
               </el-col>
+
               <el-col class="mingcheng" :span="24">
                 <el-form-item label="简介">
-                  <el-input type="textarea" v-model="form.desc"></el-input>
+                  <el-input type="textarea" v-model="form.introduction"></el-input>
                 </el-form-item>
               </el-col>
               <el-col class="mingcheng" :span="24">
                 <el-form-item>
-                  <el-button type="primary" @click="onSubmit">发布</el-button>
+                  <el-button type="primary" @click="onSubmit" size="mini">{{ isNew ? '创建' : '发布' }}</el-button>
                 </el-form-item>
               </el-col>
             </el-form>
@@ -117,32 +129,123 @@
 <script>
 export default {
   name: 'contextfabu',
-  props: {},
+  props: {
+    isNew: { type: Boolean, default: false } /* 是否新创建 */,
+    form: null,
+    columnList: null,
+  },
+
   components: {},
   data: () => ({
-    tableData: [{}],
-    form: {},
+    tableData: [],
+    selectlistRow: [],
+    rowNum: 1,
+    typeList: [
+      { name: '服务', value: '0' },
+      { name: '产品', value: '1' },
+      { name: '技术', value: '2' },
+    ],
+
     activeName: 'first',
   }),
-  created() {},
+  created() {
+    if (!this.isNew) this.selectType(this.form.totaltype, 'into');
+  },
   computed: {},
   methods: {
-    indexSelect() {
-      let optionV = document.getElementById('select').value;
-      console.log(optionV);
+    selectChild(column_id) {
+      let res = this.columnList.filter(fil => fil.id === column_id);
+      if (res.length > 0) {
+        console.log(res[0].name);
+        this.$set(this.form, `product_type_name`, res[0].name);
+      }
+      this.$forceUpdate();
+    },
+    async selectType(item, totaltype) {
+      if (totaltype !== 'into') {
+        delete this.form.url;
+        delete this.form.content_id;
+      }
+      let result;
+      if (item === '2') {
+        // result = await this.allSearch({ totaltype: 'content', site: this.form.site });
+        // if (`${result.errcode}` === '0') this.$set(this, `typeList`, result.data);
+      } else if (item === '1') {
+        // result = await this.allSearch({ totaltype: 'url', site: this.form.site });
+        // if (`${result.errcode}` === '0') this.$set(this, `typeList`, result.data);
+      } else if (item === '0') {
+        // result = await this.allSearch({ totaltype: 'column', site: this.form.site });
+        // if (`${result.errcode}` === '0') this.$set(this, `typeList`, result.data);
+      }
     },
 
     onSubmit() {
-      console.log('submit!');
+      this.$emit('onsaves', { data: this.form });
     },
     handleClick(tab, event) {
       console.log(tab, event);
     },
+
+    // 获取表格选中时的数据
+    selectRow(val) {
+      this.selectlistRow = val;
+    },
+    // 增加行
+    addRow() {
+      var list = {
+        rowNum: this.rowNum,
+      };
+      this.tableData.unshift(list);
+      this.rowNum += 1;
+    },
+    // 删除方法
+    // 删除选中行
+    delData() {
+      for (let i = 0; i < this.selectlistRow.length; i++) {
+        let val = this.selectlistRow;
+        // 获取选中行的索引的方法
+        // 遍历表格中tableData数据和选中的val数据,比较它们的rowNum,相等则输出选中行的索引
+        // rowNum的作用主要是为了让每一行有一个唯一的数据,方便比较,可以根据个人的开发需求从后台传入特定的数据
+        val.forEach((val, index) => {
+          this.tableData.forEach((v, i) => {
+            if (val.rowNum === v.rowNum) {
+              // i 为选中的索引
+              this.tableData.splice(i, 1);
+            }
+          });
+        });
+      }
+      // 删除完数据之后清除勾选框
+      this.$refs.table.clearSelection();
+    },
   },
 };
 </script>
 
 <style lang="less" scoped>
+.avatar-uploader .el-upload {
+  border: 1px dashed #d9d9d9;
+  border-radius: 6px;
+  cursor: pointer;
+  position: relative;
+  overflow: hidden;
+}
+.avatar-uploader .el-upload:hover {
+  border-color: #409eff;
+}
+.avatar-uploader-icon {
+  font-size: 28px;
+  color: #8c939d;
+  width: 178px;
+  height: 178px;
+  line-height: 178px;
+  text-align: center;
+}
+.avatar {
+  width: 178px;
+  height: 178px;
+  display: block;
+}
 .rightTop {
   height: 60px;
   width: 950px;

+ 208 - 7
src/layout/enterprise/contextfabus.vue

@@ -1,19 +1,220 @@
 <template>
-  <div id="contextfabusvue">
-    <p>contextfabusvue</p>
+  <div id="recruitLists">
+    <el-row>
+      <el-col :span="24" class="list">
+        <el-col :span="24" class="topTitle">
+          <el-col class="rightTopL"> 我的订购</el-col>
+        </el-col>
+
+        <el-col :span="24" class="tit">
+          <el-col> 我的订购</el-col>
+        </el-col>
+        <el-col :span="24" class="fbList">
+          <el-col class="fbListTop">信息号 <el-col class="fbListTopR"> </el-col></el-col>
+          <el-col class="fbListCenter">
+            <el-col class="fbListCenterL">图片</el-col>
+            <el-col :span="24" class="fbListCenterC">
+              <el-col class="listName">名字</el-col>
+              <el-col class="listName">类别</el-col>
+              <el-col class="listMoney">名字</el-col>
+            </el-col>
+
+            <el-col :span="24" class="fbListCenterTwo">
+              <el-col :span="24" class="faTop">交易说明</el-col>
+              <el-col :span="24" class="faTxt"> 我要买</el-col>
+            </el-col>
+            <el-col :span="24" class="fbListCenterR"> </el-col>
+          </el-col>
+          <el-col :span="24"> </el-col>
+          <el-col v-for="(item, index) in recruitData" :key="index" >
+            <el-col :span="21" class="title textOver">{{ item.name }}</el-col>
+            <el-col :span="3" class="date">
+              {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
+            </el-col>
+          </el-col>
+          <!-- <el-table :data="recruitData" style="width: 100%" border>
+            <el-table-column label="名称" align="center">
+              <template slot-scope="scoped">
+                <el-tooltip effect="dark" content="点击显示详情" placement="left">
+                  <el-col :span="24" @click.native="clickDetailcm(scoped.row)">{{ scoped.row.name }}</el-col>
+                </el-tooltip>
+              </template>
+            </el-table-column>
+            <el-table-column prop="infotype" label="信息类型" align="center"> </el-table-column>
+            <el-table-column prop="user_name" label="发布人" align="center"> </el-table-column>
+          </el-table> -->
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
 export default {
-  name: 'contextfabusvue',
-  props: {},
+  name: 'recruitLists',
+  props: {
+    recruitData: null,
+    columnName: null,
+    total: null,
+  },
   components: {},
-  data: () => ({}),
+  data: () => ({
+    currentPage: 1,
+  }),
   created() {},
   computed: {},
-  methods: {},
+  methods: {
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+    clickDetailcm(row) {
+      this.$emit('detailcm', { data: row });
+    },
+  },
 };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="less" scoped>
+.list {
+  height: 740px;
+
+  overflow: hidden;
+}
+.topTitle {
+  height: 60px;
+  width: 950px;
+  line-height: 60px;
+  border-bottom: 1px solid #215299;
+}
+.rightTopL {
+  width: 130px;
+  height: 60px;
+  float: left;
+  color: rgb(255, 255, 255);
+  font-size: 18px;
+  text-align: center;
+  font-family: 微软雅黑, Tahoma, Arial, Helvetica, STHeiti;
+  background: rgb(33, 82, 153);
+}
+
+.tit {
+  background-color: #ffffff;
+  padding: 30px 30px 0 30px;
+  line-height: 50px;
+  width: 890px;
+  height: 80px;
+  border-bottom: 1px solid #ccc;
+  background-color: #ffffff;
+  color: #215299;
+}
+.fbList {
+  width: 888px;
+  height: 183px;
+  border: 1px solid #ccc;
+  margin: 20px 0 0 20px;
+}
+
+.fbListTop {
+  height: 43px;
+  margin-left: 1px;
+  background: #fafafa;
+  line-height: 43px;
+  text-indent: 10px;
+  font-size: 13px;
+  color: #888888;
+}
+
+.fbListCenter {
+  width: 870px;
+  height: 119px;
+  margin: 20px 0 0 12px;
+}
+
+.fbListTopR {
+  float: right;
+}
+
+.fbListCenterL {
+  width: 100px;
+  height: 100px;
+  background-color: #ffffff;
+}
+.listName {
+  width: 196px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  height: 30px;
+  font-size: 16px;
+  color: #555555;
+}
+.fbListCenterC {
+  width: 196px;
+  border-right: 1px solid #ccc;
+  float: left;
+  padding-right: 20px;
+  height: 100px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+.listMoney {
+  height: 30px;
+  font-size: 16px;
+  color: #fe0000;
+  width: 196px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+.fbListCenterTwo {
+  width: 385px;
+  float: left;
+  margin-left: 10px;
+  margin-right: 10px;
+  background: #fafafa;
+  height: 100px;
+}
+.faTop {
+  padding-left: 10px;
+  width: 374px;
+  font-size: 14px;
+  height: 35px;
+  line-height: 35px;
+  color: #215299;
+}
+
+.faTxt {
+  padding-left: 10px;
+  width: 374px;
+  height: 55px;
+  font-size: 14px;
+  word-break: break-all;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 3;
+  overflow: hidden;
+}
+.fbListCenterR {
+  border-left: 1px solid #ccc;
+  width: 125px;
+  height: 100px;
+  float: left;
+}
+
+.fbListCenterR {
+  margin-left: 20px;
+  font-size: 14px;
+  color: #215299;
+  float: left;
+}
+.page {
+  padding: 11px 0 0 0;
+  text-align: center;
+}
+</style>

+ 243 - 7
src/layout/enterprise/contextfabuxx.vue

@@ -1,19 +1,255 @@
 <template>
-  <div id="">
-    <p>contextfabuxxvue</p>
+  <div id="recruitLists">
+    <el-row>
+      <el-col :span="24" class="list">
+        <el-col :span="24" class="topTitle">
+          <el-col>
+            <template>
+              <el-col class="sd">
+                <el-tabs v-model="activeName" @tab-click="handleClick">
+                  <el-tab-pane label="我的需求" name="first">
+                    <template>
+                      <el-col class="xx">
+                        <el-tabs v-model="activeName1" @tab-click="handleClick">
+                          <el-tab-pane label="我的供给" name="first1">
+                            <el-col :span="24" class="fbList">
+                              <el-col :span="12">
+                                <el-col class="fbListTop">信息号 <span>信息发布</span></el-col></el-col
+                              >
+                              <el-col class="fbListCenter">
+                                <el-col class="fbListCenterL">图片</el-col>
+                                <el-col :span="24" class="fbListCenterC">
+                                  <el-col class="listName">名字</el-col>
+                                  <el-col class="listName">类别</el-col>
+                                  <el-col class="listMoney">名字</el-col>
+                                </el-col>
+
+                                <el-col :span="24" class="fbListCenterTwo">
+                                  <el-col :span="24" class="faTop">交易说明</el-col>
+                                  <el-col :span="24" class="faTxt"> 我要买</el-col>
+                                </el-col>
+                                <el-col :span="24" class="fbListCenterR"> </el-col>
+                              </el-col>
+                              <el-col :span="24"> </el-col>
+                              <!-- <el-col v-for="(item, index) in recruitData" :key="index" @click="$emit('fetch', item.id)">
+                            <el-col :span="21" class="title textOver">{{ item.name }}</el-col>
+                            <el-col :span="3" class="date">
+                              {{ item.meta && item.meta.createdAt ? new Date(item.meta.createdAt).toLocaleDateString() : '' || '' }}
+                            </el-col>
+                          </el-col> -->
+                            </el-col></el-tab-pane
+                          >
+                          <el-tab-pane label="已经审核" name="second1">配置管理</el-tab-pane>
+                          <el-tab-pane label="未审核" name="third1">角色管理</el-tab-pane>
+                        </el-tabs>
+                      </el-col>
+                    </template>
+                  </el-tab-pane>
+                  <el-tab-pane label="交易成功" name="second">配置管理</el-tab-pane>
+                </el-tabs>
+              </el-col>
+            </template>
+          </el-col>
+        </el-col>
+      </el-col>
+    </el-row>
   </div>
 </template>
 
 <script>
 export default {
-  name: '',
-  props: {},
+  name: 'recruitLists',
+  props: {
+    recruitData: null,
+    columnName: null,
+    total: null,
+  },
   components: {},
-  data: () => ({}),
+  data: () => ({
+    currentPage: 1,
+    activeName: 'second',
+    activeName1: 'second1',
+  }),
   created() {},
   computed: {},
-  methods: {},
+  methods: {
+    handleClick(tab, event) {
+      console.log(tab, event);
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+    },
+    clickDetailcm(row) {
+      this.$emit('detailcm', { data: row });
+    },
+  },
 };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="less" scoped>
+.list {
+  height: 740px;
+
+  overflow: hidden;
+}
+.topTitle {
+  height: 60px;
+  width: 950px;
+  line-height: 60px;
+  border-bottom: 1px solid #215299;
+}
+.rightTopL {
+  width: 130px;
+  height: 60px;
+  float: left;
+  color: rgb(255, 255, 255);
+  font-size: 18px;
+  text-align: center;
+  font-family: 微软雅黑, Tahoma, Arial, Helvetica, STHeiti;
+  background: rgb(33, 82, 153);
+}
+
+.tit {
+  background-color: #ffffff;
+  padding: 30px 30px 0 30px;
+  line-height: 50px;
+  width: 890px;
+  height: 80px;
+  border-bottom: 1px solid #ccc;
+  background-color: #ffffff;
+  color: #215299;
+}
+.el-tabs__item.is-active {
+  color: #ffffff;
+}
+.fbList {
+  width: 888px;
+  height: 227px;
+  border: 1px solid #ccc;
+  margin: 20px 0 0 20px;
+}
+
+.fbListTop {
+  height: 43px;
+  margin-left: 1px;
+  background: #fafafa;
+  line-height: 43px;
+  text-indent: 10px;
+  font-size: 13px;
+  color: #888888;
+}
+
+.fbListCenter {
+  width: 870px;
+  height: 119px;
+  margin: 20px 0 0 12px;
+}
+
+.fbListTopR {
+  float: right;
+}
+/deep/.sd.el-tabs__item.is-active {
+  color: #ffffff;
+  background-color: #215299;
+}
+/deep/.xx.el-tabs__item.is-active {
+  background-color: #ffffff;
+}
+
+.fbListCenterL {
+  width: 100px;
+  height: 100px;
+  background-color: #ffffff;
+}
+.listName {
+  width: 196px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  height: 44px;
+  font-size: 16px;
+  color: #555555;
+}
+.fbListCenterC {
+  width: 196px;
+  border-right: 1px solid #ccc;
+  float: left;
+  padding-right: 20px;
+  height: 100px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+.listMoney {
+  height: 30px;
+  font-size: 16px;
+  color: #fe0000;
+  width: 196px;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+}
+
+/deep/.el-tabs__item {
+  padding: 0 20px;
+  height: 46px;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+  line-height: 40px;
+  display: inline-block;
+  list-style: none;
+  font-size: 14px;
+  font-weight: 500;
+  color: #303133;
+  position: relative;
+}
+.fbListCenterTwo {
+  width: 385px;
+  float: left;
+  margin-left: 10px;
+  margin-right: 10px;
+  background: #fafafa;
+  height: 100px;
+}
+.faTop {
+  padding-left: 10px;
+  width: 374px;
+  font-size: 14px;
+  height: 35px;
+  line-height: 35px;
+  color: #215299;
+}
+
+.faTxt {
+  padding-left: 10px;
+  width: 374px;
+  height: 55px;
+  font-size: 14px;
+  word-break: break-all;
+  text-overflow: ellipsis;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  -webkit-line-clamp: 3;
+  overflow: hidden;
+}
+.fbListCenterR {
+  border-left: 1px solid #ccc;
+  width: 125px;
+  height: 100px;
+  float: left;
+}
+
+.fbListCenterR {
+  margin-left: 20px;
+  font-size: 14px;
+  color: #215299;
+  float: left;
+}
+.page {
+  padding: 11px 0 0 0;
+  text-align: center;
+}
+</style>

+ 2 - 0
src/store/index.js

@@ -18,6 +18,7 @@ import policiesjbxx from './policiesjbxx';
 import market from './market';
 import enterpriseproject from './enterpriseproject';
 import transaction from './transaction';
+import marketproduct from './marketproduct';
 
 Vue.use(Vuex);
 
@@ -41,6 +42,7 @@ export default new Vuex.Store({
     market,
     enterpriseproject,
     transaction,
+    marketproduct,
   },
   state: {},
   mutations: {},

+ 38 - 0
src/store/marketproduct.js

@@ -0,0 +1,38 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  newsInfo: `/api/market/product`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.newsInfo}`, { skip, limit, ...info });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 2 - 1
src/views/enterprise/enterprisefabu.vue

@@ -10,6 +10,7 @@ import enterprisexxDetail from '@/components/enterprise/enterprisexx.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapSite } = createNamespacedHelpers('site');
 const { mapActions: mapRecruit } = createNamespacedHelpers('market');
+const { mapActions: marketproduct } = createNamespacedHelpers('marketproduct');
 export default {
   name: 'adviserList',
   props: {},
@@ -29,7 +30,7 @@ export default {
   methods: {
     ...mapSite(['showInfo']),
     ...mapRecruit({ columnList: 'query', columnInfo: 'fetch' }),
-
+    ...marketproduct({ columnList: 'query', columnInfo: 'fetch', marketcerate: 'create' }),
     // 查询站点信息
     async searchSite() {
       let res = await this.showInfo();

+ 45 - 3
src/views/enterprise/enterprisexuqiu.vue

@@ -1,6 +1,13 @@
 <template>
   <div id="adviserList">
-    <enterprisexuqiu-detail :info="info" :liebiaoList="liebiaoList" @onsave="onsaveClick"></enterprisexuqiu-detail>
+    <enterprisexuqiu-detail
+      :info="info"
+      :columnList="columnList"
+      :liebiaoList="liebiaoList"
+      @onsaves="onsaveClicks"
+      :form="form"
+      @onsave="onsaveClick"
+    ></enterprisexuqiu-detail>
     <!-- @detailcm="clickDetailcm" -->
   </div>
 </template>
@@ -10,6 +17,7 @@ import enterprisexuqiuDetail from '@/components/enterprise/enterprisexuqiu.vue';
 import { createNamespacedHelpers, mapGetters } from 'vuex';
 const { mapActions: mapSite } = createNamespacedHelpers('site');
 const { mapActions: mapRecruit } = createNamespacedHelpers('market');
+const { mapActions: marketproduct } = createNamespacedHelpers('marketproduct');
 export default {
   name: 'adviserList',
   props: {},
@@ -21,15 +29,35 @@ export default {
     liebiaoList: [{ name: '基本信息' }, { name: '消息管理' }, { name: '我的发布' }, { name: '我的订购' }, { name: '注销账号' }],
     columnName: '',
     recruitData: [],
+    columnList: [],
+    form: {},
   }),
   created() {
+    this.search();
     this.searchSite();
   },
-  computed: {},
+  computed: {
+    id() {
+      return this.$route.query.id;
+    },
+    keyWord() {
+      let meta = this.$route.meta;
+      let main = meta.title || '';
+      return main;
+    },
+  },
   methods: {
     ...mapSite(['showInfo']),
-    ...mapRecruit({ columnList: 'query', columnInfo: 'fetch' }),
 
+    ...marketproduct({ columnList: 'query', columnInfo: 'fetch', marketcerate: 'create' }),
+    async search() {
+      this.loading = false;
+      if (this.$route.query.id) {
+        const res = await this.columnInfo(this.id);
+        this.$set(this, `form`, res.data);
+      }
+      this.loading = true;
+    },
     // 查询站点信息
     async searchSite() {
       let res = await this.showInfo();
@@ -53,6 +81,20 @@ export default {
         this.$router.push({ path: '/enterprise/enterprisedg' });
       }
     },
+    async onsaveClicks(form) {
+      let data = this.form;
+      console.log(data);
+      let res;
+      let msg;
+      if (data.id) {
+        res = await this.columnInfo(data);
+        msg = `${this.keyWord}修改成功`;
+      } else {
+        res = await this.marketcerate(data);
+        msg = `${this.keyWord}添加成功`;
+      }
+      if (this.$checkRes(res, msg)) this.$router.push({ path: '/policy/index' });
+    },
   },
 };
 </script>