Browse Source

站点列表布局及表格内嵌套内容逻辑

pull/1/head
zq 3 months ago
parent
commit
9b10146f48
  1. 1
      src/assets/site/addIcon.svg
  2. 1
      src/assets/site/dropdown_chose_ic.svg
  3. 1
      src/assets/site/info_filled.svg
  4. 7
      src/components/GuipDialog.vue
  5. 185
      src/components/GuipSelectFilter.vue
  6. 11
      src/router/index.js
  7. 28
      src/style/theme/common.scss
  8. 2
      src/style/theme/index.css
  9. 363
      src/views/SiteList.vue
  10. 49
      src/views/SiteSettings.vue

1
src/assets/site/addIcon.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="13.356201171875" height="13" viewBox="0 0 13.356201171875 13"><g><g><path d="M12.0177,5.19723C12.1981,5.19723,12.3713,5.23188,12.5374,5.30117C12.7035,5.37047,12.8459,5.46286,12.9646,5.57836C13.0833,5.69385,13.1782,5.83245,13.2494,5.99414C13.3206,6.15583,13.3562,6.32445,13.3562,6.5C13.3562,6.68479,13.3206,6.85572,13.2494,7.01279C13.1782,7.16987,13.0833,7.30615,12.9646,7.42164C12.8459,7.53714,12.7035,7.62953,12.5374,7.69883C12.3713,7.76812,12.1981,7.80277,12.0177,7.80277L8.01655,7.80277L8.01655,11.6972C8.01655,11.882,7.98095,12.0529,7.90975,12.21C7.83856,12.3671,7.74363,12.5034,7.62497,12.6189C7.50632,12.7344,7.36393,12.8268,7.1978,12.8961C7.03168,12.9654,6.85844,13,6.67808,13C6.48823,13,6.31261,12.9654,6.15124,12.8961C5.98986,12.8268,5.84985,12.7344,5.73119,12.6189C5.61253,12.5034,5.51761,12.3671,5.44641,12.21C5.37522,12.0529,5.33962,11.882,5.33962,11.6972L5.33962,7.80277L1.33846,7.80277C1.14861,7.80277,0.972997,7.76812,0.811622,7.69883C0.650247,7.62953,0.51023,7.53714,0.391572,7.42164C0.272914,7.30615,0.177987,7.16987,0.106792,7.01279C0.0355975,6.85572,-1.97606e-16,6.68479,0,6.5C0,6.32445,0.0355975,6.15583,0.106792,5.99414C0.177987,5.83245,0.272914,5.69385,0.391572,5.57836C0.51023,5.46286,0.650247,5.37047,0.811622,5.30117C0.972997,5.23188,1.14861,5.19723,1.33846,5.19723L5.33962,5.19723L5.33962,1.30277C5.33962,1.12722,5.37522,0.9586,5.44641,0.796908C5.51761,0.635217,5.61253,0.496624,5.73119,0.38113C5.84985,0.265636,5.98986,0.173241,6.15124,0.103945C6.31261,0.0346482,6.48823,3.2056e-17,6.67808,0C7.0483,0,7.36393,0.127043,7.62497,0.38113C7.88602,0.635217,8.01655,0.942431,8.01655,1.30277L8.01655,5.19723L12.0177,5.19723Z" fill="#8A9099" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

