Quellcode durchsuchen

feat(关键字匹配):

youchen vor 10 Monaten
Ursprung
Commit
5e43127dfb

+ 79 - 0
src/api/business/as/keyword.js

@@ -0,0 +1,79 @@
+import request from "@/utils/request";
+
+import qs from 'qs';
+
+
+//查询关键字列表
+export function list(param) {
+  return request({
+    url: 'mk/keyword/list',
+    method: 'get',
+    params: param
+  })
+}
+
+//新增关键字
+export function add(data) {
+  return request({
+    url: 'mk/keyword',
+    method: 'post',
+    data: data
+  })
+}
+
+//根据id查询关键字详情
+export function detail(param) {
+  return request({
+    url: `mk/keyword/${param}`,
+    method: 'get',
+  })
+}
+
+//根据id删除关键字
+export function remove(data) {
+  return request({
+    url: `mk/keyword`,
+    method: 'delete',
+    params: data,
+  })
+}
+
+//修改关键字启动状态
+export function upAndDown(data) {
+  console.log("data",data)
+  return request({
+    url: `mk/keyword/updateStatus`,
+    method: 'put',
+    data: data,
+  })
+}
+
+//修改关键字子表启动状态
+export function itemUpAndDown(data) {
+  console.log("data",data)
+  return request({
+    url: `mk/keywordItem/updateStatus`,
+    method: 'put',
+    data: data,
+  })
+}
+
+//修改关键字主表
+export function edit(data) {
+  console.log("data",data)
+  return request({
+    url: `mk/keyword`,
+    method: 'put',
+    data: data,
+  })
+}
+
+//修改关键字子表
+export function editItem(data) {
+  console.log("data",data)
+  return request({
+    url: `mk/keywordItem`,
+    method: 'put',
+    data: data,
+  })
+}

+ 5 - 0
src/router/index.js

