Commit 3fb0b51c by zhuzhequan

样式修改

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