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

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

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