|
@@ -28,7 +28,11 @@
|
|
<el-input v-model="form.title" autocomplete="off" placeholder="请输入标题名称"></el-input>
|
|
<el-input v-model="form.title" autocomplete="off" placeholder="请输入标题名称"></el-input>
|
|
<!-- <el-checkbox v-model="form.islink">是否使用外链</el-checkbox> -->
|
|
<!-- <el-checkbox v-model="form.islink">是否使用外链</el-checkbox> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
-
|
|
|
|
|
|
+ <el-form-item label="推荐等级:" prop="level" class="custom-align-right">
|
|
|
|
+ <el-select v-model="form.level" clearable placeholder="请选择公司的推荐等级">
|
|
|
|
+ <el-option label="推荐项目" :value="1"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<div>
|
|
<div>
|
|
<el-form-item label="缩略图:" class="custom-align-right" prop="imgurl">
|
|
<el-form-item label="缩略图:" class="custom-align-right" prop="imgurl">
|
|
<div class="uploaderBox">
|
|
<div class="uploaderBox">
|
|
@@ -74,7 +78,7 @@
|
|
<template #label>
|
|
<template #label>
|
|
<span class="askBox">
|
|
<span class="askBox">
|
|
项目关键词:
|
|
项目关键词:
|
|
- <el-tooltip class="item" effect="dark" introduce="项目关键词,如:三农市场网、全国三农、信息一体化。" placement="top">
|
|
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="项目关键词,如:三农市场网、全国三农、信息一体化。" placement="top">
|
|
<i class="el-icon-question"></i>
|
|
<i class="el-icon-question"></i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</span>
|
|
</span>
|
|
@@ -85,7 +89,7 @@
|
|
<template #label>
|
|
<template #label>
|
|
<span class="askBox">
|
|
<span class="askBox">
|
|
项目描述:
|
|
项目描述:
|
|
- <el-tooltip class="item" effect="dark" introduce="项目描述,如:中国三农市场网创建以来,社会效益和会员经济效益贡献。" placement="top">
|
|
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="项目描述,如:中国三农市场网创建以来,社会效益和会员经济效益贡献。" placement="top">
|
|
<i class="el-icon-question"></i>
|
|
<i class="el-icon-question"></i>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
</span>
|
|
</span>
|
|
@@ -223,6 +227,7 @@ export default {
|
|
category_id: 0,//栏目id
|
|
category_id: 0,//栏目id
|
|
nav_add_pool_id: [],//导航池子级
|
|
nav_add_pool_id: [],//导航池子级
|
|
title: '',//项目标题
|
|
title: '',//项目标题
|
|
|
|
+ level: null,//推荐等级
|
|
imgurl: [],//缩略图
|
|
imgurl: [],//缩略图
|
|
description: "",//描述
|
|
description: "",//描述
|
|
keyword: "",//关键词
|
|
keyword: "",//关键词
|
|
@@ -432,6 +437,7 @@ export default {
|
|
}
|
|
}
|
|
formData.category_id = this.form.category_id;
|
|
formData.category_id = this.form.category_id;
|
|
formData.cat_arr_id = Array.isArray(this.form.cat_arr_id) ? JSON.stringify(this.form.cat_arr_id): this.form.cat_arr_id ;
|
|
formData.cat_arr_id = Array.isArray(this.form.cat_arr_id) ? JSON.stringify(this.form.cat_arr_id): this.form.cat_arr_id ;
|
|
|
|
+ formData.level = this.form.level;
|
|
delete formData.commend_id;
|
|
delete formData.commend_id;
|
|
delete formData.nav_add_pool_id;
|
|
delete formData.nav_add_pool_id;
|
|
delete formData.user_type;
|
|
delete formData.user_type;
|
|
@@ -479,6 +485,7 @@ export default {
|
|
this.form.nav_add_pool_id = [],//导航池子级
|
|
this.form.nav_add_pool_id = [],//导航池子级
|
|
this.form.category_id = 0;
|
|
this.form.category_id = 0;
|
|
this.form.title = "";
|
|
this.form.title = "";
|
|
|
|
+ this.form.level = null;
|
|
this.form.imgurl = "";
|
|
this.form.imgurl = "";
|
|
this.form.description = "";
|
|
this.form.description = "";
|
|
this.form.keyword = "";
|
|
this.form.keyword = "";
|
|
@@ -532,6 +539,8 @@ export default {
|
|
};
|
|
};
|
|
this.$store.dispatch('project/getProjectInfo', data).then(res => {
|
|
this.$store.dispatch('project/getProjectInfo', data).then(res => {
|
|
this.form.title = res.data.title;
|
|
this.form.title = res.data.title;
|
|
|
|
+ this.form.level = res.data.level;
|
|
|
|
+ console.log(res.data.level)
|
|
if (typeof res.data.website_id === 'string') {
|
|
if (typeof res.data.website_id === 'string') {
|
|
this.form.website_id = Number(res.data.website_id);
|
|
this.form.website_id = Number(res.data.website_id);
|
|
} else {
|
|
} else {
|
|
@@ -604,7 +613,7 @@ export default {
|
|
// ===== 日期处理逻辑结束 =====
|
|
// ===== 日期处理逻辑结束 =====
|
|
//取出行政职能和行政区划数组的最后一个数字
|
|
//取出行政职能和行政区划数组的最后一个数字
|
|
if (this.form.city_arr_id == "[]" || this.form.city_arr_id == null) {
|
|
if (this.form.city_arr_id == "[]" || this.form.city_arr_id == null) {
|
|
- this.form.city_arr_id = '[]'
|
|
|
|
|
|
+ this.form.city_arr_id = '[]';
|
|
this.form.city_id = 0;
|
|
this.form.city_id = 0;
|
|
} else {
|
|
} else {
|
|
if (JSON.parse(this.form.city_arr_id.length == 0)) {
|
|
if (JSON.parse(this.form.city_arr_id.length == 0)) {
|
|
@@ -614,7 +623,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (this.form.cat_arr_id == "[]" || this.form.cat_arr_id == null) {
|
|
if (this.form.cat_arr_id == "[]" || this.form.cat_arr_id == null) {
|
|
- this.form.cat_arr_id = '[]'
|
|
|
|
|
|
+ this.form.cat_arr_id = '[]';
|
|
this.form.category_id = 0;
|
|
this.form.category_id = 0;
|
|
} else {
|
|
} else {
|
|
if (JSON.parse(this.form.cat_arr_id.length == 0)) {
|
|
if (JSON.parse(this.form.cat_arr_id.length == 0)) {
|
|
@@ -629,6 +638,9 @@ export default {
|
|
this.form.status = 0;
|
|
this.form.status = 0;
|
|
this.form.website_id = this.websiteid;
|
|
this.form.website_id = this.websiteid;
|
|
}
|
|
}
|
|
|
|
+ if(this.form.level == 0 || this.form.level == ''){
|
|
|
|
+ this.form.level = null;
|
|
|
|
+ }
|
|
const formData = { ...this.form };
|
|
const formData = { ...this.form };
|
|
formData.city_arr_id = Array.isArray(this.form.city_arr_id) ? JSON.stringify(this.form.city_arr_id): this.form.city_arr_id ;
|
|
formData.city_arr_id = Array.isArray(this.form.city_arr_id) ? JSON.stringify(this.form.city_arr_id): this.form.city_arr_id ;
|
|
formData.cat_arr_id = Array.isArray(this.form.cat_arr_id) ? JSON.stringify(this.form.cat_arr_id): this.form.cat_arr_id ;
|
|
formData.cat_arr_id = Array.isArray(this.form.cat_arr_id) ? JSON.stringify(this.form.cat_arr_id): this.form.cat_arr_id ;
|
|
@@ -740,20 +752,6 @@ export default {
|
|
levelChange(value) {
|
|
levelChange(value) {
|
|
this.form.level = value;
|
|
this.form.level = value;
|
|
},
|
|
},
|
|
- getNews() {
|
|
|
|
- this.$store.dispatch('news/getArticleList', { page: 1, pageSize: 20 }).then(res => {
|
|
|
|
- let data = [];
|
|
|
|
- for (let item of res.data.rows) {
|
|
|
|
- data.push(item)
|
|
|
|
- }
|
|
|
|
- this.commend_article = data;
|
|
|
|
- }).catch(() => {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'info',
|
|
|
|
- message: '网络错误,请重试!'
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
// 远程搜索方法
|
|
// 远程搜索方法
|
|
remoteMethod(query) {
|
|
remoteMethod(query) {
|
|
const artical_params = { page: 1, pageSize: 20, id: query }
|
|
const artical_params = { page: 1, pageSize: 20, id: query }
|
|
@@ -788,38 +786,9 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//5.站点选择 曹国庆 end ------------------------------------------------------------>
|
|
//5.站点选择 曹国庆 end ------------------------------------------------------------>
|
|
-
|
|
|
|
- //6.问卷 刘佳伟 start ------------------------------------------------------------>
|
|
|
|
- addInput(index) {
|
|
|
|
- // 在当前索引后插入一个新的输入框对象
|
|
|
|
- if (this.inputList.length > 10) {
|
|
|
|
- this.$message.warning('最多只能添加10个文本框');
|
|
|
|
- return false;
|
|
|
|
- }
|
|
|
|
- this.inputList.splice(index + 1, 0, { value: '' });
|
|
|
|
- },
|
|
|
|
- deleteInput(index) {
|
|
|
|
- if (this.inputList.length > 1) {
|
|
|
|
- // 如果输入框数量大于 1,则删除当前索引对应的输入框对象
|
|
|
|
- this.inputList.splice(index, 1);
|
|
|
|
- } else {
|
|
|
|
- this.$message.warning('至少保留一个输入框');
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- onDragEnd() {
|
|
|
|
- // 处理拖拽结束事件(如果需要)
|
|
|
|
- console.log('拖拽结束', this.commend_article);
|
|
|
|
- },
|
|
|
|
- handleClose(item) {
|
|
|
|
- const index = this.form.commend_id.indexOf(item);
|
|
|
|
- if (index > -1) {
|
|
|
|
- this.form.commend_id.splice(index, 1);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- //6.问卷 刘佳伟 end ------------------------------------------------------------>
|
|
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.getNews()
|
|
|
|
|
|
+ // this.getNews()
|
|
this.creatNews_user_type = getUseType()
|
|
this.creatNews_user_type = getUseType()
|
|
this.websiteid = getWebSiteId()
|
|
this.websiteid = getWebSiteId()
|
|
//1.获得站点标识
|
|
//1.获得站点标识
|