@@ -129,6 +129,11 @@ export const constantRoutes = [
     hidden: true
   },
   {
+    path: '/business/as/keyword',
+    component: () => import('@/views/business/as/keyword/index'),
+    hidden: true
+  },
+  {
     path: '/business/newsLink',
     component: () => import('@/views/business/newsLink/index'),
     hidden: true

+ 692 - 0
src/views/business/as/keyword/index.vue

@@ -0,0 +1,692 @@
+<template>
+  <div class="keyword">
+    <el-form ref="queryParam" :model="queryParam" size="small" :inline="true" label-width="100px">
+      <el-row type="flex" justify="space-between">
+        <el-col :span="21">
+          <el-form-item label="条件组合名称">
+            <el-input v-model="queryParam.conditionCombinationName" placeholder="请输入内容" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="生效状态">
+            <el-select v-model="queryParam.status" filterable placeholder="请选择" clearable>
+              <el-option
+                v-for="item in statusOption"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="关键字">
+            <el-input v-model="queryParam.keyword" placeholder="请输入内容" clearable></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="3">
+          <el-form-item>
+            <el-button type="primary" size="mini" @click="handleSearch" icon="el-icon-search">搜索</el-button>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-row type="flex" justify="end">
+      <el-col :span="3">
+        <el-button type="primary" size="mini" @click="handleAdd" icon="el-icon-plus">新增</el-button>
+      </el-col>
+    </el-row>
+    <el-divider></el-divider>
+    <el-table
+      :data="tableDataList"
+      :height="tableHeight"
+      style="width: 100%"
+      :header-cell-style="{'text-align':'center'}"
+      @row-dblclick="handleDblclick">
+      <el-table-column
+        label="序号"
+        width="100"
+        align="center">
+        <template slot-scope="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="conditionCombinationName"
+        label="条件组合名称"
+        width="260"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="combinationFunctionDescription"
+        label="组合作用描述"
+        width="300"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="conditionLogic"
+        label="条件逻辑"
+        width="200"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="status"
+        label="状态"
+        width="175"
+        align="center">
+        <template slot-scope="scope">
+          {{getChangeType(scope.row.status)}}<!--调用getChangeType方法-->
+        </template>
+      </el-table-column>
+      <el-table-column
+        prop="keyword"
+        label="关键字"
+        width="260"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        prop="remark"
+        label="备注"
+        width="280"
+        align="center">
+      </el-table-column>
+      <el-table-column
+        label="操作"
+        align="center">
+        <template slot-scope="scope">
+          <el-button type="text" size="small" @click="handleEdit(scope.row)">编辑</el-button>
+          <el-button type="text" size="small" @click="handleUpAndDown(scope.row)"> {{scope.row.status == '0' ?"停用":"启用"}}</el-button>
+          <el-button type="text" size="text" @click="handleRemove(scope.row)" >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page=this.queryParam.pageNum
+      :page-sizes="[10, 20, 50, 100]"
+      :page-size=this.queryParam.pageSize
+      layout="total, sizes, prev, pager, next, jumper"
+      :total=this.total>
+    </el-pagination>
+
+    <el-dialog
+      :title="title"
+      :visible.sync="addFlag"
+      width="80%"
+      :before-close="handleClose">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-row>
+          <el-col :span="7">
+            <el-tag >主表规则</el-tag>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7">
+            <el-form-item label="条件组合名称" prop="conditionCombinationName">
+              <el-input v-model="form.conditionCombinationName" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="组合作用描述" prop="combinationFunctionDescription">
+              <el-input v-model="form.combinationFunctionDescription" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="条件逻辑" prop="conditionLogic">
+              <el-select v-model="form.conditionLogic" placeholder="请选择条件逻辑" clearable style="width: 100%">
+                <el-option
+                  v-for="item in conditionLogicOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row type="flex" justify="space-between">
+          <el-col :span="7">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="form.remark" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="3">
+            <el-button style="margin-left: 20px" size="mini" type="primary" @click="addDomain">新增子表规则</el-button>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7">
+            <el-tag >子表规则</el-tag>
+          </el-col>
+        </el-row>
+        <div v-for="(mkKeywordItem,index) in form.mkKeywordItems" :key="index">
+          <el-row>
+            <el-col :span="7">
+              <el-form-item :label="'字段名'+index" :prop="'mkKeywordItems.'+index+'.fieldName'" >
+                <el-input v-model="mkKeywordItem.fieldName" placeholder="请输入字段名" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item :label="'过滤条件'+index" :prop="'mkKeywordItems.'+index+'.filterCondition'" >
+                <el-input v-model="mkKeywordItem.filterCondition" placeholder="请输入过滤条件" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item :label="'过滤条件描述'+index" :prop="'mkKeywordItems.'+index+'.filterConditionDescription'">
+                <el-select v-model="mkKeywordItem.filterConditionDescription" placeholder="请选择过滤条件描述" clearable style="width: 100%">
+                  <el-option
+                    v-for="item in filterConditionDescriptionOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="7">
+              <el-form-item :label="'条件逻辑'+index" :prop="'mkKeywordItems.'+index+'.conditionLogic'" >
+                <el-select v-model="mkKeywordItem.conditionLogic" placeholder="请选择条件逻辑" clearable style="width: 100%">
+                  <el-option
+                    v-for="item in conditionLogicOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item :label="'关键字'+index" :prop="'mkKeywordItems.'+index+'.keyword'" >
+                <el-input v-model="mkKeywordItem.keyword" placeholder="请输入关键字" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="7">
+              <el-form-item :label="'备注'+index" :prop="'mkKeywordItems.'+index+'.remark'">
+                <el-input v-model="mkKeywordItem.remark" placeholder="请输入备注" clearable></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="3">
+              <div v-if="form.mkKeywordItems.length>'1'">
+                <el-button style="margin-left: 20px" size="mini" type="danger" @click="removeDomain(mkKeywordItem)">删除</el-button>
+              </div>
+            </el-col>
+          </el-row>
+        </div>
+
+      </el-form>
+      <el-button @click="handleCancel">取 消</el-button>
+      <el-button type="primary" @click="handleSubmit">确 定</el-button>
+    </el-dialog>
+
+    <el-dialog
+      :title="title"
+      :visible.sync="editFlag"
+      width="80%"
+      :before-close="handleClose">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-row>
+          <el-col :span="7">
+            <el-form-item label="条件组合名称" prop="conditionCombinationName">
+              <el-input v-model="form.conditionCombinationName" placeholder="请输入条件组合名称" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="组合作用描术" prop="combinationFunctionDescription">
+              <el-input v-model="form.combinationFunctionDescription" placeholder="请输入组合作用描术" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="条件逻辑" prop="conditionLogic">
+              <el-select v-model="form.conditionLogic" placeholder="请选择条件逻辑" clearable style="width: 100%">
+                <el-option
+                  v-for="item in conditionLogicOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="form.remark" placeholder="请输入备注" clearable></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <el-row type="flex" justify="end">
+        <el-button type="primary" @click="handleCancel">取 消</el-button>
+        <el-button type="primary" @click="handleEditSubmit">确 定</el-button>
+      </el-row>
+    </el-dialog>
+
+    <el-dialog
+      title="详情"
+      :visible.sync="detailFlag"
+      width="80%"
+      :before-close="handleClose">
+      <el-descriptions title="主表规则">
+        <el-descriptions-item label="条件组合名称">{{this.form.conditionCombinationName}}</el-descriptions-item>
+        <el-descriptions-item label="组合作用描述">{{ this.form.combinationFunctionDescription }}</el-descriptions-item>
+        <el-descriptions-item label="条件逻辑">{{ this.form.conditionLogic }}</el-descriptions-item>
+        <el-descriptions-item label="状态">{{getChangeType(this.form.status)}}</el-descriptions-item>
+        <el-descriptions-item label="备注">{{this.form.remark}}</el-descriptions-item>
+      </el-descriptions>
+      <div v-for="(mkKeywordItem,index) in this.form.mkKeywordItems" :key="index">
+      <el-descriptions title="子表规则" :column="4">
+        <el-descriptions-item label="字段名">{{mkKeywordItem.fieldName}}</el-descriptions-item>
+        <el-descriptions-item label="过滤条件">{{ mkKeywordItem.filterCondition }}</el-descriptions-item>
+        <el-descriptions-item label="过滤条件描述">{{ mkKeywordItem.filterConditionDescription }}</el-descriptions-item>
+        <el-descriptions-item label="条件逻辑">{{mkKeywordItem.conditionLogic}}</el-descriptions-item>
+      </el-descriptions>
+        <el-descriptions :column="4">
+        <el-descriptions-item label="状态">{{getChangeType(mkKeywordItem.status)}}</el-descriptions-item>
+        <el-descriptions-item label="关键字">{{mkKeywordItem.keyword}}</el-descriptions-item>
+        <el-descriptions-item label="备注">{{mkKeywordItem.remark}}</el-descriptions-item>
+        <el-descriptions-item >
+          <el-button type="text" @click="handleEditItem(mkKeywordItem)">编 辑</el-button>
+          <el-button type="text" @click="handleItemUpAndDown(mkKeywordItem)"> {{mkKeywordItem.status == '0' ?"停用":"启用"}}</el-button>
+        </el-descriptions-item>
+      </el-descriptions>
+
+      </div>
+      <el-row type="flex" justify="end">
+        <el-button type="primary" @click="handleDetailSubmit">确 定</el-button>
+      </el-row>
+    </el-dialog>
+
+    <el-dialog
+      :title="title"
+      :visible.sync="editItemFlag"
+      width="80%"
+      :before-close="handleEditItemClose">
+      <el-form ref="formEditItem" :model="formEditItem" label-width="120px">
+        <el-row>
+          <el-col :span="7">
+            <el-form-item label="字段名" prop="fieldName">
+              <el-input v-model="formEditItem.fieldName" placeholder="请输入字段名" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="过滤条件" prop="filterCondition">
+              <el-input v-model="formEditItem.filterCondition" placeholder="请输入过滤条件" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="过滤条件描述" prop="filterConditionDescription">
+              <el-select v-model="formEditItem.filterConditionDescription" placeholder="请选择过滤条件描述" clearable style="width: 100%">
+                <el-option
+                  v-for="item in filterConditionDescriptionOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="7">
+            <el-form-item label="条件逻辑" prop="conditionLogic">
+              <el-select v-model="formEditItem.conditionLogic" placeholder="请选择条件逻辑" clearable style="width: 100%">
+                <el-option
+                  v-for="item in conditionLogicOptions"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="关键字" prop="keyword">
+              <el-input v-model="formEditItem.keyword" placeholder="请输入关键字" clearable></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="7">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="formEditItem.remark" placeholder="请输入备注" clearable></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <el-row type="flex" justify="end">
+        <el-button type="primary" @click="handleEditItemCancel">取 消</el-button>
+        <el-button type="primary" @click="handleEditItemSubmit">确 定</el-button>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+<script>
+import {list, add, detail, remove, upAndDown, itemUpAndDown, edit, editItem} from '@/api/business/as/keyword'
+
+export default {
+  created() {
+    this.getTableHeight()
+    this.getTableDataList()
+  },
+  methods: {
+    getChangeType(e) {
+      for (var i = 0; i < this.statusOption.length; i++) {
+        if (this.statusOption[i].value === e) {
+          return this.statusOption[i].label;
+        }
+      }
+    },
+    handleUpAndDown(val){
+      if(val.status == '0'){
+        val.status = '2'
+      }else {
+        val.status = '0'
+      }
+      upAndDown(val).then(res =>{
+        if(res.code == 200){
+          this.$message.success('修改成功')
+        }
+      })
+    },
+    handleItemUpAndDown(val){
+      if(val.status == '0'){
+        val.status = '2'
+      }else {
+        val.status = '0'
+      }
+      itemUpAndDown(val).then(res =>{
+        if(res.code == 200){
+          this.$message.success('修改成功')
+        }
+      })
+    },
+    handleDblclick(row,event,colum){
+      detail(row.id).then(res =>{
+        if(res.code == 200){
+          this.form=res.data
+        }
+      })
+      this.detailFlag = true
+    },
+    handleSubmit(){
+      this.$refs["form"].validate((valid) =>{
+        if(valid){
+          add(this.form).then(res =>{
+            if(res.code == 200){
+              this.addFlag=false
+              this.$message.success("新增成功")
+              this.getTableDataList()
+            }
+          })
+        }
+      })
+    },
+    handleEditSubmit(){
+      edit(this.form).then(res =>{
+        if(res.code == 200){
+          this.$message.success('修改成功')
+          this.editFlag = false
+        }
+      })
+    },
+    handleEditItemSubmit(){
+      editItem(this.formEditItem).then(res =>{
+        if(res.code == 200){
+          this.$message.success('修改成功')
+          this.editItemFlag = false
+        }
+      })
+    },
+    handleDetailSubmit(){
+      this.detailFlag=false
+      this.formReset()
+    },
+    handleCancel(){
+      this.addFlag = false
+      this.editFlag = false
+      this.formReset()
+    },
+    handleEditItemCancel(){
+      this.editItemFlag=false
+      this.formEditItemReset()
+    },
+    formReset(){
+     this.form={
+       id:undefined,
+       conditionCombinationName: "",
+       combinationFunctionDescription: "",
+       conditionLogic: "",
+       status:'',
+       remark: "",
+       mkKeywordItems: [
+         {
+           fieldName: "",
+           filterCondition: "",
+           filterConditionDescription: "",
+           conditionLogic: "",
+           status:'',
+           keyword: "",
+           remark: "",
+         },
+       ],
+     }
+    },
+    formEditItemReset(){
+      this.formEditItem={
+        id:"",
+        fieldName: "",
+        filterCondition: "",
+        filterConditionDescription: "",
+        conditionLogic: "",
+        status:'',
+        keyword: "",
+        remark: "",
+      }
+    },
+    removeDomain(item) {
+      const index = this.form.mkKeywordItems.indexOf(item)
+      if (index !== -1) {
+        this.form.mkKeywordItems.splice(index, 1)
+      }
+    },
+    addDomain() {
+      this.form.mkKeywordItems.push({
+        fieldName: "",
+        filterCondition: "",
+        filterConditionDescription: "",
+        conditionLogic: "",
+        keyword: "",
+        remark: "",
+      });
+    },
+    //计算table高度(动态设置table高度)
+    getTableHeight() {
+      let tableH = 160; //距离页面下方的高度
+      let tableHeightDetil = window.innerHeight - tableH;
+      if (tableHeightDetil <= 300) {
+        this.tableHeight = 300;
+      } else {
+        this.tableHeight = window.innerHeight - tableH;
+      }
+    },
+    handleSearch() {
+      this.getTableDataList(this.queryParam)
+    },
+    handleSizeChange(val) {
+      this.queryParam.pageSize = val
+      this.getTableDataList()
+    },
+    handleCurrentChange(val) {
+      this.queryParam.pageNum = val
+      this.getTableDataList()
+    },
+    handleClose(done) {
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done()
+          this.formReset()
+        })
+        .catch(_ => {
+        });
+    },
+    handleEditItemClose(done){
+      this.$confirm('确认关闭?')
+        .then(_ => {
+          done()
+          this.formEditItemReset()
+        })
+        .catch(_ => {
+        });
+    },
+    getTableDataList() {
+      list(this.queryParam).then(res => {
+        if (res.code == 200) {
+          this.tableDataList = res.rows
+          this.total = res.total
+        }
+      })
+    },
+    handleAdd() {
+      this.title = '新增'
+      this.addFlag = true
+    },
+    handleRemove(val){
+      this.$confirm('确认删除?')
+        .then(_ => {
+          remove({ids:val.id}).then(res =>{
+            if(res.code == 200){
+              this.$message.success('删除成功')
+              this.getTableDataList()
+            }
+          })
+        })
+        .catch(_ => {
+        });
+
+    },
+    handleEdit(data){
+      this.title = '修改'
+      this.editFlag = true
+      this.form = data
+    },
+    handleEditItem(val){
+      this.title="编辑"
+      this.editItemFlag = true;
+      this.formEditItem =val
+    }
+  },
+  data() {
+    return {
+      filterConditionDescriptionOptions:[
+        {
+          value: '=',
+          label: '='
+        },
+        {
+          value: '>',
+          label: '>'
+        },
+        {
+          value: '<',
+          label: '<'
+        },
+        {
+          value: 'like',
+          label: 'like'
+        },
+        {
+          value: 'not like',
+          label: 'not like'
+        },
+
+      ],
+      conditionLogicOptions:[
+        {
+          value: 'and',
+          label: 'and'
+        },
+        {
+          value: 'or',
+          label: 'or'
+        },
+      ],
+      statusOption: [
+        {
+          value: '0',
+          label: '生效'
+        },
+        {
+          value: '2',
+          label: '未生效'
+        }
+      ],
+      title: '',
+      detailFlag: false,
+      addFlag: false,
+      editFlag: false,
+      editItemFlag: false,
+      tableHeight: '',
+      total: 0,
+      queryParam: {
+        conditionCombinationName: '',
+        status: '',
+        keyword: '',
+        pageSize: 10,
+        pageNum: 1
+      },
+      form: {
+        id:undefined,
+        conditionCombinationName: "",
+        combinationFunctionDescription: "",
+        conditionLogic: "",
+        status:'',
+        remark: "",
+        mkKeywordItems: [
+          {
+            fieldName: "",
+            filterCondition: "",
+            filterConditionDescription: "",
+            conditionLogic: "",
+            status:'',
+            keyword: "",
+            remark: "",
+          },
+        ],
+      },
+      formEditItem:{
+        id:"",
+        fieldName: "",
+        filterCondition: "",
+        filterConditionDescription: "",
+        conditionLogic: "",
+        status:'',
+        keyword: "",
+        remark: "",
+      },
+      rules: {
+        conditionCombinationName: [
+          {required: true, message: "请输入条件组合名称", trigger: "blur"}
+        ],
+        conditionLogic: [
+          {required: true, message: "请输入条件逻辑", trigger: "blur"}
+        ],
+        fieldName: [
+          {required: true, message: "请输入字段名", trigger: "blur"}
+        ],
+        filterCondition: [
+          {required: true, message: "请输入过滤条件", trigger: "blur"}
+        ],
+        filterConditionDescription: [
+          {required: true, message: "请输入字段名", trigger: "blur"}
+        ],
+        keyword: [
+          {required: true, message: "请输入关键字", trigger: "blur"}
+        ],
+      },
+      tableDataList: []
+    }
+  }
+}
+
+</script>
+<style>
+
+</style>

