|
|
|
|
@ -12,7 +12,7 @@
|
|
|
|
|
<slot>
|
|
|
|
|
<header-content :auths="auths_auth_mixin">
|
|
|
|
|
<template #search>
|
|
|
|
|
<div style="display: flex">
|
|
|
|
|
<div style="display: flex;align-items: center;">
|
|
|
|
|
<Select
|
|
|
|
|
v-model="select.filter[1].key"
|
|
|
|
|
style="width: 100px"
|
|
|
|
|
@ -104,6 +104,7 @@
|
|
|
|
|
@input="(e) => inputEndHandler(e, select.filter[1])"
|
|
|
|
|
/>
|
|
|
|
|
</template>
|
|
|
|
|
<el-switch v-model="value1" active-text="查询自己" inactive-text="查询所有" style="margin-left: 10px;" @change="switchChange"></el-switch>
|
|
|
|
|
<Button
|
|
|
|
|
style="margin-left: 10px"
|
|
|
|
|
type="primary"
|
|
|
|
|
@ -286,15 +287,53 @@
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<template #edit="{ row }" v-if="/^\/manage/.test($route.path)">
|
|
|
|
|
<Button v-if="row.zhuangtai == 0 || row.zhuangtai == 3" type="primary" style="margin-right: 6px;" size="small" @click="() => {
|
|
|
|
|
$refs['dialog'].setId(row.id);
|
|
|
|
|
$refs['dialog'].setType('editor');
|
|
|
|
|
$refs['dialog'].show();
|
|
|
|
|
}"
|
|
|
|
|
>编辑</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template #delete="scope" v-if="/^\/manage/.test($route.path)">
|
|
|
|
|
<el-popover width="180" trigger="hover" v-if="scope.row.zhuangtai == 0 || scope.row.zhuangtai == 3">
|
|
|
|
|
<template #default>
|
|
|
|
|
<div>
|
|
|
|
|
<p :style="{ 'padding-bottom': '10px' }">确定要删除吗?</p>
|
|
|
|
|
<div :style="{ 'text-align': 'right', margin: '0' }">
|
|
|
|
|
<el-button size="mini" type="text">取消</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="
|
|
|
|
|
() => {
|
|
|
|
|
destroy({ id: scope.row.id, table_name: 'materials' }).then(res => $refs['xyTable'].getTableData())
|
|
|
|
|
}
|
|
|
|
|
"
|
|
|
|
|
>确定</el-button
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template #reference>
|
|
|
|
|
<div
|
|
|
|
|
:style="{ 'margin-right': '6px', height: '100%', width: '100%' }"
|
|
|
|
|
>
|
|
|
|
|
<Button type="error" size="small">删除</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-popover>
|
|
|
|
|
</template>
|
|
|
|
|
<template #submit="scope">
|
|
|
|
|
<template v-if="scope.row.zhuangtai == 0">
|
|
|
|
|
<template v-if="scope.row.zhuangtai == 0 || scope.row.zhuangtai == 3">
|
|
|
|
|
<Button type="primary" size="small" @click="submit(scope, 1)"
|
|
|
|
|
>提交</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
|
|
|
|
<Button type="error" ghost size="small" @click="submit(scope, 0)"
|
|
|
|
|
>下架</Button
|
|
|
|
|
>取消提交</Button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
@ -392,6 +431,7 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
value1: false,
|
|
|
|
|
op,
|
|
|
|
|
select: {
|
|
|
|
|
table_name: "",
|
|
|
|
|
@ -434,6 +474,19 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
switchChange (e) {
|
|
|
|
|
if (e) {
|
|
|
|
|
this.select.filter.push({
|
|
|
|
|
key: 'admin_id',
|
|
|
|
|
op: 'eq',
|
|
|
|
|
value: this.$store.state.user.id
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.select.filter.splice(this.select.filter.indexOf(this.select.filter.find(i => i.key === 'admin_id')),1)
|
|
|
|
|
}
|
|
|
|
|
console.log(this.select.filter)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
async exportExcel(sheetName) {
|
|
|
|
|
const res = await index(
|
|
|
|
|
Object.assign(this.select, { page: 1, page_size: 9999 })
|
|
|
|
|
@ -518,7 +571,7 @@ export default {
|
|
|
|
|
async () => {
|
|
|
|
|
const res = await listdeptNoAuth({
|
|
|
|
|
page: 1,
|
|
|
|
|
page_size: 999
|
|
|
|
|
page_size: 999,
|
|
|
|
|
});
|
|
|
|
|
return res;
|
|
|
|
|
},
|
|
|
|
|
@ -662,31 +715,30 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!/\/manage\/rule/.test(this.$route.fullPath) &&
|
|
|
|
|
!!["nianfen", "bianhao", "wenjian"].find(
|
|
|
|
|
(j) => j === i.field
|
|
|
|
|
)) {
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
!/\/manage\/rule/.test(this.$route.fullPath) &&
|
|
|
|
|
!!["nianfen", "bianhao", "wenjian"].find((j) => j === i.field)
|
|
|
|
|
) {
|
|
|
|
|
} else {
|
|
|
|
|
this.table.push(Object.assign(
|
|
|
|
|
{
|
|
|
|
|
prop: i.field,
|
|
|
|
|
label: i.name,
|
|
|
|
|
width: i.width,
|
|
|
|
|
fixed: i.is_fixed,
|
|
|
|
|
},
|
|
|
|
|
linkOb
|
|
|
|
|
))
|
|
|
|
|
this.table.push(
|
|
|
|
|
Object.assign(
|
|
|
|
|
{
|
|
|
|
|
prop: i.field,
|
|
|
|
|
label: i.name,
|
|
|
|
|
width: i.width,
|
|
|
|
|
fixed: i.is_fixed,
|
|
|
|
|
},
|
|
|
|
|
linkOb
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.table.unshift({
|
|
|
|
|
type: "index",
|
|
|
|
|
width: 60,
|
|
|
|
|
label: "序号",
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|