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

111

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