+ 11 - 6
src/views/business/bid/detail/bidingInfoDetail.vue

@@ -103,8 +103,11 @@
       </el-table>
     </el-descriptions-item>
     <el-descriptions-item label="附件">
-      <a :href="this.dataList.infoFileUrl" target="_blank" class="buttonText" style="color: #00afff">
-        {{ this.dataList.infoFileName}}</a>
+      <div v-for="(item,index) in this.dataList.infoNewFile">
+        <a :href="item.infoFileUrl" target="_blank" class="buttonText" style="color: #00afff">
+          {{ item.infoFileName}}</a>
+      </div>
+
     </el-descriptions-item>
   </el-descriptions>
   <el-descriptions class="margin-top" title="公告详情信息"  border>
@@ -286,10 +289,12 @@ export default {
     },
     getDetail(val){
       QueryById(val).then(res =>{
-        this.dataList=res.data
-        this.form.contractStartTime=this.dataList.zhongBiaoUnitTempDtos[0].contractStartTime
-        this.form.contractEndTime=this.dataList.zhongBiaoUnitTempDtos[0].contractEndTime
-        this.form.id= this.dataList.zhongBiaoUnitTempDtos[0].id
+        if(res.code == 200){
+          this.dataList=res.data
+          this.form.contractStartTime=this.dataList.zhongBiaoUnitTempDtos[0].contractStartTime
+          this.form.contractEndTime=this.dataList.zhongBiaoUnitTempDtos[0].contractEndTime
+          this.form.id= this.dataList.zhongBiaoUnitTempDtos[0].id
+        }
       })
     },
     // YMDHMS_daxiao(str1) {

