Commit 456fd130 authored by zhanglw's avatar zhanglw

优质产品

parent d97f4f3d
......@@ -465,6 +465,13 @@ export const HttpReq = {
method: 'get'
})
},
// 产品-方案概述、软件系统、专业培训
productGetPlanSystemAndTraining: function(params) {
return request({
url: '/api/bsw/bigScreen/highQualityProducts/planSystemAndTraining?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
id: null
}
}
......
......@@ -195,11 +195,16 @@
</el-dialog>
</div>
</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 ref="editor" class="editor" />
</div>
</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">
<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" />
......@@ -315,6 +320,37 @@ export default {
this.productSubTypeOpts = this.dict['product_type_1']
},
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) {
this.$nextTick(_ => {
HttpReq.backstageApi.checkEnterpriseName({
......@@ -402,9 +438,14 @@ export default {
this.visible = true
},
hideView() {
this.$refs.uploadCom.clearFiles()
if (this.$refs.uploadCom) {
this.$refs.uploadCom.clearFiles()
}
if (this.editor) {
this.editor.txt.clear()
this.editor = null
}
this.$refs.formViewRef.resetFields()
this.editor.txt.clear()
this.productSubTypeOpts = this.dict['product_type_1']
this.productFeature = []
this.visible = false
......@@ -437,33 +478,11 @@ export default {
changeProductType() {
this.formData.productSubType = null
this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType]
this.typeChang()
},
loadData() {
this.showView()
if (this.editor) {
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
})
this.typeChang()
}
}
}
......
......@@ -211,11 +211,16 @@
</div>
<div style="display: none;clear: both">{{ formData.productPic }}</div>
</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 ref="editor" class="editor" />
</div>
</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">
<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" />
......@@ -334,6 +339,37 @@ export default {
this.productSubTypeOpts = this.dict['product_type_1']
},
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) {
this.$nextTick(_ => {
HttpReq.backstageApi.checkEnterpriseName({
......@@ -436,9 +472,14 @@ export default {
this.visible = true
},
hideView() {
this.$refs.uploadCom.clearFiles()
if (this.$refs.uploadCom) {
this.$refs.uploadCom.clearFiles()
}
if (this.editor) {
this.editor.txt.clear()
this.editor = null
}
this.$refs.formViewRef.resetFields()
this.editor.txt.clear()
this.productSubTypeOpts = this.dict['product_type_1']
this.productFeature = []
this.visible = false
......@@ -471,29 +512,11 @@ export default {
changeProductType() {
this.formData.productSubType = null
this.productSubTypeOpts = this.dict['product_type_' + this.formData.productType]
this.typeChang()
},
loadData(productId) {
this.showView()
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) => {
if (res.code === 200) {
......@@ -507,7 +530,7 @@ export default {
if (this.formData.productFeature) {
this.productFeature = this.formData.productFeature.split(';')
}
this.editor.txt.html(this.formData.productDescribe)
this.typeChang()
} else {
this.$message({
message: res.msg,
......
......@@ -130,12 +130,12 @@
<el-row :gutter="20">
<el-col :span="12">
<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>
</el-col>
<el-col :span="12">
<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="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>
......@@ -150,7 +150,7 @@
<div style="padding-top: 6px">
<div v-for="(item,index) in softwareList" :key="'p_'+index" class="box-card" style="padding: 0 0 10px 0">
<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"
/>
<div class="float-title touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
......@@ -167,7 +167,7 @@
<div style="padding-top: 6px">
<div v-for="(item,index) in courseList" :key="'p_'+index" class="box-card" style="padding: 0 0 10px 0">
<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"
/>
<div class="line-text touch" @click="goToDetails(item, '/product/details')">{{ item.title }}</div>
......@@ -222,57 +222,9 @@ export default {
areaOpts: [],
keywords: [],
hardwareList: [],
projectList: [
{
title: '解决方案',
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: ''
}
],
projectList: [],
softwareList: [],
courseList: [],
throttle: null, // 节流器
throttleTime: 300
}
......@@ -301,6 +253,13 @@ export default {
this.hardwareList = res.data.hardwareList.data
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) {
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