Commit 3fb0b51c by zhuzhequan

样式修改

parent 7839c351
...@@ -23,10 +23,14 @@ ...@@ -23,10 +23,14 @@
<el-button type="success" @click="addDialog(1)">新增</el-button> <el-button type="success" @click="addDialog(1)">新增</el-button>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 0px"> <el-form-item style="margin-bottom: 0px">
<el-button type="danger" @click="deleteSection()">删除</el-button> <el-button :loading="delLoading" type="danger" @click="deleteSection()">
删除
</el-button>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 0px"> <el-form-item style="margin-bottom: 0px">
<el-button type="warning" @click="getList(1)">刷新</el-button> <el-button :loading="searchLoading" type="warning" @click="getList">
刷新
</el-button>
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 0px"> <el-form-item style="margin-bottom: 0px">
<el-button type="primary" @click="importExcel">导入</el-button> <el-button type="primary" @click="importExcel">导入</el-button>
...@@ -245,6 +249,8 @@ export default { ...@@ -245,6 +249,8 @@ export default {
is_title: 1, is_title: 1,
sourceData: [], sourceData: [],
dialogVisible: false, dialogVisible: false,
delLoading: false,
refreshLoading: false,
addcurrencyform: { addcurrencyform: {
code: '', code: '',
id: '', id: '',
...@@ -494,6 +500,7 @@ export default { ...@@ -494,6 +500,7 @@ export default {
handleClick(v) { handleClick(v) {
this.is_tab = v this.is_tab = v
this.selections = [] this.selections = []
this.sourceData = []
this.getList(1) this.getList(1)
}, },
currentTabFn(val) { currentTabFn(val) {
...@@ -544,6 +551,7 @@ export default { ...@@ -544,6 +551,7 @@ export default {
getList() { getList() {
if (this.is_tab === '2') { if (this.is_tab === '2') {
const { pageSize, currentPage } = this.paginationOptions const { pageSize, currentPage } = this.paginationOptions
this.searchLoading = true
axios axios
.get('baseStyleInfo/list_page', { .get('baseStyleInfo/list_page', {
params: { params: {
...@@ -563,6 +571,10 @@ export default { ...@@ -563,6 +571,10 @@ export default {
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}) })
} }
this.searchLoading = false
})
.catch(() => {
this.searchLoading = false
}) })
} else { } else {
this.alllist('baseCategoryInfo/tree_list', 'sourceData') this.alllist('baseCategoryInfo/tree_list', 'sourceData')
...@@ -643,6 +655,7 @@ export default { ...@@ -643,6 +655,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
if (!v) this.delLoading = true
const text = const text =
this.is_tab === '1' ? 'baseCategoryInfo' : 'baseStyleInfo' this.is_tab === '1' ? 'baseCategoryInfo' : 'baseStyleInfo'
const url = `${text}/delete?ids=${ids}` const url = `${text}/delete?ids=${ids}`
...@@ -654,11 +667,15 @@ export default { ...@@ -654,11 +667,15 @@ export default {
}) })
this.getList(this.currentPage) this.getList(this.currentPage)
} }
if (!v) this.delLoading = false
}) })
}) })
.catch(() => {}) .catch(() => {
if (!v) this.delLoading = false
})
}, },
alllist(url, arr) { alllist(url, arr) {
this.searchLoading = true
axios.get(url, { baseURL: '/api/manage/rest' }).then((res) => { axios.get(url, { baseURL: '/api/manage/rest' }).then((res) => {
if (res.code === 200) { if (res.code === 200) {
this[arr] = res.data this[arr] = res.data
...@@ -672,6 +689,7 @@ export default { ...@@ -672,6 +689,7 @@ export default {
dangerouslyUseHTMLString: true dangerouslyUseHTMLString: true
}) })
} }
this.searchLoading = false
}) })
} }
} }
......
...@@ -140,7 +140,13 @@ ...@@ -140,7 +140,13 @@
</el-button> </el-button>
</span> </span>
</p> </p>
<div style="min-height: 40px; background: #fff"> <div
style="
min-height: 40px;
background: #fff;
max-height: 368px;
overflow-y: auto;
">
<div <div
v-for="(item, index) in selectProps" v-for="(item, index) in selectProps"
class="variants" class="variants"
...@@ -149,6 +155,7 @@ ...@@ -149,6 +155,7 @@
<div class="title">{{ `${item.name}(${item.code})` }}</div> <div class="title">{{ `${item.name}(${item.code})` }}</div>
<ul class> <ul class>
<li <li
class="close-icon"
v-for="g in item.children" v-for="g in item.children"
:key="g.id" :key="g.id"
:style="{ :style="{
...@@ -182,13 +189,16 @@ ...@@ -182,13 +189,16 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:visible.sync="propDialogVisible" :visible.sync="propDialogVisible"
width="800px" width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
title="选择属性"> title="选择属性">
<div class="filter" style="margin-bottom: 10px"> <div class="filter" style="margin-bottom: 10px">
<el-input placeholder="请输入属性类名称" clearable v-model="filterVal"></el-input> <el-input
placeholder="请输入属性类名称"
clearable
v-model="filterVal"></el-input>
</div> </div>
<div class="product-prop"> <div class="product-prop" style="max-height: 500px; overflow-y: auto">
<div <div
class="product-prop_item" class="product-prop_item"
v-for="(item, index) in productPropertiesMap" v-for="(item, index) in productPropertiesMap"
...@@ -357,7 +367,10 @@ export default { ...@@ -357,7 +367,10 @@ export default {
enname: item.enname, enname: item.enname,
children: [] children: []
} }
const current = properties.find((e) => e.code === item.cateCode && item.cnname.includes(this.filterVal)) const current = properties.find(
(e) =>
e.code === item.cateCode && item.cnname.includes(this.filterVal)
)
if (current) { if (current) {
current.children.push(item) current.children.push(item)
} else { } else {
...@@ -365,11 +378,18 @@ export default { ...@@ -365,11 +378,18 @@ export default {
properties.push(prop) properties.push(prop)
} }
}) })
console.log(properties)
properties.forEach(el => { const arr = []
el.children = el.children.filter(item => item.cnname.includes(this.filterVal)) properties.forEach((el) => {
el.children = el.children.filter((item) =>
item.cnname.includes(this.filterVal)
)
if (el.children.length > 0) {
arr.push(el)
}
}) })
return properties console.log(arr)
return arr
} }
}, },
created() { created() {
...@@ -829,4 +849,11 @@ export default { ...@@ -829,4 +849,11 @@ export default {
.custom-dialog .el-dialog__body { .custom-dialog .el-dialog__body {
height: 600px; height: 600px;
} }
.close-icon .el-icon-close::before {
border: 1px solid red;
padding: 1px;
border-radius: 50%;
color: black;
font-size: 10px;
}
</style> </style>
...@@ -7,20 +7,18 @@ ...@@ -7,20 +7,18 @@
:inline="true" :inline="true"
size="small" size="small"
v-enter-submit="search" v-enter-submit="search"
@submit.native.prevent @submit.native.prevent>
>
<el-form-item label="名称"> <el-form-item label="名称">
<el-input <el-input
style="width: 300px" style="width: 300px"
v-model="searchForm.name" v-model="searchForm.name"
placeholder="请输入名称&中文名称&英文名称" placeholder="请输入名称&中文名称&英文名称"
clearable clearable></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="search" <el-button :loading="searchLoading" type="primary" @click="search">
>查询</el-button 查询
> </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -28,8 +26,7 @@ ...@@ -28,8 +26,7 @@
<div class="table-wrap"> <div class="table-wrap">
<table-view <table-view
:sourceData="sourceData" :sourceData="sourceData"
:tableColumns="tableColumns" :tableColumns="tableColumns"></table-view>
></table-view>
<!-- <vxe-table <!-- <vxe-table
border border
...@@ -56,9 +53,7 @@ ...@@ -56,9 +53,7 @@
:page-size="paginationOptions.pageSize" :page-size="paginationOptions.pageSize"
:current-page="paginationOptions.currentPage" :current-page="paginationOptions.currentPage"
@size-change="sizeChange" @size-change="sizeChange"
@current-change="onCurrentChange" @current-change="onCurrentChange"></el-pagination>
>
</el-pagination>
</div> </div>
</div> </div>
</template> </template>
...@@ -69,21 +64,22 @@ import TableView from '@/common/components/base/tableView.vue' ...@@ -69,21 +64,22 @@ import TableView from '@/common/components/base/tableView.vue'
export default { export default {
name: 'logistics_transporters', name: 'logistics_transporters',
components: { components: {
TableView, TableView
}, },
data() { data() {
return { return {
sourceData: [], sourceData: [],
searchForm: {}, searchForm: {},
isLoad: false, isLoad: false,
searchLoading: false,
bodyHeight: 0, bodyHeight: 0,
currentPage: 1, currentPage: 1,
sourceDataTotal: 0, sourceDataTotal: 0,
paginationOptions: { paginationOptions: {
total: 0, total: 0,
pageSize: 100, pageSize: 100,
currentPage: 1, currentPage: 1
}, }
} }
}, },
computed: { computed: {
...@@ -93,9 +89,9 @@ export default { ...@@ -93,9 +89,9 @@ export default {
{ label: '中文名称', key: 'nameCn', align: 'left' }, { label: '中文名称', key: 'nameCn', align: 'left' },
{ label: '英文名称', key: 'nameEn', align: 'left' }, { label: '英文名称', key: 'nameEn', align: 'left' },
{ label: '港澳名称', key: 'nameHk', align: 'left' }, { label: '港澳名称', key: 'nameHk', align: 'left' },
{ label: '链接', key: 'url', align: 'left' }, { label: '链接', key: 'url', align: 'left' }
] ]
}, }
}, },
mounted() { mounted() {
this.getlist() this.getlist()
...@@ -120,9 +116,7 @@ export default { ...@@ -120,9 +116,7 @@ export default {
if (!this.isLoad) { if (!this.isLoad) {
this.isLoad = true this.isLoad = true
this.currentPage++ this.currentPage++
if ( if (this.sourceData.length >= this.sourceDataTotal) {
this.sourceData.length >= this.sourceDataTotal
) {
return return
} }
this.getlist(true) this.getlist(true)
...@@ -130,27 +124,34 @@ export default { ...@@ -130,27 +124,34 @@ export default {
} }
}, },
getlist() { getlist() {
const { pageSize, currentPage } = const { pageSize, currentPage } = this.paginationOptions
this.paginationOptions this.searchLoading = true
axios axios
.post('LogisticsCarrierCode/list_page', { .post(
pageSize, 'LogisticsCarrierCode/list_page',
currentPage, {
...this.searchForm, pageSize,
}, { currentPage,
baseURL: '/api/manage/rest', ...this.searchForm
}) },
{
baseURL: '/api/manage/rest'
}
)
.then((res) => { .then((res) => {
this.sourceData = res.data.records this.sourceData = res.data.records
this.paginationOptions.total = res.data.total this.paginationOptions.total = res.data.total
this.searchLoading = false
}) })
}, .catch(() => {
}, this.searchLoading = false
})
}
}
} }
</script> </script>
<style scoped> <style scoped>
.wrap { .wrap {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
...@@ -170,8 +171,7 @@ export default { ...@@ -170,8 +171,7 @@ export default {
padding-left: 0; padding-left: 0;
} }
.table_wrap >>> .vxe-header--column.tablecolgroup, .table_wrap >>> .vxe-header--column.tablecolgroup,
.table_wrap .table_wrap >>> .vxe-header--column.col--ellipsis.tablecolgroup {
>>> .vxe-header--column.col--ellipsis.tablecolgroup {
height: 22px !important; height: 22px !important;
} }
.table_wrap >>> .vxe-cell { .table_wrap >>> .vxe-cell {
......
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