1
src/assets/site/dropdown_chose_ic.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><g><g></g><g><path d="M13.5732,5.315390953125Q13.6985,5.197082953125,13.7668,5.0388329531250005Q13.835,4.880582953125,13.835,4.708251953125Q13.835,4.626011653125,13.819,4.545351953125Q13.8029,4.464691953125,13.7714,4.388710953125Q13.74,4.3127309531249995,13.6943,4.244350953125Q13.6486,4.175970953125,13.5904,4.117817953125Q13.5323,4.059664953125,13.4639,4.013974953125Q13.3955,3.968284953125,13.3195,3.936812953125Q13.2436,3.905340953125,13.1629,3.889295953125Q13.0822,3.873251953125,13,3.873251953125Q12.90746,3.873251953125,12.81716,3.8935169531250002Q12.72686,3.913781953125,12.64319,3.953328953125Q12.55951,3.992875953125,12.48654,4.049783953125Q12.41356,4.106692953125,12.35481,4.178200953125L7.06803,9.842611953125001L3.542182,7.198221953125Q3.428807,7.101421953125,3.288942,7.049841953125Q3.149076,6.998251953125,3,6.998251953125Q2.9177597,6.998251953125,2.8371,7.014291953124999Q2.75644,7.030341953125,2.680459,7.061811953125Q2.604479,7.093281953125,2.536099,7.138971953125Q2.4677189999999998,7.184661953125,2.409566,7.242821953125Q2.351413,7.300971953125,2.305723,7.369351953124999Q2.260033,7.437731953125001,2.228561,7.513711953125Q2.197089,7.589691953125,2.181044,7.6703519531249995Q2.165,7.7510119531249995,2.165,7.833251953125Q2.165,7.937161953125,2.190469,8.037911953125Q2.215938,8.138651953125,2.265322,8.230081953125Q2.314706,8.321511953125,2.384993,8.398041953125Q2.45528,8.474581953125,2.542182,8.531551953125L6.66667,11.624921953125Q6.72781,11.670781953125001,6.796279999999999,11.704751953125001Q6.864739999999999,11.738721953125001,6.93825,11.759671953125Q7.01175,11.780621953125,7.08784,11.787851953125Q7.16393,11.795081953124999,7.24006,11.788351953125Q7.31619,11.781621953125,7.38983,11.761151953125001Q7.46347,11.740681953125,7.53216,11.707161953125Q7.60084,11.673641953125,7.66229,11.628181953125Q7.72373,11.582721953124999,7.77588,11.526851953125L13.5732,5.315390953125Z" fill-rule="evenodd" fill="#006AFF" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

1
src/assets/site/info_filled.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_140_48451"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_140_48451)"><g><path d="M8,1C9.97933,1.052,11.6278,1.7368329999999998,12.9455,3.0545C14.2632,4.372170000000001,14.948,6.02067,15,8C14.948,9.97933,14.2632,11.6278,12.9455,12.9455C11.6278,14.2632,9.97933,14.948,8,15C6.02067,14.948,4.372170000000001,14.2632,3.0545,12.9455C1.7368329999999998,11.6278,1.052,9.97933,1,8C1.052,6.02067,1.7368329999999998,4.372170000000001,3.0545,3.0545C4.372170000000001,1.7368329999999998,6.02067,1.052,8,1C8,1,8,1,8,1C8,1,8,1,8,1ZM9.047,5.297C9.318,5.297,9.542,5.21633,9.719,5.055C9.896,4.89367,9.9845,4.6775,9.9845,4.406499999999999C9.9845,4.1355,9.896,3.91933,9.719,3.758C9.542,3.59667,9.32067,3.516,9.055,3.516C8.78933,3.516,8.568,3.59667,8.391,3.758C8.214,3.91933,8.125499999999999,4.1355,8.125499999999999,4.406499999999999C8.125499999999999,4.6775,8.214,4.89367,8.391,5.055C8.568,5.21633,8.78683,5.297,9.0475,5.297C9.0475,5.297,9.047,5.297,9.047,5.297C9.047,5.297,9.047,5.297,9.047,5.297ZM9.2345,10.922C9.2345,10.85933,9.23967,10.776,9.25,10.672C9.26033,10.568,9.26033,10.469,9.25,10.375C9.25,10.375,8.422,11.328,8.422,11.328C8.33867,11.4217,8.25267,11.4947,8.164,11.547C8.075330000000001,11.5993,7.99983,11.615,7.9375,11.594C7.84383,11.5523,7.80217,11.4793,7.8125,11.375C7.8125,11.375,9.1875,7.047,9.1875,7.047C9.2395,6.75533,9.19267,6.50533,9.047,6.297C8.90133,6.08867,8.667,5.96367,8.344000000000001,5.922C7.97933,5.93233,7.58083,6.086,7.1485,6.383C6.71617,6.68,6.3385,7.05767,6.0155,7.516C6.0155,7.516,6.0155,7.7505,6.0155,7.7505C6.00517,7.85483,6.00517,7.95383,6.0155,8.0475C6.0155,8.0475,6.8435,7.0945,6.8435,7.0945C6.92683,7.00083,7.01283,6.92783,7.1015,6.8755C7.19017,6.82317,7.2605,6.8075,7.3125,6.8285C7.41683,6.8805,7.45333,6.96383,7.422,7.0785C7.422,7.0785,6.0625,11.391,6.0625,11.391C5.9895,11.6513,6.026,11.8832,6.172,12.0865C6.318,12.2898,6.57317,12.4278,6.9375,12.5005C7.4585,12.4902,7.896,12.3392,8.25,12.0475C8.604,11.7558,8.93217,11.3808,9.2345,10.9225C9.2345,10.9225,9.2345,10.922,9.2345,10.922C9.2345,10.922,9.2345,10.922,9.2345,10.922Z" fill="#FB832D" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