+ 93 - 24
src/views/business/bid/detail/detail.vue

@@ -1,10 +1,11 @@
 <template>
   <ul class='web-box'>
     <div class='wenshang'>
-      <h2>{{ this.dataList.infoTitle}}</h2>
+      <h2>{{ this.dataList.infoTitle }}</h2>
     </div>
     <div class='biaoge'>
-      <table cellpadding='0' cellspacing='0' class='table_content' style='font-size: 12px;margin: 0px; margin-bottom: 10px;width:680px;'>
+      <table cellpadding='0' cellspacing='0' class='table_content'
+             style='font-size: 12px;margin: 0px; margin-bottom: 10px;width:680px;'>
         <tbody>
 
         <tr>
@@ -12,7 +13,7 @@
             <span class='b2'>发布时间</span></td>
           <td width='187' class='table-left'>
                                 <span class='d2'>
-                      <a class='blue124'>{{this.dataList.infoPublishTime}}</a>&nbsp;</span>
+                      <a class='blue124'>{{ this.dataList.infoPublishTime }}</a>&nbsp;</span>
           </td>
         </tr>
 
@@ -21,7 +22,8 @@
             <span class='b2'>信息类型</span></td>
           <td width='187' class='table-left'>
                                 <span class='d2'>
-                      <a class='blue124'>{{getChangeType(this.dataList.infoType)}}-{{getChangeType1(this.dataList.infoTypeSegment)}}</a>&nbsp;</span>
+                      <a
+                        class='blue124'>{{ getChangeType(this.dataList.infoType) }}-{{ getChangeType1(this.dataList.infoTypeSegment) }}</a>&nbsp;</span>
           </td>
         </tr>
 
