Commit 456fd130 authored by zhanglw's avatar zhanglw

优质产品

parent d97f4f3d
...@@ -465,6 +465,13 @@ export const HttpReq = { ...@@ -465,6 +465,13 @@ export const HttpReq = {
method: 'get' method: 'get'
}) })
}, },
// 产品-方案概述、软件系统、专业培训
productGetPlanSystemAndTraining: function(params) {
return request({
url: '/api/bsw/bigScreen/highQualityProducts/planSystemAndTraining?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
id: null id: null
} }
} }
......
...@@ -195,11 +195,16 @@ ...@@ -195,11 +195,16 @@
</el-dialog> </el-dialog>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="产品概述:" class="form-cell" prop="productDescribe"> <el-form-item v-if="formData.productType&&formData.productType<5" label="产品概述:" class="form-cell" prop="productDescribe">
<div class="cell-box"> <div class="cell-box">
<div ref="editor" class="editor" /> <div ref="editor" class="editor" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-else label="产品概述:" class="form-cell" prop="productDescribe">
<div class="cell-box">
<el-input v-model="formData.productDescribe" type="textarea" placeholder="请输入文本内容" maxlength="1000" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="其他说明:" class="form-cell" prop="notes"> <el-form-item label="其他说明:" class="form-cell" prop="notes">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.notes" type="textarea" placeholder="请输入文本内容" maxlength="1000" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" /> <el-input v-model="formData.notes" type="textarea" placeholder="请输入文本内容" maxlength="1000" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" />
...@@ -315,6 +320,37 @@ export default { ...@@ -315,6 +320,37 @@ export default {
this.productSubTypeOpts = this.dict['product_type_1'] this.productSubTypeOpts = this.dict['product_type_1']
}, },
methods: { methods: {
typeChang() {
if (this.formData.productType < 5) {
this.$nextTick(() => {
if (!this.editor) {
const _this = this
const editor = new E(this.$refs.editor)
editor.config.zIndex = 5
editor.config.customUploadImg = function(files, insert) {
files.forEach(image => {
upload(_this.imagesUploadApi, image).then(res => {
const data = res.data
const url = _this.baseApi + '/file/' + data.type + '/' + data.realName
insert(url)
})
})
}
editor.config.onchange = (html) => {
this.formData.productDescribe = html
}
editor.create()
this.editor = editor
}
this.editor.txt.html(this.formData.productDescribe)
})
} else {
if (this.editor) {
this.editor.txt.clear()
this.editor = null
}
}
},
checkEnterpriseName(rule, value, callback) { checkEnterpriseName(rule, value, callback) {
this.$nextTick(_ => { this.$nextTick(_ => {
HttpReq.backstageApi.checkEnterpriseName({ HttpReq.backstageApi.checkEnterpriseName({
...@@ -402,9 +438,14 @@ export default { ...@@ -402,9 +438,14 @@ export default {
this.visible = true this.visible = true
}, },
hideView() { hideView() {
if (this.$refs.uploadCom) {
this.$refs.uploadCom.clearFiles() this.$refs.uploadCom.clearFiles()
this.$refs.formViewRef.resetFields() }
if (this.editor) {
this.editor.txt.clear() this.editor.txt.clear()
this.editor = null
}
this.$refs.formViewRef.resetFields()
this.productSubTypeOpts = this.dict['product_type_1'] this.productSubTypeOpts = this.dict['product_type_1']
this.productFeature = [] this.productFeature = []
this.visible = false this.visible = false
...@@ -437,33 +478,11 @@ export default { ...@@ -437,33 +478,11 @@ export default {
changeProductType() { changeProductType() {
this.formData.productSubType = null this.formData.productSubType = null
this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType] this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType]
this.typeChang()
}, },
loadData() { loadData() {
this.showView() this.showView()
if (this.editor) { this.typeChang()
return
}
this.$nextTick(() => {
const _this = this
const editor = new E(this.$refs.editor)
editor.config.zIndex = 5
editor.config.customUploadImg = function(files, insert) {
files.forEach(image => {
upload(_this.imagesUploadApi, image).then(res => {
const data = res.data
const url = _this.baseApi + '/file/' + data.type + '/' + data.realName
insert(url)
})
})
}
editor.config.onchange = (html) => {
this.formData.productDescribe = html
}
editor.create()
// 初始化数据
editor.txt.html(this.formData.productDescribe)
this.editor = editor
})
} }
} }
} }
......
...@@ -211,11 +211,16 @@ ...@@ -211,11 +211,16 @@
</div> </div>
<div style="display: none;clear: both">{{ formData.productPic }}</div> <div style="display: none;clear: both">{{ formData.productPic }}</div>
</el-form-item> </el-form-item>
<el-form-item label="产品概述:" class="form-cell" prop="productDescribe"> <el-form-item v-if="formData.productType&&formData.productType<5" label="产品概述:" class="form-cell" prop="productDescribe">
<div class="cell-box"> <div class="cell-box">
<div ref="editor" class="editor" /> <div ref="editor" class="editor" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item v-else label="产品概述:" class="form-cell" prop="productDescribe">
<div class="cell-box">
<el-input v-model="formData.productDescribe" type="textarea" placeholder="请输入文本内容" maxlength="1000" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" />
</div>
</el-form-item>
<el-form-item label="其他说明:" class="form-cell" prop="notes"> <el-form-item label="其他说明:" class="form-cell" prop="notes">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.notes" type="textarea" placeholder="请输入文本内容" maxlength="1000" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" /> <el-input v-model="formData.notes" type="textarea" placeholder="请输入文本内容" maxlength="1000" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" />
...@@ -334,6 +339,37 @@ export default { ...@@ -334,6 +339,37 @@ export default {
this.productSubTypeOpts = this.dict['product_type_1'] this.productSubTypeOpts = this.dict['product_type_1']
}, },
methods: { methods: {
typeChang() {
if (this.formData.productType < 5) {
this.$nextTick(() => {
if (!this.editor) {
const _this = this
const editor = new E(this.$refs.editor)
editor.config.zIndex = 5
editor.config.customUploadImg = function(files, insert) {
files.forEach(image => {
upload(_this.imagesUploadApi, image).then(res => {
const data = res.data
const url = _this.baseApi + '/file/' + data.type + '/' + data.realName
insert(url)
})
})
}
editor.config.onchange = (html) => {
this.formData.productDescribe = html
}
editor.create()
this.editor = editor
}
this.editor.txt.html(this.formData.productDescribe)
})
} else {
if (this.editor) {
this.editor.txt.clear()
this.editor = null
}
}
},
checkEnterpriseName(rule, value, callback) { checkEnterpriseName(rule, value, callback) {
this.$nextTick(_ => { this.$nextTick(_ => {
HttpReq.backstageApi.checkEnterpriseName({ HttpReq.backstageApi.checkEnterpriseName({
...@@ -436,9 +472,14 @@ export default { ...@@ -436,9 +472,14 @@ export default {
this.visible = true this.visible = true
}, },
hideView() { hideView() {
if (this.$refs.uploadCom) {
this.$refs.uploadCom.clearFiles() this.$refs.uploadCom.clearFiles()
this.$refs.formViewRef.resetFields() }
if (this.editor) {
this.editor.txt.clear() this.editor.txt.clear()
this.editor = null
}
this.$refs.formViewRef.resetFields()
this.productSubTypeOpts = this.dict['product_type_1'] this.productSubTypeOpts = this.dict['product_type_1']
this.productFeature = [] this.productFeature = []
this.visible = false this.visible = false
...@@ -471,29 +512,11 @@ export default { ...@@ -471,29 +512,11 @@ export default {
changeProductType() { changeProductType() {
this.formData.productSubType = null this.formData.productSubType = null
this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType] this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType]
this.typeChang()
}, },
loadData(productId) { loadData(productId) {
this.showView() this.showView()
this.$nextTick(() => { this.$nextTick(() => {
if (!this.editor) {
const _this = this
const editor = new E(this.$refs.editor)
editor.config.zIndex = 5
editor.config.customUploadImg = function(files, insert) {
files.forEach(image => {
upload(_this.imagesUploadApi, image).then(res => {
const data = res.data
const url = _this.baseApi + '/file/' + data.type + '/' + data.realName
insert(url)
})
})
}
editor.config.onchange = (html) => {
this.formData.productDescribe = html
}
editor.create()
this.editor = editor
}
// 初始化数据 // 初始化数据
HttpReq.backstageApi.queryProductDetail({ productId }).then((res) => { HttpReq.backstageApi.queryProductDetail({ productId }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
...@@ -507,7 +530,7 @@ export default { ...@@ -507,7 +530,7 @@ export default {
if (this.formData.productFeature) { if (this.formData.productFeature) {
this.productFeature = this.formData.productFeature.split(';') this.productFeature = this.formData.productFeature.split(';')
} }
this.editor.txt.html(this.formData.productDescribe) this.typeChang()
} else { } else {
this.$message({ this.$message({
message: res.msg, message: res.msg,
......
...@@ -130,12 +130,12 @@ ...@@ -130,12 +130,12 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<div style="display: flex"> <div style="display: flex">
<el-image :src="item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgProject" style="width:100%;height: 300px;margin: 1px;border-radius: 10px;" /> <el-image :src="item.imgSrc?imgSrcStart+'/productPic/'+item.imgSrc:defaultImgProject" style="width:100%;height: 300px;margin: 1px;border-radius: 10px;" />
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<div class="box-title touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div> <div class="box-title touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
<div class="content ellipsis">{{ item.content }}</div> <div class="content ellipsis">{{ item.productDescribe }}</div>
<div class="line-btn" style="margin-top: 4px;justify-content: flex-end;"> <div class="line-btn" style="margin-top: 4px;justify-content: flex-end;">
<div class="btn-o" style="width: 140px;border-radius: 10px;box-shadow: 0 1px 2px 0 rgba(0,0,0,0.2);font-size:20px;" @click="inquiry(item, 'project')">咨 询</div> <div class="btn-o" style="width: 140px;border-radius: 10px;box-shadow: 0 1px 2px 0 rgba(0,0,0,0.2);font-size:20px;" @click="inquiry(item, 'project')">咨 询</div>
</div> </div>
...@@ -150,7 +150,7 @@ ...@@ -150,7 +150,7 @@
<div style="padding-top: 6px"> <div style="padding-top: 6px">
<div v-for="(item,index) in softwareList" :key="'p_'+index" class="box-card" style="padding: 0 0 10px 0"> <div v-for="(item,index) in softwareList" :key="'p_'+index" class="box-card" style="padding: 0 0 10px 0">
<el-image <el-image
:src="item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgSoftware" :src="item.imgSrc?imgSrcStart+'/productPic/'+item.imgSrc:defaultImgSoftware"
style="width:358px;height: 240px;left: -4px;top: -3px" style="width:358px;height: 240px;left: -4px;top: -3px"
/> />
<div class="float-title touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div> <div class="float-title touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
...@@ -167,7 +167,7 @@ ...@@ -167,7 +167,7 @@
<div style="padding-top: 6px"> <div style="padding-top: 6px">
<div v-for="(item,index) in courseList" :key="'p_'+index" class="box-card" style="padding: 0 0 10px 0"> <div v-for="(item,index) in courseList" :key="'p_'+index" class="box-card" style="padding: 0 0 10px 0">
<el-image <el-image
:src="item.imgSrc?imgSrcStart+'/img'+item.imgSrc:defaultImgSoftware" :src="item.imgSrc?imgSrcStart+'/productPic/'+item.imgSrc:defaultImgSoftware"
style="width:358px;height: 240px;left: -4px;top: -3px" style="width:358px;height: 240px;left: -4px;top: -3px"
/> />
<div class="line-text touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div> <div class="line-text touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
...@@ -222,57 +222,9 @@ export default { ...@@ -222,57 +222,9 @@ export default {
areaOpts: [], areaOpts: [],
keywords: [], keywords: [],
hardwareList: [], hardwareList: [],
projectList: [ projectList: [],
{ softwareList: [],
title: '解决方案', courseList: [],
content: '状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测',
date: '2023-06-12',
imgSrc: ''
}, {
title: '解决方案',
content: '状态监测已存在多年,如今,随着物耿网(loT) 的发展,它也有了新发展观看此网络研讨会,了解loT如何演化,状态监测',
date: '2023-06-12',
imgSrc: ''
}
],
softwareList: [
{
title: '尾矿库在线监测系统',
date: '2023-06-12',
imgSrc: ''
}, {
title: '尾矿库在线监测系统',
date: '2023-06-12',
imgSrc: ''
}, {
title: '尾矿库在线监测系统',
date: '2023-06-12',
imgSrc: ''
}, {
title: '尾矿库在线监测系统',
date: '2023-06-12',
imgSrc: ''
}
],
courseList: [
{
title: '自然灾害应急避险',
subTitle: '由xxxxxxx单位提供培训',
imgSrc: ''
}, {
title: '自然灾害应急避险',
subTitle: '由xxxxxxx单位提供培训',
imgSrc: ''
}, {
title: '自然灾害应急避险',
subTitle: '由xxxxxxxx单位提供培训',
imgSrc: ''
}, {
title: '自然灾害应急避险',
subTitle: '由xxxxxxxxx单位提供培训',
imgSrc: ''
}
],
throttle: null, // 节流器 throttle: null, // 节流器
throttleTime: 300 throttleTime: 300
} }
...@@ -301,6 +253,13 @@ export default { ...@@ -301,6 +253,13 @@ export default {
this.hardwareList = res.data.hardwareList.data this.hardwareList = res.data.hardwareList.data
this.total = res.data.hardwareList.total this.total = res.data.hardwareList.total
}) })
HttpReq.webClientApi.productGetPlanSystemAndTraining({
...this.query
}).then((res) => {
this.projectList = res.data.overviewOfThePlan.data
this.softwareList = res.data.softWareSystem.data
this.courseList = res.data.professionalTraining.data
})
}, },
keywordClick(item, type) { keywordClick(item, type) {
this.query.keyword = item.name this.query.keyword = item.name
......
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