7
src/components/GuipDialog.vue

@ -5,11 +5,12 @@
:width="width"
:show-close="showCloseButton"
:before-close="handleClose"
:class="type == 'center' ?'center' : 'normal'"
>
<!-- 自定义内容 -->
<slot></slot>
<!-- 底部按钮 -->
<span slot="footer" class="dialog-footer flex" style="justify-content: space-between;">
<span slot="footer" :class="[type == 'center' ? 'dialog-footer-center' : 'dialog-footer-normal', 'flex']" style="justify-content: space-between;">
<GuipButton v-if="showCancelButton" @click="handleCancel" type="mild" >{{ cancelText }}</GuipButton>
<GuipButton type="primary" @click="handleConfirm">{{ confirmText }}</GuipButton>
</span>
@ -22,6 +23,10 @@
export default {
name: 'CustomDialog',
props: {
type:{
type:String,
default:'normal'
},
//
dialogVisible: {
type: Boolean,

185
src/components/GuipSelectFilter.vue

@ -0,0 +1,185 @@
<template>
<el-select width="120px" v-model="selectedValue" v-bind="$attrs" :clearable="clearable" :placeholder="placeholder"
@change="handleChange" @clear="handleClear">
<!-- 搜索框 searchable true 时显示 -->
<template v-if="searchable">
<el-input v-model="searchText" height="30px" size="small" :placeholder="searchPlaceholder"
class="select-search-input" @input="handleSearch" />
</template>
<div class="optionsList">
<!-- 下拉选项 -->
<el-option v-for="item in filteredOptions" :key="item[valueKey]" :value="item[valueKey]"
:label="item[labelKey]" class="flex-between">
<span>{{ item.label }}</span>
<img v-if="item[valueKey] == selectedValue" src="@/assets/site/dropdown_chose_ic.svg" alt="">
</el-option>
</div>
</el-select>
</template>
<script>
// import GuipInput from '@/components/GuipInput.vue';
export default {
name: 'SearchableSelect',
components: {
// GuipInput
},
props: {
//
value: {
type: [String, Number, Array],
default: ''
},
//
options: {
type: Array,
default: () => []
},
//
searchable: {
type: Boolean,
default: true
},
//
clearable: {
type: Boolean,
default: true
},
//
placeholder: {
type: String,
default: '请选择'
},
//
searchPlaceholder: {
type: String,
default: '输入关键字搜索'
},
// label
labelKey: {
type: String,
default: 'label'
},
// value
valueKey: {
type: String,
default: 'value'
},
//
filterMethod: {
type: Function,
default: null
}
},
data() {
return {
selectedValue: this.value,
searchText: '',
filteredOptions: this.options
}
},
watch: {
value(newVal) {
console.log(this.selectedValue, 'selectedValue---');
this.selectedValue = newVal
},
options(newOptions) {
this.filteredOptions = newOptions
//
if (this.searchText) {
this.handleSearch(this.searchText)
}
}
},
methods: {
//
handleSearch(keyword) {
console.log(keyword,'keyword---');
if (this.filterMethod && typeof this.filterMethod === 'function') {
// 使
this.filteredOptions = this.filterMethod(keyword, this.options)
} else {
//
if (!keyword) {
this.filteredOptions = this.options
} else {
const lowerKeyword = keyword.toLowerCase()
this.filteredOptions = this.options.filter(item => {
const label = item[this.labelKey] || ''
return label.toString().toLowerCase().includes(lowerKeyword)
})
}
}
},
//
handleChange(value) {
this.$emit('input', value)
this.$emit('change', value)
},
//
handleClear() {
this.searchText = ''
this.filteredOptions = this.options
this.$emit('clear')
}
}
}
</script>
<style scoped lang="scss">
.optionsList{
max-height: 230px;
overflow-y: auto;
}
.select-search-input {
padding: 6px 12px;
width: 206px;
margin-bottom: 12px;
outline: none;
border-color: transparent !important;
/* margin: 6px 12px; */
box-sizing: border-box;
}
::v-deep .el-input__inner:hover {
border-color: #006aff;
}
::v-deep .el-input__inner:focus {
border-color: #006aff;
}
.el-form-item{
margin-bottom: 0;
}
::v-deep .el-select-dropdown__list {
padding: 12px 0;
}
::v-deep .el-input__inner {
padding: 6px 10px;
}
.el-select-dropdown__item.selected {
font-weight: normal;
}
.el-select-dropdown__item {
padding: 6px 10px;
border-radius: 2px;
color: #1E2226;
background: #FFFFFF;
margin: 0 12px;
&:hover {
background: #F6F7FA;
}
}
</style>

11
src/router/index.js

@ -7,8 +7,8 @@ import HomeView from '../views/HomeView.vue';
Vue.use(VueRouter)
const whiteSlideList = ['/','/ui','/siteList'];//侧边导航白名单
const whiteHeaderList = ['/','/ui','/register','/settingServicePrice','/siteList'];//头部导航白名单
const whiteFooterList = ['/','/ui','/settingServicePrice'];//底部白名单
const whiteHeaderList = ['/','/ui','/register','/configureServicePrices','/siteList'];//头部导航白名单
const whiteFooterList = ['/','/ui','/configureServicePrices'];//底部白名单
const routes = [
{
path: '/',
@ -50,7 +50,7 @@ const routes = [
component: () => import(/* webpackChunkName: "franchise" */ '../views/Franchise.vue')
},
{
path: '/settingServicePrice',
path: '/configureServicePrices',
name: '配置服务价格',
component: () => import(/* webpackChunkName: "franchise" */ '../views/ConfigureServicePrices.vue')
},
@ -59,6 +59,11 @@ const routes = [
name: '站点列表',
component: () => import(/* webpackChunkName: "franchise" */ '../views/SiteList.vue')
},
{
path: '/siteBaseSetting',
name: '站点基础设置',
component: () => import(/* webpackChunkName: "franchise" */ '../views/SiteBaseSetting.vue')
},
]
const router = new VueRouter({

28
src/style/theme/common.scss

@ -497,7 +497,7 @@ body {
.el-table th.el-table__cell {
background: #F6F7FA;
padding: 18px 0;
padding: 10px 0;
}
.el-table th.el-table__cell>.cell {
@ -527,7 +527,7 @@ body {
// dialog--start
.el-dialog {
min-height: 344px;
min-height: 214px;
max-height: 550px;
border-radius: 4px;
background: #FFFFFF;
@ -539,6 +539,7 @@ body {
font-size: 20px;
font-weight: bold;
line-height: 26px;
text-align: left;
letter-spacing: 0.08em;
color: #1F2026;
padding: 32px 32px 12px;
@ -555,17 +556,28 @@ body {
justify-content: center;
padding: 0 32px 32px !important;
.dialog-footer {
.dialog-footer-center {
width: 100%;
justify-content: space-between;
button {
width: 247px;
height: 44px;
}
}
button {
width: 247px;
height: 44px;
.dialog-footer-normal {
width: 100%;
justify-content: flex-end !important;
button {
width: 96px;
height: 38px;
}
}
}
.center {
.el-dialog .el-dialog__header{
text-align: center;
}
}
// dialog--end
// switch --start

2
src/style/theme/index.css

@ -10056,7 +10056,7 @@
text-overflow: ellipsis;
white-space: normal;
word-break: break-all;
line-height: 23px;
line-height: 18px;
padding-left: 10px;
padding-right: 10px
}

363
src/views/SiteList.vue

@ -4,16 +4,38 @@
<template>
<div class="siteList-wrap column">
<div class="siteList-main ">
<div class="flex-between">
<div class="flex-between site-top">
<div class="left flex">
<h2>站点列表</h2>
<GuipButton size="medium" type="normal" @click="cancelEdit(row, 'price')">
<img src="@/assets/site/form_link.svg" alt="">新增分组
<GuipButton size="medium" class="addgroupBtn" type="normal"
:btnstyle="{ width: '115px', hright: '32px' }" @click="addGroupVisiable = true">
<img src="@/assets/site/addIcon.svg" alt="">新增分组
</GuipButton>
<div style="width: 120px;">
<GuipSelectFilter v-model="selectedValue" :options="options" :searchable="true" placeholder="请选择"
:filter-method="customFilter" search-placeholder="搜索..." />
</div>
<!-- <searchable-select :styleObj="{
'width': '140px', 'height': '32px'
}" v-model="selectedValue1" :options="options1" :searchable="true" placeholder="请选择"
search-placeholder="关键词搜索" @change="handleChange" />
<el-form>
<GuipSelect width="600px" v-model="selectedValue" :options="options" defaultValue="选项1" />
</el-form>
-->
<!-- <GuipSelectFilter2
v-model="selectedValue"
:options="options1"
:searchable="true"
placeholder="请选择水果"
search-placeholder="搜索水果名称"
no-data-text="没有找到匹配的水果"
@change="handleFruitChange"
/> -->
</div>
<div class="right">
<GuipButton size="medium" @click="cancelEdit(row, 'price')">
<img src="@/assets/site/form_link.svg" alt="">新增分组
<GuipButton size="medium" @click="addSite" :btnstyle="btnstyleObj_add" type="primary">新增站点
</GuipButton>
</div>
</div>
@ -23,74 +45,101 @@
<!-- 其他列 -->
<el-table-column prop="name" label="站点简称" width="210">
<template slot-scope="scope">
<div class="flex cell_render">
<span class="">{{ scope.row.name }}</span>
<a class="name_link flex cell_render" :href="scope.row.link" target="_blank">
{{ scope.row.name }}
<img class="edit_icon" src="@/assets/site/form_link.svg" alt="">
</div>
</a>
</template>
</el-table-column>
<el-table-column prop="registerDate" label="注册时间"></el-table-column>
<!-- 价格列 -->
<el-table-column label="站点分组">
<template v-slot="{ row, $index }">
<el-popover v-model="row.price_popover" placement="top" trigger="manual"
<el-table-column label="站点分组" prop="group">
<template slot-scope="scope">
<!-- <a class="name_link flex cell_render" :href="scope.row.link" target="_blank">
{{ scope.row.name }}
<img class="edit_icon" src="@/assets/site/form_link.svg" alt="">
</a> -->
<!-- <searchable-select slot="reference" :styleObj="{ 'width': '140px', 'height': '32px','position': 'absolute',
'z-index': '1119' }" v-model="scope.row.group"
:options="options1" :searchable="true" placeholder="请选择" search-placeholder="关键词搜索"
@change="handleChange" /> -->
<!-- <GuipSelect width="600px" v-model="scope.row.group" prop="card" :options="options"
defaultValue="选项1" /> -->
<GuipSelectFilter v-model="scope.row.group" :options="options" :searchable="true"
placeholder="请选择" :filter-method="customFilter" search-placeholder="搜索..." />
<!-- <GuipSelectFilter2
v-model="scope.row.group"
:options="options1"
:searchable="true"
placeholder="请选择水果"
search-placeholder="搜索水果名称"
no-data-text="没有找到匹配的水果"
@change="handleFruitChange"
/> -->
</template>
<!-- <template v-slot="{ row, $index }">
<el-popover v-model="row.group_popover" placement="top" trigger="manual"
:ref="`popover-${$index}`" @show="popshow">
<!-- 弹框内容 -->
<!-- <el-input v-model="row.edit_price" size="small" placeholder="请输入价格" /> -->
<div class="flex"
style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row, 'price')">取消</GuipButton>
<GuipButton type="primary" @click="savePrice(row, 'price')" size="medium">确定
</GuipButton>
</div>
<!-- 触发弹框的按钮 -->
<span slot="reference" @click="handlePriceClick(row, $index, 'price')">
<searchable-select slot="reference" :styleObj="{ 'width': '140px', 'height': '32px' }" v-model="selectedValue1"
:options="options1" :searchable="true" placeholder="请选择" search-placeholder="关键词搜索"
@change="handleChange" >
<span @click="handlePriceClick(row, $index, 'group')">
<div class="flex cell_render">
<span v-if="row.group" :key="random()">{{ groupList[row.group] }}</span>
<img class="edit_icon" src="@/assets/site/drop_icon.svg" alt="">
</div>
</span>
</searchable-select>
</el-popover>
</template>
</template> -->
</el-table-column>
<el-table-column prop="phoneService" label="手机服务" :filters="phoneService"
:filter-method="filterHandler">
</el-table-column>
<!-- <el-table-column prop="department" label="部门">
<template #default="{ row, $index }">
<template v-if="editingIndex === $index">
<searchable-select v-model="row.department" :options="departmentOptions"
@change="handleDepartmentChange(row, $index)" @click.native.stop />
</template>
<template v-else>
<span @click="startEditing($index)">{{ row.department }}</span>
</template>
</template>
</el-table-column> -->
<el-table-column prop="status" label="状态" width="195">
<template v-slot="{ row, $index }">
<el-popover v-model="row.num_popover" placement="top" trigger="manual"
<el-popover v-model="row.status_popover" placement="top" trigger="manual"
:ref="`popover-${$index}`" @show="popshow">
<!-- 弹框内容 -->
<div style="text-align: center">
<div class="flex"
style="text-align: right; margin-top: 32px;justify-content: flex-end;">
<GuipButton size="medium" @click="cancelEdit(row, 'phoneService')">取消
</GuipButton>
<GuipButton type="primary" @click="savePrice(row, 'phoneService')"
size="medium">确定
</GuipButton>
</div>
<div class="statusList">
<p class="flex">
<img style="margin-right: 8px;" src="@/assets/site/info_filled.svg"
alt="">自有域名验证未通过
</p>
<p class="flex" style="margin: 12px 0;">
<img style="margin-right: 8px;" src="@/assets/site/info_filled.svg"
alt="">收款方式未配置
</p>
<p class="flex">
<img style="margin-right: 8px;" src="@/assets/site/info_filled.svg"
alt="">支付宝收款账号未配置
</p>
</div>
<!-- 触发弹框的按钮 -->
<span slot="reference" @click="handlePriceClick(row, $index, 'phoneService')">
<span slot="reference" @click="handlePriceClick(row, $index, 'status')">
<div class="flex cell_render">
<span>{{ row.phoneService }}</span>
<span :class="(row.status == '0' ? 'in_services' : 'in_config')">{{
row.status == '0' ? '运行中' : '配置中' }}</span>
<img class="edit_icon" v-if="row.status == '1'"
src="@/assets/site/more_setIcon.png" alt="">
</div>
</span>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="status" label="状态" width="195">
<template slot-scope="scope">
<div class="flex cell_render" @click="popPayMentModal(scope.row)">
<span :class="(scope.row.status == '0' ? 'in_services' : 'in_config')">{{
scope.row.status
==
'0' ? '运行中' : '配置中' }}</span>
<img class="edit_icon" src="@/assets/site/more_setIcon.png" alt="">
</div>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="182">
<template slot-scope="scope">
<div class="flex">
@ -106,6 +155,11 @@
</el-pagination>
</el-form>
</div>
<GuipDialog type="normal" width="396px" :dialogVisible="addGroupVisiable" title="温馨提示" :show-close-button="false"
:show-cancel-button="true" cancelText="取消" confirmText="确定" @confirm="handleConfirmAddGroup" @cancel="handleCancelAddGroup"
@dialogVisibleChange="dialogVisibleChange">
<el-input ref="GuipInput" width="252px" v-model="groupName" label="分组名称" placeholder="请输入名称" />
</GuipDialog>
<Footer></Footer>
</div>
</template>
@ -113,30 +167,80 @@
import Footer from '@/components/Footer.vue';
// import GuipInput from '@/components/GuipInput.vue';
import GuipButton from '@/components/GuipButton.vue';
// import GuipSelect from '@/components/GuipSelect.vue';
import GuipSelectFilter from '@/components/GuipSelectFilter.vue';
import GuipDialog from '@/components/GuipDialog.vue';
// import SearchableSelect from '@/components/GuipSelectFilter1.vue';
// import GuipSelectFilter2 from '@/components/GuipSelectFilter2.vue';
// import SearchableSelect from '@/components/GuipSelectFilter2.vue'
export default {
name: 'sitelist',
components: {
// HelloWorld
// GuipInput,
GuipDialog,
GuipSelectFilter,
// SearchableSelect,
// GuipSelectFilter2,
// SearchableSelect,
// GuipSelect,
Footer,
GuipButton
},
data() {
return {
searchText: '',
filteredOptions: this.options,
editingIndex: -1,
groupName: '',//
addGroupVisiable: false,
selectedValue: '',
fruitOptions: [
{ label: '苹果', value: 'apple' },
{ label: '香蕉', value: 'banana' },
{ label: '橙子', value: 'orange' },
{ label: '葡萄', value: 'grape' },
{ label: '西瓜', value: 'watermelon' },
{ label: '菠萝', value: 'pineapple' }
],
options: [
{ label: '选项1', value: '1' },
{ label: '选项2', value: '2' },
{ label: '选项3', value: '3' },
// ...
],
selectedValue1: '',
options1: [
{ label: '苹果', value: '1' },
{ label: '香蕉', value: '2' },
{ label: '橙子', value: '22' },
{ label: '葡萄', value: '13' },
{ label: '西瓜', value: '31' },
{ label: '菠萝', value: '32' },
{ label: '菠萝1', value: '14' },
{ label: '菠萝2', value: '15' },
{ label: '菠萝21', value: '156' },
{ label: '菠萝22', value: '24' },
],
btnstyleObj_add: {
width: '90px',
height: '30px'
},
tableData: [
{
name: '哈哈哈',
link: 'http://www.chachongz.com',
registerDate: '2025.02.18',
group: '1',
phoneService: '',
phoneService: '撒大事',
status: '1',//
},
{
name: '知网学诚教育',
link: 'http://new.checkcopy.com',
registerDate: '2025.02.18',
group: '2',
phoneService: '',
phoneService: '设计部',
status: '0',//
},
],
@ -175,7 +279,79 @@ export default {
]
}
},
mounted() {
const list = ['group', 'status']
list.forEach(item => {
this.tableData = this.tableData.map(item1 => {
item1[item + '_popover'] = false
return {
...item1,
}
})
})
console.log(this.tableData, '000--');
},
methods: {
//
handleSearch(keyword) {
console.log(keyword,'keyword---');
if (this.filterMethod && typeof this.filterMethod === 'function') {
// 使
this.filteredOptions = this.filterMethod(keyword, this.options)
} else {
//
if (!keyword) {
this.filteredOptions = this.options
} else {
const lowerKeyword = keyword.toLowerCase()
this.filteredOptions = this.options.filter(item => {
const label = item[this.labelKey] || ''
return label.toString().toLowerCase().includes(lowerKeyword)
})
}
}
},
startEditing(index) {
this.editingIndex = index
// 便
this.originalData = JSON.parse(JSON.stringify(this.tableData[index]))
},
saveEditing() {
this.editingIndex = -1
this.originalData = null
this.$message.success('保存成功')
},
cancelEditing() {
if (this.originalData) {
this.$set(this.tableData, this.editingIndex, this.originalData)
}
this.editingIndex = -1
this.originalData = null
},
handleDepartmentChange(row, index) {
console.log('部门已修改:', index, row.department)
//
},
//
handleConfirmAddGroup() {
this.$message.success('点击了确认按钮');
this.addGroupVisiable = false;
},
//
handleCancelAddGroup() {
this.$message.warning('点击了取消按钮');
this.addGroupVisiable = false;
},
dialogVisibleChange(data) {
console.log(data, 'data098908090');
},
handleChange(value) {
console.log('选中值变化:', value)
},
popshow() {
var ariaEls = document.querySelectorAll('.el-popover')
ariaEls.forEach((item) => {
@ -208,13 +384,57 @@ export default {
handleServiceClick(row) {
console.log(row);
},
addGroup() {
//
},
addSite() {
//
},
//
customFilter(keyword, options) {
if (!keyword) return options
return options.filter(item => {
//
return item.label.includes(keyword) || item.value.includes(keyword)
})
},
customFilter1(keyword, options) {
if (!keyword) return options
// label value
return options.filter(item => {
return (
item.label.includes(keyword) ||
item.value.toString().includes(keyword)
)
})
},
handleFruitChange(value) {
console.log('水果选择变化:', value)
},
//
handlePriceClick(row, index, type) {
//
this.tableData.forEach((item, i) => {
if (i !== index) {
item[type + '_popover'] = false;
}
});
//
row[type + '_popover'] = true;
row['edit_' + type] = row[type]
// row.edit_price = row.price; //
},
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-popover {
padding: 24px 32px !important;
}
.siteList-wrap {
padding: 12px;
padding: 12px 12px 0;
width: 100%;
height: 100%;
box-sizing: border-box;
@ -227,6 +447,14 @@ export default {
color: #FF4D4F;
}
.addgroupBtn {
margin: 0 12px;
img {
margin-right: 4px;
}
}
.siteList-main {
flex: 1;
padding: 32px 36px;
@ -234,9 +462,33 @@ export default {
box-sizing: border-box;
width: 100%;
background: #FFFFFF;
// span {
// color: #1E2226;
// }
.site-top {
margin-bottom: 32px;
.left {
h2 {
margin: 0;
}
}
}
.statusList {
padding: 24px 32px;
img {
margin-right: 8px;
}
p {
display: flex;
align-items: center;
}
letter-spacing: 0.08em;
color: #1E2226;
}
.edit_icon {
width: 16px;
@ -246,6 +498,11 @@ export default {
margin-left: 8px;
}
.name_link {
text-decoration: none;
color: #1E2226;
}
.el-table__row:hover {
.edit_icon {
display: block;

49
src/views/SiteSettings.vue

@ -1,49 +0,0 @@
<template>
<div class="site-setting-wrap">
</div>
</template>
<script>
// import GuipInput from '@/components/GuipInput.vue';
export default {
//
name: '',
props: [''],
components: {
// GuipInput,
},
data() {
return {
}
},
methods: {
onSwitchChange(data) {
console.log(data, '---');
}
}
}
</script>
<style lang="scss">
.domain-wrap {
.domain-item{
margin-bottom: 10px;
}
.domain-item p:last-child{
padding-left: 23px;
color: #8A9099;
}
p{
text-align: left;
line-height: 18px;
margin-bottom: 8px;
}
.domain-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
}
</style>
Loading…
Cancel
Save