Commit 1fd2d272 by 林家欣

修改提供商管理

parent dba423f2
...@@ -28,13 +28,6 @@ ...@@ -28,13 +28,6 @@
></el-input> ></el-input>
<p v-show="showInfo">{{ dataForm.title }}</p> <p v-show="showInfo">{{ dataForm.title }}</p>
</el-form-item> </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-form-item label="跳转至:" prop="directpath">
<el-input <el-input
v-model="dataForm.directpath" v-model="dataForm.directpath"
...@@ -89,7 +82,7 @@ ...@@ -89,7 +82,7 @@
</el-select> </el-select>
<p v-show="showInfo">{{ dataForm.levels }}</p> <p v-show="showInfo">{{ dataForm.levels }}</p>
</el-form-item> </el-form-item>
<el-form-item label="示时间:" prop="showtime"> <el-form-item label="示时间:" prop="showtime">
<el-date-picker <el-date-picker
v-show="!showInfo" v-show="!showInfo"
v-model="dataForm.showtime" v-model="dataForm.showtime"
...@@ -195,7 +188,6 @@ export default { ...@@ -195,7 +188,6 @@ export default {
directpath: "", directpath: "",
pic: "", pic: "",
content: "", content: "",
ishead: 1,
showtime: "", showtime: "",
classid: "", classid: "",
cclassid: "", cclassid: "",
...@@ -215,7 +207,6 @@ export default { ...@@ -215,7 +207,6 @@ export default {
// { required: true, message: '不能为空', trigger: 'blur' } // { required: true, message: '不能为空', trigger: 'blur' }
// ], // ],
classid: [{ required: true, message: "不能为空", trigger: "blur" }], classid: [{ required: true, message: "不能为空", trigger: "blur" }],
ishead: [{ required: true, message: "不能为空", trigger: "blur" }],
showtime: [{ required: true, message: "不能为空", trigger: "blur" }], showtime: [{ required: true, message: "不能为空", trigger: "blur" }],
}, },
imgUrl: new FormData(), imgUrl: new FormData(),
...@@ -265,7 +256,6 @@ export default { ...@@ -265,7 +256,6 @@ export default {
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm = data.news; this.dataForm = data.news;
this.getClassList([this.dataForm.classid]); this.getClassList([this.dataForm.classid]);
this.dataForm.ishead = parseInt(data.news.ishead);
this.imgUrlStr = data.news.pic; this.imgUrlStr = data.news.pic;
this.dialogVisible = true; this.dialogVisible = true;
this.ueditor.value = this.dataForm.content; this.ueditor.value = this.dataForm.content;
...@@ -298,7 +288,6 @@ export default { ...@@ -298,7 +288,6 @@ export default {
content: this.dataForm.content, content: this.dataForm.content,
classid: this.dataForm.classid, classid: this.dataForm.classid,
cclassid: this.dataForm.cclassid, cclassid: this.dataForm.cclassid,
ishead: this.dataForm.ishead,
showtime: this.dataForm.showtime, showtime: this.dataForm.showtime,
}), }),
}).then(({ data }) => { }).then(({ data }) => {
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
type="daterange" type="daterange"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd hh:mm:ss"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
type="daterange" type="daterange"
start-placeholder="开始日期" start-placeholder="开始日期"
end-placeholder="结束日期" end-placeholder="结束日期"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd hh:mm:ss"
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
prop="title" prop="title"
header-align="center" header-align="center"
align="center" align="center"
label="新闻标题"> label="文章标题">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="author" prop="author"
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
dataForm: { dataForm: {
'title': '', 'title': '',
'classId': '', 'classId': '',
'levels': '0', 'levels': 0,
'author': '', 'author': '',
'editor': '', 'editor': '',
'keyword': '', 'keyword': '',
......
...@@ -396,9 +396,9 @@ export default { ...@@ -396,9 +396,9 @@ export default {
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady(instance) { editorReady(instance) {
instance.setContent(this.dataForm.content); instance.setContent(this.dataForm.description);
instance.addListener("contentChange", () => { instance.addListener("contentChange", () => {
this.dataForm.content = instance.getContent(); this.dataForm.description = instance.getContent();
}); });
}, },
}, },
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
v-for="item in technologyList" v-for="item in technologyList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.label"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
v-for="item in serviceList" v-for="item in serviceList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.label"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -252,21 +252,8 @@ export default { ...@@ -252,21 +252,8 @@ export default {
config: {}, config: {},
}, },
piclevelList: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], 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: { methods: {
getSelectName(list, id) { getSelectName(list, id) {
let arr = list.filter((item) => { let arr = list.filter((item) => {
...@@ -289,12 +276,10 @@ export default { ...@@ -289,12 +276,10 @@ export default {
}).then(({ data }) => { }).then(({ data }) => {
this.loading = false; this.loading = false;
if (data && data.code === 0) { if (data && data.code === 0) {
this.dataForm = data.news; this.dataForm = data.partners;
this.getClassList([this.dataForm.classid]); this.imgUrlStr = data.partners.pic;
this.dataForm.ishead = parseInt(data.news.ishead);
this.imgUrlStr = data.news.pic;
this.dialogVisible = true; this.dialogVisible = true;
this.ueditor.value = this.dataForm.content; this.ueditor.value = this.dataForm.brief;
} }
}); });
} }
...@@ -313,20 +298,16 @@ export default { ...@@ -313,20 +298,16 @@ export default {
method: "post", method: "post",
data: this.$http.adornData({ data: this.$http.adornData({
id: this.dataForm.id || undefined, id: this.dataForm.id || undefined,
title: this.dataForm.title, firmname: this.dataForm.firmname,
titleOld: this.dataForm.titleOld, technology: this.dataForm.technology,
keyword: this.dataForm.keyword, service: this.dataForm.service,
brief: this.dataForm.brief, site: this.dataForm.site,
author: this.dataForm.author, name: this.dataForm.name,
source: this.dataForm.source, phone: this.dataForm.phone,
email: this.dataForm.email,
levels: this.dataForm.levels, levels: this.dataForm.levels,
directpath: this.dataForm.directpath,
pic: this.dataForm.pic, pic: this.dataForm.pic,
content: this.dataForm.content, brief: this.dataForm.brief,
classid: this.dataForm.classid,
cclassid: this.dataForm.cclassid,
ishead: this.dataForm.ishead,
showtime: this.dataForm.showtime,
}), }),
}).then(({ data }) => { }).then(({ data }) => {
this.loading = false; this.loading = false;
...@@ -347,25 +328,7 @@ export default { ...@@ -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) { beforeAvatarUpload(file) {
const isJPG = file.type === "image/jpeg"; const isJPG = file.type === "image/jpeg";
...@@ -420,9 +383,9 @@ export default { ...@@ -420,9 +383,9 @@ export default {
}, },
// 更新父子组件内容 // 更新父子组件内容
editorReady(instance) { editorReady(instance) {
instance.setContent(this.dataForm.content); instance.setContent(this.dataForm.brief);
instance.addListener("contentChange", () => { instance.addListener("contentChange", () => {
this.dataForm.content = instance.getContent(); this.dataForm.brief = instance.getContent();
}); });
}, },
}, },
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
v-for="item in technologyList" v-for="item in technologyList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.label"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
v-for="item in serviceList" v-for="item in serviceList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.label"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -288,7 +288,7 @@ export default { ...@@ -288,7 +288,7 @@ export default {
status: "", status: "",
technology: "", technology: "",
service: "", service: "",
levels: "0", levels: 0,
}, },
dataList: [], dataList: [],
pageIndex: 1, 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