Commit 1fd2d272 by 林家欣

修改提供商管理

parent dba423f2
......@@ -28,13 +28,6 @@
></el-input>
<p v-show="showInfo">{{ dataForm.title }}</p>
</el-form-item>
<el-form-item label="显示最新要闻:" prop="ishead">
<el-radio-group v-model="dataForm.ishead" v-show="!showInfo">
<el-radio :label="1"></el-radio>
<el-radio :label="0"></el-radio>
</el-radio-group>
<p v-show="showInfo">{{ dataForm.ishead === 0 ? "否" : "是" }}</p>
</el-form-item>
<el-form-item label="跳转至:" prop="directpath">
<el-input
v-model="dataForm.directpath"
......@@ -89,7 +82,7 @@
</el-select>
<p v-show="showInfo">{{ dataForm.levels }}</p>
</el-form-item>
<el-form-item label="示时间:" prop="showtime">
<el-form-item label="示时间:" prop="showtime">
<el-date-picker
v-show="!showInfo"
v-model="dataForm.showtime"
......@@ -195,7 +188,6 @@ export default {
directpath: "",
pic: "",
content: "",
ishead: 1,
showtime: "",
classid: "",
cclassid: "",
......@@ -215,7 +207,6 @@ export default {
// { required: true, message: '不能为空', trigger: 'blur' }
// ],
classid: [{ required: true, message: "不能为空", trigger: "blur" }],
ishead: [{ required: true, message: "不能为空", trigger: "blur" }],
showtime: [{ required: true, message: "不能为空", trigger: "blur" }],
},
imgUrl: new FormData(),
......@@ -265,7 +256,6 @@ export default {
if (data && data.code === 0) {
this.dataForm = data.news;
this.getClassList([this.dataForm.classid]);
this.dataForm.ishead = parseInt(data.news.ishead);
this.imgUrlStr = data.news.pic;
this.dialogVisible = true;
this.ueditor.value = this.dataForm.content;
......@@ -298,7 +288,6 @@ export default {
content: this.dataForm.content,
classid: this.dataForm.classid,
cclassid: this.dataForm.cclassid,
ishead: this.dataForm.ishead,
showtime: this.dataForm.showtime,
}),
}).then(({ data }) => {
......
......@@ -51,7 +51,7 @@
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
value-format="yyyy-MM-dd hh:mm:ss"
>
</el-date-picker>
</el-form-item>
......@@ -63,7 +63,7 @@
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
value-format="yyyy-MM-dd hh:mm:ss"
>
</el-date-picker>
</el-form-item>
......@@ -91,7 +91,7 @@
prop="title"
header-align="center"
align="center"
label="新闻标题">
label="文章标题">
</el-table-column>
<el-table-column
prop="author"
......@@ -194,7 +194,7 @@
dataForm: {
'title': '',
'classId': '',
'levels': '0',
'levels': 0,
'author': '',
'editor': '',
'keyword': '',
......
......@@ -396,9 +396,9 @@ export default {
},
// 更新父子组件内容
editorReady(instance) {
instance.setContent(this.dataForm.content);
instance.setContent(this.dataForm.description);
instance.addListener("contentChange", () => {
this.dataForm.content = instance.getContent();
this.dataForm.description = instance.getContent();
});
},
},
......
......@@ -30,7 +30,7 @@
v-for="item in technologyList"
:key="item.value"
:label="item.label"
:value="item.value"
:value="item.label"
>
</el-option>
</el-select>
......@@ -46,7 +46,7 @@
v-for="item in serviceList"
:key="item.value"
:label="item.label"
:value="item.value"
:value="item.label"
>
</el-option>
</el-select>
......@@ -252,21 +252,8 @@ export default {
config: {},
},
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
id: [],
classidList: [],
cclassidList: [],
title: "",
className: "",
cclassName: "",
};
},
created() {
this.getClassList([]);
},
mounted() {
console.log(this.classidList);
},
methods: {
getSelectName(list, id) {
let arr = list.filter((item) => {
......@@ -289,12 +276,10 @@ export default {
}).then(({ data }) => {
this.loading = false;
if (data && data.code === 0) {
this.dataForm = data.news;
this.getClassList([this.dataForm.classid]);
this.dataForm.ishead = parseInt(data.news.ishead);
this.imgUrlStr = data.news.pic;
this.dataForm = data.partners;
this.imgUrlStr = data.partners.pic;
this.dialogVisible = true;
this.ueditor.value = this.dataForm.content;
this.ueditor.value = this.dataForm.brief;
}
});
}
......@@ -313,20 +298,16 @@ export default {
method: "post",
data: this.$http.adornData({
id: this.dataForm.id || undefined,
title: this.dataForm.title,
titleOld: this.dataForm.titleOld,
keyword: this.dataForm.keyword,
brief: this.dataForm.brief,
author: this.dataForm.author,
source: this.dataForm.source,
firmname: this.dataForm.firmname,
technology: this.dataForm.technology,
service: this.dataForm.service,
site: this.dataForm.site,
name: this.dataForm.name,
phone: this.dataForm.phone,
email: this.dataForm.email,
levels: this.dataForm.levels,
directpath: this.dataForm.directpath,
pic: this.dataForm.pic,
content: this.dataForm.content,
classid: this.dataForm.classid,
cclassid: this.dataForm.cclassid,
ishead: this.dataForm.ishead,
showtime: this.dataForm.showtime,
brief: this.dataForm.brief,
}),
}).then(({ data }) => {
this.loading = false;
......@@ -347,25 +328,7 @@ export default {
}
});
},
// 获取栏目列表
getClassList(id) {
this.$http({
url: this.$http.adornUrl(`/office/newsclass/getNewsClassList`),
method: "post",
data: id,
}).then(({ data }) => {
if (data && data.code === 0) {
if (id.length === 0) {
this.classidList = data.data;
} else {
this.dataForm.cclassid = "";
this.cclassidList = data.data[0].child;
}
} else {
this.$message.error(data.msg);
}
});
},
// 上传之前校验
beforeAvatarUpload(file) {
const isJPG = file.type === "image/jpeg";
......@@ -420,9 +383,9 @@ export default {
},
// 更新父子组件内容
editorReady(instance) {
instance.setContent(this.dataForm.content);
instance.setContent(this.dataForm.brief);
instance.addListener("contentChange", () => {
this.dataForm.content = instance.getContent();
this.dataForm.brief = instance.getContent();
});
},
},
......
......@@ -41,7 +41,7 @@
v-for="item in technologyList"
:key="item.value"
:label="item.label"
:value="item.value"
:value="item.label"
>
</el-option>
</el-select>
......@@ -57,7 +57,7 @@
v-for="item in serviceList"
:key="item.value"
:label="item.label"
:value="item.value"
:value="item.label"
>
</el-option>
</el-select>
......@@ -288,7 +288,7 @@ export default {
status: "",
technology: "",
service: "",
levels: "0",
levels: 0,
},
dataList: [],
pageIndex: 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment