Commit e073c0c8 authored by 王晓旭's avatar 王晓旭

抬头搜索统一修改

parent c8bfc69f
......@@ -118,6 +118,7 @@
<div class="table-form">
<slot name="table-search-left"></slot>
<SearchForm
ref="searchform"
:search="config.search"
v-if="isShowButton('notSearch')"
:table="data"
......
......@@ -39,6 +39,12 @@
return {
config: {
search: [
{
name: "name",
type: "text",
label: "分类名称",
fuzzy: true,
},
],
columns: [
{type: "selection", width: 60},
......
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<LayoutTable ref="layouttable" :data="tableData" :config="tableConfig" notDel notAdd>
<!-- 热门0为非热门1为热门 -->
<div slot="table-search-left" class="onlyhot">
<el-checkbox
:key="0"
v-model="isreply"
:checked="isreply"
@change="changeIsReply"
>
</el-checkbox>
只看未回复
</div>
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
......@@ -16,10 +27,16 @@
name: "FeedbackList",
components: {
drawerShow
},
},
mixins: [table],
created() {
},
mounted() {
// 重写查询
this.$refs.layouttable.$refs.searchform.onSubmit = this.onSearch
// 重写搜索清除
this.$refs.layouttable.$refs.searchform.cleanForm = this.cleanForm
},
methods: {
/** 重写新增方法 */
toAdd(row) {
......@@ -33,15 +50,58 @@
toView(row) {
this.$refs.drawerform.view(row);
},
// 重写查询
onSearch(){
if(this.isreply){
this.$refs.layouttable.$refs.searchform.form = Object.assign({}, this.$refs.layouttable.$refs.searchform.form, {reply:1})
}
let { path, query } = this.$refs.layouttable.$refs.searchform.$route;
let data = this.$refs.layouttable.$refs.searchform.decode(this.$refs.layouttable.$refs.searchform.form);
this.$refs.layouttable.$refs.searchform.$router.push({
path: path,
query: Object.assign({}, query, data),
});
},
// 重写搜索清除
cleanForm(){
this.isreply = false
this.$refs.layouttable.$refs.searchform.form.reply = undefined
this.$forceUpdate()
this.$refs.layouttable.$refs.searchform.clean();
this.$refs.layouttable.$refs.searchform.onSubmit();
},
changeIsReply(val){
this.isreply = val
},
},
data() {
return {
isreply:false,
config: {
search: [
// {
// name: "createTime",
// type: "date",
// label: "提交时间",
// fuzzy: true,
// valueFormat:"yyyy-MM-dd"
// },
{
name: "content",
type: "text",
label: "内容",
fuzzy: true,
},
{
name: "feedbackName",
type: "text",
label: "真实姓名",
fuzzy: true,
},
],
columns: [
{type: "selection", width: 60},
// {type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
......@@ -62,21 +122,21 @@
{label: "回复人", prop: "replyPerson"},
{label: "反馈类型 ", prop: "feedbackType",formatter: this.formatter},
// {label: "反馈类型 ", prop: "feedbackType",formatter: this.formatter},
{label: "附件名称,多个逗号分割", prop: "fileName"},
// {label: "附件名称,多个逗号分割", prop: "fileName"},
{label: "附件地址,多个逗号分割", prop: "filePath"},
// {label: "附件地址,多个逗号分割", prop: "filePath"},
{label: "处理人名称", prop: "processName"},
// {label: "处理人名称", prop: "processName"},
{label: "处理状态", prop: "processStatus",formatter: this.formatter},
// {label: "处理状态", prop: "processStatus",formatter: this.formatter},
{label: "处理意见", prop: "processComments"},
// {label: "处理意见", prop: "processComments"},
{label: "处理时间", prop: "processTime", formatter: this.formatterDate},
{label: "回复时间", prop: "processTime", formatter: this.formatterDate},
{label: "创建用户", prop: "createUserId", formatter: this.formatter},
// {label: "创建用户", prop: "createUserId", formatter: this.formatter},
{
label: "操作",
width: 240,
......
......@@ -39,6 +39,12 @@
return {
config: {
search: [
{
name: "name",
type: "text",
label: "频道名称",
fuzzy: true,
},
],
columns: [
{type: "selection", width: 60},
......
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
<LayoutTable :data="tableData" :config="tableConfig" notDel>
</LayoutTable>
......@@ -78,12 +78,24 @@
return {
config: {
search: [
{
name: "categoryId",
type: "select",
placeholder:"请选择新闻类型",
label: "新闻类型"
},
{
name: "title",
type: "text",
label: "新闻标题",
fuzzy: true,
},
],
columns: [
{type: "selection", width: 60},
// {type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "标题", prop: "title"},
{label: "新闻标题", prop: "title"},
{label: "新闻类型", prop: "categoryId",formatter: this.formatter},
......
......@@ -9,21 +9,22 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="产品名称" prop="productName" v-model="form.productName" placeholder="请输入产品名称,名称唯一"/>
<Field label="产品slogan" prop="productSlogan" v-model="form.productSlogan" placeholder="请输入产品slogan"/>
<Field label="产品slogan" prop="productSlogan" v-model="form.productSlogan" placeholder="请输入产品slogan"/>
<Field label="产品分类" prop="categoryId" v-model="form.categoryId" :multiple="true" type="select" :enumData="dict.categoryId" placeholder="请选择产品分类"/>
<Field label="所属企业" prop="companyId" v-model="form.companyId" :multiple="true" type="select" :enumData="dict.companyId" placeholder="请选择所属企业"/>
<!-- <Field label="所属企业" prop="companyId" v-model="form.companyId" :multiple="true" type="select" :enumData="dict.companyId" placeholder="请选择所属企业"/> -->
<Field label="产品图标"><imageUpload v-model="form.productLogoPath" prePath="/file/preview"/></Field>
<!-- <Field label="产品图标"><imageUpload v-model="form.productLogoPath" prePath="/file/preview"/></Field> -->
<Field label="产品封面图片" prop="productFacePath" ><imageUpload v-model="form.productFacePath" prePath="/file/preview"/> </Field>
<Field label="产品宣传图片"><imageUpload v-model="form.productPicPath" prePath="/file/preview"/></Field>
<Field label="产品视频"><fileUpload v-model="form.productVideoPath" prePath="/file/fileupload"/></Field>
<Field label="产品介绍" prop="productIntroduction" v-model="form.productIntroduction" type="textarea" placeholder="请输入产品介绍"/>
<Field label="宣传形式" type="radio" :enumData="['轮播图','短视频']" ></Field>
<Field label="轮播图"><imageUpload v-model="form.productPicPath" prePath="/file/preview"/></Field>
<Field label="短视频"><fileUpload v-model="form.productVideoPath" prePath="/file/fileupload"/></Field>
<Field label="产品简介" prop="productIntroduction" v-model="form.productIntroduction" type="textarea" placeholder="请输入产品简介"/>
<Field label="产品详情" prop="productDetail" placeholder="请输入产品详情"><editor v-model="form.productDetail" :min-height="256"/></Field>
<Field label="发布时间" prop="publishTime" v-model="form.publishTime" type="date" />
<Field label="热门" prop="hot" v-model="form.hot" type="radio" :enumData="dict.hot" placeholder="请选择是否热门"/>
<Field label="备注" prop="productRemark" v-model="form.productRemark" type="textarea" placeholder="请输入备注"/>
<!-- <Field label="发布时间" prop="publishTime" v-model="form.publishTime" type="date" /> -->
<Field label="是否热门" prop="hot" v-model="form.hot" type="radio" :enumData="dict.hot" placeholder="请选择是否热门"/>
<!-- <Field label="备注" prop="productRemark" v-model="form.productRemark" type="textarea" placeholder="请输入备注"/> -->
</el-row>
<el-divider content-position="center">产品常见问题信息</el-divider>
......
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<LayoutTable ref="layouttable" :data="tableData" :config="tableConfig" notDel>
<!-- 热门0为非热门1为热门 -->
<div slot="table-search-left" class="onlyhot">
<el-checkbox
:key="0"
v-model="ishot"
:checked="ishot"
@change="changeIshot"
>
</el-checkbox>
只看热门
</div>
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
......@@ -16,9 +29,13 @@
name: "ProductList",
components: {
drawerShow
},
},
mixins: [table],
created() {
mounted() {
// 重写查询
this.$refs.layouttable.$refs.searchform.onSubmit = this.onSearch
// 重写搜索清除
this.$refs.layouttable.$refs.searchform.cleanForm = this.cleanForm
},
methods: {
renderTable(tableData) {
......@@ -51,15 +68,57 @@
toView(row) {
this.$refs.drawerform.view(row);
},
// 重写查询
onSearch(){
if(this.ishot){
this.$refs.layouttable.$refs.searchform.form = Object.assign({}, this.$refs.layouttable.$refs.searchform.form, {hot:1})
}
let { path, query } = this.$refs.layouttable.$refs.searchform.$route;
let data = this.$refs.layouttable.$refs.searchform.decode(this.$refs.layouttable.$refs.searchform.form);
this.$refs.layouttable.$refs.searchform.$router.push({
path: path,
query: Object.assign({}, query, data),
});
},
// 重写搜索清除
cleanForm(){
this.ishot = false
this.$refs.layouttable.$refs.searchform.form.hot = undefined
this.$forceUpdate()
this.$refs.layouttable.$refs.searchform.clean();
this.$refs.layouttable.$refs.searchform.onSubmit();
},
changeIshot(val){
this.ishot = val
}
},
data() {
return {
ishot:false,
config: {
search: [
{
name: "categoryId",
type: "select",
placeholder:"请选择产品分类",
label: "产品分类"
},
{
name: "companyId",
type: "select",
placeholder:"请选择所属企业",
label: "所属企业"
},
{
name: "productName",
type: "text",
label: "产品名称",
fuzzy: true,
},
],
columns: [
{type: "selection", width: 60},
// {type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "产品名称", prop: "productName"},
......@@ -91,3 +150,14 @@
}
};
</script>
<style lang="less" >
.table-form{
display: flex ;
}
.onlyhot{
margin-right: 20px;
line-height: 30px;
font-size: 14px;
color: #333333;
}
</style>
\ No newline at end of file
......@@ -39,6 +39,18 @@
return {
config: {
search: [
{
name: "staffName",
type: "text",
label: "被查看员工姓名",
fuzzy: true,
},
{
name: "viewName",
type: "text",
label: "查看人名称",
fuzzy: true,
},
],
columns: [
{type: "selection", width: 60},
......
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig" />
<LayoutTable :data="tableData" :config="tableConfig" notDel/>
<dialog-show ref="dialogform" @ok="getData" />
<el-dialog title="分配权限" :visible.sync="auth.visible">
<el-form :model="auth.form">
......
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