Commit 8d20d77f authored by 黄奎's avatar 黄奎

111

parents 35acaec6 cd779732
...@@ -125,7 +125,7 @@ const datas = reactive({ ...@@ -125,7 +125,7 @@ const datas = reactive({
Width: 0, Width: 0,
Height: 0, Height: 0,
ColorId: '', ColorId: '',
AuthType: 0,//0-免费模版 1-vip模版 2-私有模版 AuthType: 2,//0-免费模版 1-vip模版 2-私有模版
SubColor: null, // 父级颜色 SubColor: null, // 父级颜色
} }
}, },
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
</el-select> --> </el-select> -->
</div> </div>
<el-input style="max-width:500px" v-model="queryObj.Name" placeholder="请输入关键字" class="q-pr-33" clearable <el-input style="max-width:500px" v-model="queryObj.Name" placeholder="请输入关键字" class="q-pr-33" clearable
@keyup.enter="search"> @keyup.enter="search()">
<template #append> <template #append>
<div class="Market-select-line absolute"></div> <div class="Market-select-line absolute"></div>
<div class="row items-center pointer"> <div class="row items-center pointer">
<img src="../../assets/img/home-search.png" width="21" height="21" <img src="../../assets/img/home-search.png" width="21" height="21"
@click="search"/> @click="search()"/>
</div> </div>
</template> </template>
</el-input> </el-input>
...@@ -44,17 +44,21 @@ ...@@ -44,17 +44,21 @@
v-load-more="tableScrollHandler" :data="dataList" class="tableHBEbeef5 col" height="82vh" v-load-more="tableScrollHandler" :data="dataList" class="tableHBEbeef5 col" height="82vh"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
row-key="ID" row-key="ID"
:tree-props="{ children: 'ChildList', hasChildren: 'hasChildren' }"> :tree-props="{ children: 'ChildList', hasChildren: 'hasChildren' }"
:default-expand-all="datas.defaultExpandAll"
>
<el-table-column type="selection" width="55" <el-table-column type="selection" width="55"
:selectable="selectable" :reserve-selection="true"/> :selectable="selectable" :reserve-selection="true"/>
<el-table-column label="颜色分类"> <el-table-column label="颜色分类">
<template #default="scope"> <template #default="scope">
{{scope.row.ColorName?scope.row.ColorName:''}} <span v-html="queryObj.Name!=''&&scope.row.ColorName?(scope.row.ColorName.replaceAll(queryObj.Name,`<span class='text-waring'>${queryObj.Name}</span>`)):scope.row.ColorName"></span>
<!-- {{scope.row.ColorName?scope.row.ColorName:''}} -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="datas.type==1?'颜色名称':'名称'"> <el-table-column :label="datas.type==1?'颜色名称':'名称'">
<template #default="scope"> <template #default="scope">
{{scope.row.Name}} <div v-html="queryObj.Name!=''&&scope.row.Name?(scope.row.Name.replaceAll(queryObj.Name,`<span class='text-waring'>${queryObj.Name}</span>`)):scope.row.Name"></div>
<!-- {{scope.row.Name}} -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="色值"> <el-table-column label="色值">
...@@ -64,13 +68,14 @@ ...@@ -64,13 +68,14 @@
effect="dark" class="q-mr-md"> effect="dark" class="q-mr-md">
&nbsp; &nbsp;
</el-tag> </el-tag>
{{scope.row.ColorValue}} <div v-html="queryObj.Name!=''&&scope.row.ColorValue?(scope.row.ColorValue.replaceAll(queryObj.Name,`<span class='text-waring'>${queryObj.Name}</span>`)):scope.row.ColorValue"></div>
<!-- {{scope.row.ColorValue}} -->
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="130"> <el-table-column label="操作" width="130">
<template #default="scope"> <template #default="scope">
<el-button type="default" link :icon="Edit" size="small" @click.stop="editDelete(scope.row)">编辑</el-button> <el-button type="default" link :icon="Edit" size="small" @click="editDelete(scope.row)">编辑</el-button>
<el-button type="default" link :icon="Delete" size="small" @click.stop="editDelete(scope.row,scope.$index)">删除</el-button> <el-button v-if="scope.row.Code||(!scope.row.Code&&scope.row.ChildList.length==0)" type="default" link :icon="Delete" size="small" @click="editDelete(scope.row,scope.$index)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -176,7 +181,7 @@ ...@@ -176,7 +181,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { reactive, ref, inject, onMounted, watch} from "vue"; import { reactive, ref, inject, onMounted, watch, nextTick} from "vue";
import { ENT_USER_THEME, VIP_USER_THEME } from "@/configs/customer"; import { ENT_USER_THEME, VIP_USER_THEME } from "@/configs/customer";
import { useUserStore, useFontStore } from "@/store"; import { useUserStore, useFontStore } from "@/store";
import { storeToRefs } from "pinia"; import { storeToRefs } from "pinia";
...@@ -206,11 +211,12 @@ ...@@ -206,11 +211,12 @@
const loading = ref(false as any) const loading = ref(false as any)
const deleteLoading = ref<any>(null) const deleteLoading = ref<any>(null)
const queryObj = reactive({ const queryObj = reactive({
// DictKey: 'Trip_Template_Color', DictKey: 'Trip_Template_Color',
Name: '' Name: ''
}) })
const dataTableRef = ref() const dataTableRef = ref()
const datas = reactive({ const datas = reactive({
defaultExpandAll: false,
type: 1, type: 1,
colorType:[ colorType:[
{Name:'颜色',Id:1}, {Name:'颜色',Id:1},
...@@ -243,6 +249,9 @@ ...@@ -243,6 +249,9 @@
const ColorList = ref([]) const ColorList = ref([])
const multipleSelection = ref([]) const multipleSelection = ref([])
watch(() => datas.defaultExpandAll, (n,o) => {
nextTick(() => dataTableRef.value.doLayout())
})
const setColorDisabled = (ID:number) => { const setColorDisabled = (ID:number) => {
if(datas.addEditVisible) { if(datas.addEditVisible) {
if(datas.params.Code==ID) return true if(datas.params.Code==ID) return true
...@@ -432,6 +441,8 @@ ...@@ -432,6 +441,8 @@
} }
const querySearchHandler = async () => { const querySearchHandler = async () => {
if(!queryObj.Name||queryObj.Name=='') datas.defaultExpandAll = false
if(queryObj.Name) datas.defaultExpandAll = true
loading.value = true loading.value = true
try { try {
let response = await ConfigService.GetTemplateQueryAsync(queryObj) let response = await ConfigService.GetTemplateQueryAsync(queryObj)
...@@ -444,7 +455,6 @@ ...@@ -444,7 +455,6 @@
arrList(response.data.data.ColorList) arrList(response.data.data.ColorList)
DataListAll.value = response.data.data.ColorList DataListAll.value = response.data.data.ColorList
dataList.value = response.data.data.ColorList dataList.value = response.data.data.ColorList
// ColorList.value = response.data.data.ColorList
} }
loading.value = false loading.value = false
} catch (error) { } catch (error) {
......
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
</div> </div>
<div class="text-small text-info text-center">用户ID:9020345764199812103</div> <div class="text-small text-info text-center">用户ID:9020345764199812103</div>
<div class="q-mt-lg setting-body rounded"> <div class="q-mt-lg setting-body rounded">
<div class="setting-item"> <!-- <div class="setting-item">
<div> <div>
<div class="text-dark">手机</div> <div class="text-dark">手机</div>
<div class="">+86 173****7817</div> <div class="">+86 173****7817</div>
</div> </div>
<el-button>更换手机</el-button> <el-button>更换手机</el-button>
</div> </div> -->
<div class="setting-item"> <div class="setting-item">
<div> <div>
<div class="text-dark">邮箱</div> <div class="text-dark">邮箱</div>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
</div> </div>
<el-button>立即绑定</el-button> <el-button>立即绑定</el-button>
</div> </div>
<div class="setting-item"> <!-- <div class="setting-item">
<div> <div>
<div class="text-dark">微信</div> <div class="text-dark">微信</div>
<div class="">已绑定</div> <div class="">已绑定</div>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<div class="">绑定QQ后,可以通过QQ授权登录</div> <div class="">绑定QQ后,可以通过QQ授权登录</div>
</div> </div>
<el-button>立即绑定</el-button> <el-button>立即绑定</el-button>
</div> </div> -->
<div class="setting-item"> <div class="setting-item">
<div> <div>
<div class="text-dark">密码</div> <div class="text-dark">密码</div>
......
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