@@ -30,7 +32,7 @@
             <span class='b2'>省份</span></td>
           <td width='187' class='table-left'>
                                 <span class='d2'>
-                      <a class='blue124'>{{this.dataList.areaProvince}}</a>&nbsp;</span>
+                      <a class='blue124'>{{ this.dataList.areaProvince }}</a>&nbsp;</span>
           </td>
         </tr>
 
@@ -39,7 +41,7 @@
             <span class='b2'>城市</span></td>
           <td width='187' class='table-left'>
                                 <span class='d2'>
-                      <a class='blue124'>{{this.dataList.areaCity}}</a>&nbsp;</span>
+                      <a class='blue124'>{{ this.dataList.areaCity }}</a>&nbsp;</span>
           </td>
         </tr>
 
@@ -48,7 +50,7 @@
             <span class='b2'>区县</span></td>
           <td width='187' class='table-left'>
                                 <span class='d2'>
-                      <a class='blue124'>{{this.dataList.areaCountry}}</a>&nbsp;</span>
+                      <a class='blue124'>{{ this.dataList.areaCountry }}</a>&nbsp;</span>
           </td>
         </tr>
 
@@ -58,7 +60,7 @@
             <span class='b2'>附件</span></td>
           <td width='187' class='table-left'>
                                 <span class='d2'>
