Browse Source

添加关键词需求

lipengtao 6 years ago
parent
commit
2157bfb474
2 changed files with 25 additions and 5 deletions
  1. 2 2
      src/views/contentPub/pubList.vue
  2. 23 3
      src/views/contentPub/publish.vue

+ 2 - 2
src/views/contentPub/pubList.vue

@ -38,7 +38,7 @@
38 38
        searchText: '', //  搜索文字
39 39
        selectMode: '',
40 40
        info: {
41
          title: '',
41
          key: '',
42 42
          catalog: '',
43 43
          published: 1,
44 44
          pageSize: 10,
@ -98,7 +98,7 @@
98 98
        this.publishList()
99 99
      },
100 100
      search() {
101
        this.info.title = this.searchText
101
        this.info.key = this.searchText
102 102
        this.publishList()
103 103
      },
104 104
      publishList() { //  内容发布中的列表

+ 23 - 3
src/views/contentPub/publish.vue

@ -20,6 +20,9 @@
20 20
            <searchTemplate :relevant="relevantExperts" v-on:eventName="expert" ref="sear1"></searchTemplate>
21 21
            <searchTemplate :relevant="relevantInstitutions" v-on:eventName="institution" ref="sear2"></searchTemplate>
22 22
            <searchTemplate :relevant="relevantCompanies" v-on:eventName="company" ref="sear3"></searchTemplate>
23
            <el-form-item label="关键词">
24
              <dynamicTags :tagInfo="tagSubjectC" :dyStr="keywordArray" v-on:turnTags="turnSubjectCTags($event)"></dynamicTags>
25
            </el-form-item>
23 26
          </el-col>
24 27
          <el-col :span="12" v-if="ruleForm2.catalog === '1' || ruleForm2.catalog === '2' || ruleForm2.catalog === '5'">
25 28
            <el-form-item style="text-align:right" prop="imgUrl">
@ -48,6 +51,7 @@
48 51
<script>
49 52
  import searchTemplate from '@/components/searchBar'
50 53
  import uploadFile from '@/components/uploadFile'
54
  import dynamicTags from '@/components/DynamicTags'
51 55
  import UE from '@/components/editorUE'
52 56
  import { parseTime, columnType } from '@/utils/index'
53 57
  import { uploadPhotoUrl, publishUrl, draftFirstUrl, draftUrl, draftPublishUrl, deleteUrl, inquireContentUrl } from '@/api/content'
@ -84,12 +88,19 @@
84 88
      }
85 89
      return {
86 90
        columnType,
91
        keywordArray: [],
87 92
        UEflag: false,
88 93
        modifyTime: '',
89 94
        draftFlag: true,
90 95
        upImgsStr: '',
91 96
        id: '',
92 97
        artUe: 'artUeditorId',
98
        tagSubjectC: {
99
          lableTit: '关键词',
100
          placeholder: '请填写关键词',
101
          limitCount: 15,
102
          tagsNum: 5
103
        },
93 104
        uploadImg: {
94 105
          url: uploadPhotoUrl,
95 106
          width: '340px',
@ -121,7 +132,8 @@
121 132
          cnt: '',
122 133
          professors: [],
123 134
          orgs: [],
124
          comps: []
135
          comps: [],
136
          keyWords: []
125 137
        },
126 138
        rules2: {
127 139
          title: [
@ -148,7 +160,11 @@
148 160
              cnt: info.cnt,
149 161
              title: info.title,
150 162
              source: info.source,
151
              imgUrl: info.imgUrl
163
              imgUrl: info.imgUrl,
164
              keyWords: info.keyWords || ''
165
            }
166
            if (info.keyWords) {
167
              this.keywordArray = info.keyWords.split(',') || []
152 168
            }
153 169
            if (info.catalog === '1' || info.catalog === '2') {
154 170
              this.rules2.imgUrl.push({ message: '请上传封面图片', required: true, trigger: 'blur' })
@ -210,9 +226,13 @@
210 226
    components: {
211 227
      searchTemplate,
212 228
      uploadFile,
213
      UE
229
      UE,
230
      dynamicTags
214 231
    },
215 232
    methods: {
233
      turnSubjectCTags(msg) {
234
        this.ruleForm2.keyWords = msg.join(',')
235
      },
216 236
      uploadfun(value) {
217 237
        this.ruleForm2.imgUrl = value
218 238
      },