Commit fb536fa4 authored by zhanglw's avatar zhanglw

硬件展柜

parent 0689ae73
......@@ -64,7 +64,12 @@
<el-input v-model="formData.source" placeholder="单行输入" class="cell-input" />
</div>
</el-form-item>
<el-form-item v-show="formData.type<4" label="内容:" class="form-cell" prop="content">
<el-form-item v-show="formData.type<4" label="摘要:" class="form-cell" prop="notes">
<div class="cell-box">
<el-input v-model="formData.contentAbstract" type="textarea" placeholder="请输入文本" maxlength="300" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" />
</div>
</el-form-item>
<el-form-item v-show="formData.type<4" label="正文:" class="form-cell" prop="content">
<div class="cell-box">
<div ref="editor" class="editor" />
</div>
......@@ -102,10 +107,11 @@ export default {
formData: {
newsPageId: null,
title: '', // 标题
type: '', // 类型
type: '1', // 类型
source: '', // 来源
content: '', // 内容
picture: '', // 图片
contentAbstract: '', // 摘要
url: '' // 链接
},
rules: {}
......@@ -189,10 +195,11 @@ export default {
this.formData = {
newsPageId: null,
title: '', // 标题
type: '', // 类型
type: '1', // 类型
source: '', // 来源
content: '', // 内容
picture: '', // 图片
contentAbstract: '', // 摘要
url: '' // 链接
}
},
......
......@@ -43,7 +43,12 @@
<el-input v-model="formData.source" disabled placeholder="单行输入" class="cell-input" />
</div>
</el-form-item>
<el-form-item v-show="formData.type<4" label="内容:" class="form-cell" prop="content">
<el-form-item v-show="formData.type<4" label="摘要:" class="form-cell" prop="notes">
<div class="cell-box">
<el-input v-model="formData.contentAbstract" type="textarea" placeholder="请输入文本" maxlength="300" :autosize="{ minRows: 4, maxRows: 6}" show-word-limit resize="none" class="cell-input" />
</div>
</el-form-item>
<el-form-item v-show="formData.type<4" label="正文:" class="form-cell" prop="content">
<div class="cell-box">
<div style="width: 600px" v-html="formData.content" />
</div>
......@@ -85,6 +90,7 @@ export default {
source: '', // 来源
content: '', // 内容
picture: '', // 图片
contentAbstract: '', // 摘要
url: '' // 链接
},
rules: {}
......
......@@ -322,8 +322,8 @@ export default {
this.$router.push({
name: 'hardware',
params: {
type: this.currentProductTypeObj.value,
subType: ''
productType: this.currentProductTypeObj.value,
subProductType: ''
}
})
}
......
......@@ -16,8 +16,8 @@
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>硬件产品</el-breadcrumb-item>
<el-breadcrumb-item>{{ title }}</el-breadcrumb-item>
<div v-if="query.subType">
<el-breadcrumb-item>{{ subTypeOpts[query.subType].label }}</el-breadcrumb-item>
<div v-if="query.subProductType">
<el-breadcrumb-item>{{ subTypeOpts[query.subProductType].label }}</el-breadcrumb-item>
</div>
</el-breadcrumb>
</div>
......@@ -26,7 +26,7 @@
<el-row style="padding-top: 16px">
<el-col :span="2"><div class="area-title">分类</div></el-col>
<el-col :span="22" style="border: 1px solid rgba(0,0,0,0.12);">
<div v-for="(item,index) in subTypeOpts" :key="'st_'+index" class="area_item touch" :class="query.subType===item.value?'active':''" @click="query.subType=item.value">{{ item.label }}</div>
<div v-for="(item,index) in subTypeOpts" :key="'st_'+index" class="area_item touch" :class="query.subProductType===item.value?'active':''" @click="query.subProductType=item.value">{{ item.label }}</div>
</el-col>
</el-row>
<el-row>
......@@ -70,7 +70,7 @@
<el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
~
<el-input v-model="query.maxPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
<div class="btn touch">确 定</div>
<div class="btn touch" @click="search">确 定</div>
</div>
</div>
</el-col>
......@@ -147,6 +147,7 @@ import languageSetting from '../components/languageSettingV2'
import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView'
import floatBtn from '../components/floatBtn'
import { HttpReq } from '@/api/common'
export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, floatBtn },
......@@ -161,137 +162,16 @@ export default {
title: '',
query: {
keyword: '',
productType: '1',
area: '',
type: '1',
subType: '',
type: '',
subProductType: '',
sort: false
},
areaOpts: [],
subTypeOpts: [],
keywords: ['曲线记录仪', '液位控制器', '双金属温度计', '位移传感器'],
hardwareList: [
{
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: true,
isStore: true,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: true,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: true,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: true,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}, {
isGood: false,
isHot: false,
isStore: false,
title: 'wiwo1002热能工程压力变送器',
subTitle: '乐清市柳市艾普乐传感器厂',
area: '北京',
date: '2023-06-12',
imgSrc: '',
imgSrcList: []
}
],
hardwareList: [],
throttle: null, // 节流器
throttleTime: 300
}
......@@ -306,8 +186,19 @@ export default {
methods: {
onDictReady(dict) {
this.areaOpts = [{ value: '', label: '全部' }, ...dict.area_province]
this.title = dict.product_type[this.query.type - 1].label
this.subTypeOpts = [{ value: '', label: '全部' }, ...dict['product_type_' + this.query.type]]
this.title = dict.product_type[this.query.productType - 1].label
this.subTypeOpts = [{ value: '', label: '全部' }, ...dict['product_type_' + this.query.productType]]
this.search()
},
search() {
HttpReq.webClientApi.productGetHardwareList({
page: this.page - 1,
pageSize: this.pageSize,
...this.query
}).then((res) => {
this.hardwareList = res.data.hardwareList.data
this.total = res.data.hardwareList.total
})
},
keywordClick(item, type) {
this.query.keyword = item
......@@ -319,6 +210,7 @@ export default {
this.query.type = type
this.query.sort = false
}
this.search()
},
// 点击询价
inquiry(item, type) {
......
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