Commit fb536fa4 authored by zhanglw's avatar zhanglw

硬件展柜

parent 0689ae73
...@@ -64,7 +64,12 @@ ...@@ -64,7 +64,12 @@
<el-input v-model="formData.source" placeholder="单行输入" class="cell-input" /> <el-input v-model="formData.source" placeholder="单行输入" class="cell-input" />
</div> </div>
</el-form-item> </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 class="cell-box">
<div ref="editor" class="editor" /> <div ref="editor" class="editor" />
</div> </div>
...@@ -102,10 +107,11 @@ export default { ...@@ -102,10 +107,11 @@ export default {
formData: { formData: {
newsPageId: null, newsPageId: null,
title: '', // 标题 title: '', // 标题
type: '', // 类型 type: '1', // 类型
source: '', // 来源 source: '', // 来源
content: '', // 内容 content: '', // 内容
picture: '', // 图片 picture: '', // 图片
contentAbstract: '', // 摘要
url: '' // 链接 url: '' // 链接
}, },
rules: {} rules: {}
...@@ -189,10 +195,11 @@ export default { ...@@ -189,10 +195,11 @@ export default {
this.formData = { this.formData = {
newsPageId: null, newsPageId: null,
title: '', // 标题 title: '', // 标题
type: '', // 类型 type: '1', // 类型
source: '', // 来源 source: '', // 来源
content: '', // 内容 content: '', // 内容
picture: '', // 图片 picture: '', // 图片
contentAbstract: '', // 摘要
url: '' // 链接 url: '' // 链接
} }
}, },
......
...@@ -43,7 +43,12 @@ ...@@ -43,7 +43,12 @@
<el-input v-model="formData.source" disabled placeholder="单行输入" class="cell-input" /> <el-input v-model="formData.source" disabled placeholder="单行输入" class="cell-input" />
</div> </div>
</el-form-item> </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 class="cell-box">
<div style="width: 600px" v-html="formData.content" /> <div style="width: 600px" v-html="formData.content" />
</div> </div>
...@@ -85,6 +90,7 @@ export default { ...@@ -85,6 +90,7 @@ export default {
source: '', // 来源 source: '', // 来源
content: '', // 内容 content: '', // 内容
picture: '', // 图片 picture: '', // 图片
contentAbstract: '', // 摘要
url: '' // 链接 url: '' // 链接
}, },
rules: {} rules: {}
......
...@@ -322,8 +322,8 @@ export default { ...@@ -322,8 +322,8 @@ export default {
this.$router.push({ this.$router.push({
name: 'hardware', name: 'hardware',
params: { params: {
type: this.currentProductTypeObj.value, productType: this.currentProductTypeObj.value,
subType: '' subProductType: ''
} }
}) })
} }
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
<el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item> <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>硬件产品</el-breadcrumb-item> <el-breadcrumb-item>硬件产品</el-breadcrumb-item>
<el-breadcrumb-item>{{ title }}</el-breadcrumb-item> <el-breadcrumb-item>{{ title }}</el-breadcrumb-item>
<div v-if="query.subType"> <div v-if="query.subProductType">
<el-breadcrumb-item>{{ subTypeOpts[query.subType].label }}</el-breadcrumb-item> <el-breadcrumb-item>{{ subTypeOpts[query.subProductType].label }}</el-breadcrumb-item>
</div> </div>
</el-breadcrumb> </el-breadcrumb>
</div> </div>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<el-row style="padding-top: 16px"> <el-row style="padding-top: 16px">
<el-col :span="2"><div class="area-title">分类</div></el-col> <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);"> <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-col>
</el-row> </el-row>
<el-row> <el-row>
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
<el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" /> <el-input v-model="query.minPrice" placeholder="请输入价格(元)" clearable style="width: 140px" />
~ ~
<el-input v-model="query.maxPrice" 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>
</div> </div>
</el-col> </el-col>
...@@ -147,6 +147,7 @@ import languageSetting from '../components/languageSettingV2' ...@@ -147,6 +147,7 @@ import languageSetting from '../components/languageSettingV2'
import homeFooter from '../components/homeFooter' import homeFooter from '../components/homeFooter'
import inquiryView from '../components/inquiryView' import inquiryView from '../components/inquiryView'
import floatBtn from '../components/floatBtn' import floatBtn from '../components/floatBtn'
import { HttpReq } from '@/api/common'
export default { export default {
components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, floatBtn }, components: { titleMenus, userLogin, languageSetting, homeFooter, inquiryView, floatBtn },
...@@ -161,137 +162,16 @@ export default { ...@@ -161,137 +162,16 @@ export default {
title: '', title: '',
query: { query: {
keyword: '', keyword: '',
productType: '1',
area: '', area: '',
type: '1', type: '',
subType: '', subProductType: '',
sort: false sort: false
}, },
areaOpts: [], areaOpts: [],
subTypeOpts: [], subTypeOpts: [],
keywords: ['曲线记录仪', '液位控制器', '双金属温度计', '位移传感器'], keywords: ['曲线记录仪', '液位控制器', '双金属温度计', '位移传感器'],
hardwareList: [ 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: []
}
],
throttle: null, // 节流器 throttle: null, // 节流器
throttleTime: 300 throttleTime: 300
} }
...@@ -306,8 +186,19 @@ export default { ...@@ -306,8 +186,19 @@ export default {
methods: { methods: {
onDictReady(dict) { onDictReady(dict) {
this.areaOpts = [{ value: '', label: '全部' }, ...dict.area_province] this.areaOpts = [{ value: '', label: '全部' }, ...dict.area_province]
this.title = dict.product_type[this.query.type - 1].label this.title = dict.product_type[this.query.productType - 1].label
this.subTypeOpts = [{ value: '', label: '全部' }, ...dict['product_type_' + this.query.type]] 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) { keywordClick(item, type) {
this.query.keyword = item this.query.keyword = item
...@@ -319,6 +210,7 @@ export default { ...@@ -319,6 +210,7 @@ export default {
this.query.type = type this.query.type = type
this.query.sort = false this.query.sort = false
} }
this.search()
}, },
// 点击询价 // 点击询价
inquiry(item, type) { 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