接口调试
This commit is contained in:
parent
f8bbf49b3f
commit
ce07ef0a6b
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -1687,7 +1687,7 @@ export default {
|
|||
checkFaceImageAPI(formData)
|
||||
.then((res) => {})
|
||||
.catch((err) => {
|
||||
// this.idCardInfoForm.faceImg = []
|
||||
this.idCardInfoForm.faceImg = []
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in New Issue