接口调试
This commit is contained in:
parent
f8bbf49b3f
commit
ce07ef0a6b
|
|
@ -108,3 +108,21 @@ export const getExitNoSetListAPI = (data) => {
|
||||||
params: 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: '',
|
lightStatus: '',
|
||||||
subComId: '',
|
subComId: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.lightStatus == 3) {
|
||||||
|
this.$set(query, 'lightStatusSeven', 7)
|
||||||
|
}
|
||||||
this.filterQueryList.forEach((item) => {
|
this.filterQueryList.forEach((item) => {
|
||||||
query[item.queryKey] = item.value
|
query[item.queryKey] = item.value
|
||||||
})
|
})
|
||||||
|
|
||||||
if (query.lightStatus === 3) {
|
console.log('query9966996---<insert>', query)
|
||||||
this.$set(query, 'lightStatusSeven', 7)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 传递给父组件使用
|
// 传递给父组件使用
|
||||||
this.$emit('handelSettingQuery', query)
|
this.$emit('handelSettingQuery', query)
|
||||||
|
|
|
||||||
|
|
@ -1687,7 +1687,7 @@ export default {
|
||||||
checkFaceImageAPI(formData)
|
checkFaceImageAPI(formData)
|
||||||
.then((res) => {})
|
.then((res) => {})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
// this.idCardInfoForm.faceImg = []
|
this.idCardInfoForm.faceImg = []
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -288,8 +288,9 @@ export default {
|
||||||
this.queryParams.sex = sex
|
this.queryParams.sex = sex
|
||||||
this.queryParams.isAtt = isAtt
|
this.queryParams.isAtt = isAtt
|
||||||
this.queryParams.postId = postId
|
this.queryParams.postId = postId
|
||||||
|
console.log('lightStatus9966996--+++', lightStatus)
|
||||||
if (lightStatus === 3) {
|
if (lightStatus == 3) {
|
||||||
|
console.log('lightStatus9966996', lightStatus)
|
||||||
this.$set(this.queryParams, 'lightStatusSeven', 7)
|
this.$set(this.queryParams, 'lightStatusSeven', 7)
|
||||||
this.queryParams.lightStatus = 1
|
this.queryParams.lightStatus = 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -524,7 +524,7 @@ export default {
|
||||||
console.log('筛选条件', query)
|
console.log('筛选条件', query)
|
||||||
this.queryParams = query
|
this.queryParams = query
|
||||||
|
|
||||||
if (query.lightStatus === 3) {
|
if (query.lightStatus == 3) {
|
||||||
this.$set(this.queryParams, 'lightStatusSeven', 7)
|
this.$set(this.queryParams, 'lightStatusSeven', 7)
|
||||||
this.queryParams.lightStatus = 1
|
this.queryParams.lightStatus = 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -337,7 +337,7 @@ export default {
|
||||||
handelSettingQuery(query) {
|
handelSettingQuery(query) {
|
||||||
console.log('筛选条件', query)
|
console.log('筛选条件', query)
|
||||||
this.queryParams = query
|
this.queryParams = query
|
||||||
if (query.lightStatus === 3) {
|
if (query.lightStatus == 3) {
|
||||||
this.$set(this.queryParams, 'lightStatusSeven', 7)
|
this.$set(this.queryParams, 'lightStatusSeven', 7)
|
||||||
this.queryParams.lightStatus = 1
|
this.queryParams.lightStatus = 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,14 @@
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
class="often-user-item"
|
class="often-user-item"
|
||||||
v-for="item in selectList"
|
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>
|
<span> {{ item.name }} </span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -49,7 +55,9 @@
|
||||||
v-for="item in oftenUseList"
|
v-for="item in oftenUseList"
|
||||||
>
|
>
|
||||||
<el-checkbox
|
<el-checkbox
|
||||||
v-model="item.isChecked"
|
true-label="1"
|
||||||
|
false-label="0"
|
||||||
|
v-model="item.checked"
|
||||||
@change="handleChangeTag($event, item)"
|
@change="handleChangeTag($event, item)"
|
||||||
>
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
|
|
@ -59,6 +67,9 @@
|
||||||
|
|
||||||
<!-- 确定按钮 -->
|
<!-- 确定按钮 -->
|
||||||
<div class="dialog-setting-btn">
|
<div class="dialog-setting-btn">
|
||||||
|
<el-button size="small" @click="handleCloseDialogOuter">
|
||||||
|
取消
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -66,9 +77,6 @@
|
||||||
>
|
>
|
||||||
确定
|
确定
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="small" @click="handleCloseDialogOuter">
|
|
||||||
取消
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -78,6 +86,10 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DialogModel from '@/components/DialogModel'
|
import DialogModel from '@/components/DialogModel'
|
||||||
|
import {
|
||||||
|
getOftenUseMenuListAPI,
|
||||||
|
setOftenUseMenuListAPI,
|
||||||
|
} from '@/api/home-index'
|
||||||
export default {
|
export default {
|
||||||
name: 'OftenUse',
|
name: 'OftenUse',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -87,72 +99,72 @@ export default {
|
||||||
return {
|
return {
|
||||||
// 原始数据
|
// 原始数据
|
||||||
oftenUseList: [
|
oftenUseList: [
|
||||||
{
|
// {
|
||||||
name: '考勤统计',
|
// name: '考勤统计',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 1,
|
// id: 1,
|
||||||
isChecked: true,
|
// isChecked: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '人员库',
|
// name: '人员库',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 2,
|
// id: 2,
|
||||||
isChecked: true,
|
// isChecked: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '用户管理',
|
// name: '用户管理',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 3,
|
// id: 3,
|
||||||
isChecked: true,
|
// isChecked: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '工资册审核',
|
// name: '工资册审核',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 4,
|
// id: 4,
|
||||||
isChecked: false,
|
// isChecked: false,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '分包合同管理',
|
// name: '分包合同管理',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 5,
|
// id: 5,
|
||||||
isChecked: true,
|
// isChecked: true,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '组织管理',
|
// name: '组织管理',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 6,
|
// id: 6,
|
||||||
isChecked: false,
|
// isChecked: false,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '黑名单',
|
// name: '黑名单',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 7,
|
// id: 7,
|
||||||
isChecked: false,
|
// isChecked: false,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '考勤管理',
|
// name: '考勤管理',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 8,
|
// id: 8,
|
||||||
isChecked: false,
|
// isChecked: false,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '出场管理',
|
// name: '出场管理',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 9,
|
// id: 9,
|
||||||
isChecked: false,
|
// isChecked: false,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '出场管理2',
|
// name: '出场管理2',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 10,
|
// id: 10,
|
||||||
isChecked: false,
|
// isChecked: false,
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: '出场管理3',
|
// name: '出场管理3',
|
||||||
icon: 'el-icon-s-help',
|
// icon: 'el-icon-s-help',
|
||||||
id: 11,
|
// id: 11,
|
||||||
isChecked: false,
|
// isChecked: false,
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
// 弹框配置
|
// 弹框配置
|
||||||
dialogConfig: {
|
dialogConfig: {
|
||||||
|
|
@ -180,28 +192,52 @@ export default {
|
||||||
//复选框事件
|
//复选框事件
|
||||||
handleChangeTag(value, item) {
|
handleChangeTag(value, item) {
|
||||||
if (this.selectCount > 10 && value) {
|
if (this.selectCount > 10 && value) {
|
||||||
item.isChecked = false
|
item.checked = '0'
|
||||||
this.$modal.msgError('最多可设置10个快捷菜单')
|
this.$modal.msgError('最多可设置10个快捷菜单')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 打开常用功能页面
|
||||||
|
onHandleOpenOftenUsePage(item) {
|
||||||
|
console.log(item, 'item')
|
||||||
|
// this.$router.push({
|
||||||
|
// path: item.url,
|
||||||
|
// })
|
||||||
|
},
|
||||||
|
|
||||||
// 确定按钮
|
// 确定按钮
|
||||||
handleConfirm() {
|
async handleConfirm() {
|
||||||
console.log(this.selectList)
|
// console.log(this.selectList)
|
||||||
this.dialogConfig.outerVisible = false
|
// 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: {
|
computed: {
|
||||||
// 计算已选数量
|
// 计算已选数量
|
||||||
selectCount() {
|
selectCount() {
|
||||||
return this.oftenUseList.filter((item) => item.isChecked).length
|
return this.oftenUseList.filter((item) => item.checked == 1).length
|
||||||
},
|
},
|
||||||
// 计算已选列表
|
// 计算已选列表
|
||||||
selectList() {
|
selectList() {
|
||||||
return this.oftenUseList.filter((item) => item.isChecked)
|
return this.oftenUseList.filter((item) => item.checked == 1)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.getOftenUseMenuList()
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -216,7 +252,8 @@ export default {
|
||||||
|
|
||||||
.often-user-item {
|
.often-user-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: center;
|
||||||
|
// flex-direction: column;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
& i {
|
& i {
|
||||||
|
|
@ -225,6 +262,7 @@ export default {
|
||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
}
|
}
|
||||||
& span {
|
& span {
|
||||||
|
margin-left: 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: 'PingFang SC';
|
font-family: 'PingFang SC';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue