接口调试

This commit is contained in:
BianLzhaoMin 2025-09-03 15:32:53 +08:00
parent f8bbf49b3f
commit ce07ef0a6b
7 changed files with 145 additions and 86 deletions

View File

@ -108,3 +108,21 @@ export const getExitNoSetListAPI = (data) => {
params: data,
})
}
// 获取常用菜单列表
export const getOftenUseMenuListAPI = (data = {}) => {
return request({
url: '/bmw/homePage/getMenuSelected',
method: 'POST',
data,
})
}
// 设置常用菜单列表
export const setOftenUseMenuListAPI = (data) => {
return request({
url: '/bmw/homePage/addMenu',
method: 'POST',
data,
})
}

View File

@ -452,13 +452,15 @@ export default {
lightStatus: '',
subComId: '',
}
if (query.lightStatus == 3) {
this.$set(query, 'lightStatusSeven', 7)
}
this.filterQueryList.forEach((item) => {
query[item.queryKey] = item.value
})
if (query.lightStatus === 3) {
this.$set(query, 'lightStatusSeven', 7)
}
console.log('query9966996---<insert>', query)
// 使
this.$emit('handelSettingQuery', query)

View File

@ -1687,7 +1687,7 @@ export default {
checkFaceImageAPI(formData)
.then((res) => {})
.catch((err) => {
// this.idCardInfoForm.faceImg = []
this.idCardInfoForm.faceImg = []
})
}
},

View File

@ -288,8 +288,9 @@ export default {
this.queryParams.sex = sex
this.queryParams.isAtt = isAtt
this.queryParams.postId = postId
if (lightStatus === 3) {
console.log('lightStatus9966996--+++', lightStatus)
if (lightStatus == 3) {
console.log('lightStatus9966996', lightStatus)
this.$set(this.queryParams, 'lightStatusSeven', 7)
this.queryParams.lightStatus = 1
}

View File

@ -524,7 +524,7 @@ export default {
console.log('筛选条件', query)
this.queryParams = query
if (query.lightStatus === 3) {
if (query.lightStatus == 3) {
this.$set(this.queryParams, 'lightStatusSeven', 7)
this.queryParams.lightStatus = 1
}

View File

@ -337,7 +337,7 @@ export default {
handelSettingQuery(query) {
console.log('筛选条件', query)
this.queryParams = query
if (query.lightStatus === 3) {
if (query.lightStatus == 3) {
this.$set(this.queryParams, 'lightStatusSeven', 7)
this.queryParams.lightStatus = 1
}

View File

@ -10,8 +10,14 @@
:key="item.name"
class="often-user-item"
v-for="item in selectList"
@click="onHandleOpenOftenUsePage(item)"
>
<i :class="item.icon"> </i>
<!-- <i :class="item.icon"> </i> -->
<svg-icon
class-name="icon"
:icon-class="item.icon"
style="height: 25px; width: 16px"
/>
<span> {{ item.name }} </span>
</div>
</div>
@ -49,7 +55,9 @@
v-for="item in oftenUseList"
>
<el-checkbox
v-model="item.isChecked"
true-label="1"
false-label="0"
v-model="item.checked"
@change="handleChangeTag($event, item)"
>
{{ item.name }}
@ -59,6 +67,9 @@
<!-- 确定按钮 -->
<div class="dialog-setting-btn">
<el-button size="small" @click="handleCloseDialogOuter">
取消
</el-button>
<el-button
type="primary"
size="small"
@ -66,9 +77,6 @@
>
确定
</el-button>
<el-button size="small" @click="handleCloseDialogOuter">
取消
</el-button>
</div>
</div>
</template>
@ -78,6 +86,10 @@
<script>
import DialogModel from '@/components/DialogModel'
import {
getOftenUseMenuListAPI,
setOftenUseMenuListAPI,
} from '@/api/home-index'
export default {
name: 'OftenUse',
components: {
@ -87,72 +99,72 @@ export default {
return {
//
oftenUseList: [
{
name: '考勤统计',
icon: 'el-icon-s-help',
id: 1,
isChecked: true,
},
{
name: '人员库',
icon: 'el-icon-s-help',
id: 2,
isChecked: true,
},
{
name: '用户管理',
icon: 'el-icon-s-help',
id: 3,
isChecked: true,
},
{
name: '工资册审核',
icon: 'el-icon-s-help',
id: 4,
isChecked: false,
},
{
name: '分包合同管理',
icon: 'el-icon-s-help',
id: 5,
isChecked: true,
},
{
name: '组织管理',
icon: 'el-icon-s-help',
id: 6,
isChecked: false,
},
{
name: '黑名单',
icon: 'el-icon-s-help',
id: 7,
isChecked: false,
},
{
name: '考勤管理',
icon: 'el-icon-s-help',
id: 8,
isChecked: false,
},
{
name: '出场管理',
icon: 'el-icon-s-help',
id: 9,
isChecked: false,
},
{
name: '出场管理2',
icon: 'el-icon-s-help',
id: 10,
isChecked: false,
},
{
name: '出场管理3',
icon: 'el-icon-s-help',
id: 11,
isChecked: false,
},
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 1,
// isChecked: true,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 2,
// isChecked: true,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 3,
// isChecked: true,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 4,
// isChecked: false,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 5,
// isChecked: true,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 6,
// isChecked: false,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 7,
// isChecked: false,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 8,
// isChecked: false,
// },
// {
// name: '',
// icon: 'el-icon-s-help',
// id: 9,
// isChecked: false,
// },
// {
// name: '2',
// icon: 'el-icon-s-help',
// id: 10,
// isChecked: false,
// },
// {
// name: '3',
// icon: 'el-icon-s-help',
// id: 11,
// isChecked: false,
// },
],
//
dialogConfig: {
@ -180,28 +192,52 @@ export default {
//
handleChangeTag(value, item) {
if (this.selectCount > 10 && value) {
item.isChecked = false
item.checked = '0'
this.$modal.msgError('最多可设置10个快捷菜单')
}
},
//
onHandleOpenOftenUsePage(item) {
console.log(item, 'item')
// this.$router.push({
// path: item.url,
// })
},
//
handleConfirm() {
console.log(this.selectList)
this.dialogConfig.outerVisible = false
async handleConfirm() {
// console.log(this.selectList)
// this.dialogConfig.outerVisible = false
const res = await setOftenUseMenuListAPI({
idArr: this.selectList.map((item) => item.id).join(','),
})
console.log(res, '设置常用菜单列表')
},
//
async getOftenUseMenuList() {
const { data: res } = await getOftenUseMenuListAPI()
this.oftenUseList = res.menuAllList
console.log(res, '获取常用菜单列表')
},
},
computed: {
//
selectCount() {
return this.oftenUseList.filter((item) => item.isChecked).length
return this.oftenUseList.filter((item) => item.checked == 1).length
},
//
selectList() {
return this.oftenUseList.filter((item) => item.isChecked)
return this.oftenUseList.filter((item) => item.checked == 1)
},
},
created() {
this.getOftenUseMenuList()
},
}
</script>
@ -216,7 +252,8 @@ export default {
.often-user-item {
display: flex;
flex-direction: column;
align-items: center;
// flex-direction: column;
cursor: pointer;
& i {
@ -225,6 +262,7 @@ export default {
font-size: 28px;
}
& span {
margin-left: 10px;
text-align: center;
font-size: 14px;
font-family: 'PingFang SC';