|
|
@ -1,5 +1,5 @@ |
|
|
<script setup> |
|
|
<script setup> |
|
|
import { onMounted, ref } from 'vue' |
|
|
|
|
|
|
|
|
import { onMounted, ref, watch } from 'vue' |
|
|
|
|
|
|
|
|
import { ElMessage } from 'element-plus' |
|
|
import { ElMessage } from 'element-plus' |
|
|
import moment from 'moment' |
|
|
import moment from 'moment' |
|
|
@ -10,9 +10,18 @@ import { useAdminStore } from "@/store/index.js" |
|
|
import { storeToRefs } from "pinia" |
|
|
import { storeToRefs } from "pinia" |
|
|
import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js" |
|
|
import { findMenuById, permissionMapping } from "@/utils/menuTreePermission.js" |
|
|
const adminStore = useAdminStore() |
|
|
const adminStore = useAdminStore() |
|
|
const { adminData, menuTree } = storeToRefs(adminStore) |
|
|
|
|
|
|
|
|
const { adminData, menuTree, flag } = storeToRefs(adminStore) |
|
|
//新增复选框员工数据 |
|
|
//新增复选框员工数据 |
|
|
const showEmployeeData = ref(false) |
|
|
|
|
|
|
|
|
// const showEmployeeData = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
// 监听全局flag状态变化 |
|
|
|
|
|
watch(flag, (newFlag, oldFlag) => { |
|
|
|
|
|
// 当flag状态改变时,重新发送请求 |
|
|
|
|
|
if (newFlag !== oldFlag) { |
|
|
|
|
|
console.log('员工数据flag状态改变,重新加载数据', newFlag) |
|
|
|
|
|
get() |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 标记当前激活的时间范围按钮 |
|
|
// 标记当前激活的时间范围按钮 |
|
|
@ -165,7 +174,10 @@ const get = async function (val) { |
|
|
const result = await API({ |
|
|
const result = await API({ |
|
|
url: '/goldDetail/getGoldDetail', |
|
|
url: '/goldDetail/getGoldDetail', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
data: { ...getObj.value, goldDetail: { ...goldDetail.value, flag: showEmployeeData.value ? 0 : 1 } } |
|
|
|
|
|
|
|
|
data: { ...getObj.value, goldDetail: { ...goldDetail.value, |
|
|
|
|
|
// flag: showEmployeeData.value ? 0 : 1 |
|
|
|
|
|
flag: flag.value |
|
|
|
|
|
} } |
|
|
}) |
|
|
}) |
|
|
console.log('响应数据', result) |
|
|
console.log('响应数据', result) |
|
|
tableData.value = result.data.list |
|
|
tableData.value = result.data.list |
|
|
@ -174,7 +186,10 @@ const get = async function (val) { |
|
|
url: '/goldDetail/getTotal', |
|
|
url: '/goldDetail/getTotal', |
|
|
method: 'post', |
|
|
method: 'post', |
|
|
data: { |
|
|
data: { |
|
|
goldDetail: { ...goldDetail.value, flag: showEmployeeData.value ? 0 : 1 }, |
|
|
|
|
|
|
|
|
goldDetail: { ...goldDetail.value, |
|
|
|
|
|
// flag: showEmployeeData.value ? 0 : 1 |
|
|
|
|
|
flag: flag.value |
|
|
|
|
|
}, |
|
|
/* jwcode: goldDetail.value.jwcode || '', |
|
|
/* jwcode: goldDetail.value.jwcode || '', |
|
|
payPlatform: goldDetail.value.payPlatform || '', |
|
|
payPlatform: goldDetail.value.payPlatform || '', |
|
|
type: goldDetail.value.type || '', |
|
|
type: goldDetail.value.type || '', |
|
|
@ -300,7 +315,8 @@ const exportExcel = async function () { |
|
|
endTime: goldDetail.value.endTime || '', |
|
|
endTime: goldDetail.value.endTime || '', |
|
|
sortField: goldDetail.value.sortField || '', |
|
|
sortField: goldDetail.value.sortField || '', |
|
|
sortOrder: goldDetail.value.sortOrder || '', |
|
|
sortOrder: goldDetail.value.sortOrder || '', |
|
|
flag: showEmployeeData.value ? 0 : 1 // 新增 flag 参数 |
|
|
|
|
|
|
|
|
// flag: showEmployeeData.value ? 0 : 1 // 新增 flag 参数 |
|
|
|
|
|
flag: flag.value |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
@ -485,9 +501,9 @@ const format3 = (num) => { |
|
|
<el-cascader class="selectContent" v-model="selectedMarketPath" :options="markets" placeholder="请选择所属地区" |
|
|
<el-cascader class="selectContent" v-model="selectedMarketPath" :options="markets" placeholder="请选择所属地区" |
|
|
style="width:10vw" clearable @change="handleMarketChange" /> |
|
|
style="width:10vw" clearable @change="handleMarketChange" /> |
|
|
</div> |
|
|
</div> |
|
|
<div> |
|
|
|
|
|
|
|
|
<!-- <div> |
|
|
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox> |
|
|
<el-checkbox v-model="showEmployeeData" @change="search()">员工数据</el-checkbox> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> --> |
|
|
</div> |
|
|
</div> |
|
|
</el-col> |
|
|
</el-col> |
|
|
|
|
|
|
|
|
|