-                      <a class='blue124'>{{this.dataList.infoFile}}</a>&nbsp;</span>
+                      <a class='blue124'>{{ this.dataList.infoFile }}</a>&nbsp;</span>
           </td>
         </tr>
         </tbody>
@@ -86,16 +88,16 @@
 import {getDetailByInfoId, QueryById} from "@/api/business/bid/biding";
 
 export default {
-  props:{
-    detailId:{
-      type: [String,Number]
+  props: {
+    detailId: {
+      type: [String, Number]
     },
   },
   data() {
     return {
-      dialogVisible:false,
-      dataList:{},
-      areaObj:'',
+      dialogVisible: false,
+      dataList: {},
+      areaObj: '',
       bidType: [
         {
           value: '0',
@@ -160,7 +162,7 @@ export default {
           label: '验收公告'
         },
       ],
-      noticeOneType:[
+      noticeOneType: [
         {
           value: '0',
           label: '公告'
@@ -185,14 +187,14 @@ export default {
     };
   },
   created() {
-    if(this.detailId){
+    if (this.detailId) {
       this.getDetail(this.detailId)
     }
   },
-  methods:{
-    getDetail(val){
+  methods: {
+    getDetail(val) {
       getDetailByInfoId(val).then(res => {
-        this.dataList=res.data
+        this.dataList = res.data
       })
     },
     handleClose(done) {
@@ -200,12 +202,13 @@ export default {
         .then(_ => {
           done();
         })
-        .catch(_ => {});
+        .catch(_ => {
+        });
     },
-    openInfoDetail(){
-      this.dialogVisible=true
+    openInfoDetail() {
+      this.dialogVisible = true
     },
-    returnPage(){
+    returnPage() {
       this.$emit('change', false);
     },
     getChangeType(e) {
@@ -232,5 +235,71 @@ export default {
   }
 }
 </script>
-<style>.web-box { width: 100%; text-align: center; } .wenshang { margin: 0 auto; width: 40%; text-align: center; padding: 20px 10px 0 10px; } .wenshang h2 { display: block; color: #900; text-align: center; padding-bottom: 10px; border-bottom: 1px dashed #ccc; font-size: 16px; } .site a { text-decoration: none; } .content-box { text-align: left; margin: 0 auto; width: 40%; margin-top: 25px; text-indent: 2em; font-size: 14px; line-height: 25px; } .biaoge{ margin: 0 auto; width: 643px; margin-top: 25px; } .table_content { border-top: 1px solid #e0e0e0; border-left: 1px solid #e0e0e0; font-family: Arial; width: 643px; margin-top: 10px; margin-left: 15px; } .table_content tr td { line-height: 29px; } .table_content .bg { background-color: #f6f6f6; } .table_content tr td { border-right: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0; } .table-left{ text-align: left; padding-left: 20px; }</style>
+<style>.web-box {
+  width: 100%;
+  text-align: center;
+}
+
+.wenshang {
+  margin: 0 auto;
+  width: 40%;
+  text-align: center;
+  padding: 20px 10px 0 10px;
+}
+
+.wenshang h2 {
+  display: block;
+  color: #900;
+  text-align: center;
+  padding-bottom: 10px;
+  border-bottom: 1px dashed #ccc;
+  font-size: 16px;
+}
+
+.site a {
+  text-decoration: none;
+}
+
+.content-box {
+  text-align: left;
+  margin: 0 auto;
+  width: 40%;
+  margin-top: 25px;
+  text-indent: 2em;
+  font-size: 14px;
+  line-height: 25px;
+}
+
+.biaoge {
+  margin: 0 auto;
+  width: 643px;
+  margin-top: 25px;
+}
+
+.table_content {
+  border-top: 1px solid #e0e0e0;
+  border-left: 1px solid #e0e0e0;
+  font-family: Arial;
+  width: 643px;
+  margin-top: 10px;
+  margin-left: 15px;
+}
+
+.table_content tr td {
+  line-height: 29px;
+}
+
+.table_content .bg {
+  background-color: #f6f6f6;
+}
+
+.table_content tr td {
+  border-right: 1px solid #e0e0e0;
+  border-bottom: 1px solid #e0e0e0;
+}
+
+.table-left {
+  text-align: left;
+  padding-left: 20px;
+}</style>