提交 f529a1b7 编写于 作者: 刘英杰's avatar 刘英杰

V1.0.2.250415-250529

上级 c00b382d
<template>
<!-- 通用Table -->
<div>
<Table
:height="tableHeight"
:border="tableBorder"
class="ivu-mt"
:columns="tableColumns"
:data="tableData"
:loading="tableLoading"
:size="tableSize"
@on-selection-change="onSelectionChange"
>
<template #generalSwitch="{ row, index }">
<Switch
v-model="row.is_enable"
size="large"
:true-value="1"
:false-value="0"
@on-change="(val) => switchChange(val, row, index)">
<span type="md-checkmark" slot="open">启用</span>
<span type="md-close" slot="close">停用</span>
</Switch>
</template>
<template #action="{row}">
<Button type="info" size="small" @click="edit(row)">编辑</Button>
<Poptip confirm transfer title="是否确认删除?" @on-ok="del(row)">
<Button type="error" size="small" style="margin-left: 8px">删除</Button>
</Poptip>
</template>
<template #actionAndDetails="{ row }">
<a @click="details(row)">详情</a>
<Button type="info" size="small" @click="edit(row)" style="margin-left: 8px">编辑</Button>
<Poptip confirm transfer title="是否确认删除?" @on-ok="del(row)">
<Button type="error" size="small" style="margin-left: 8px">删除</Button>
</Poptip>
</template>
<!-- 自定义插槽 -->
<template v-slot:[slot]="scope" v-for="(_, slot) in $slots" :key="slot">
<slot :name="slot" v-bind="scope"></slot>
</template>
</Table>
<div class="ivu-text-center ivu-mt">
<Page
:transfer="true"
:total="dataCount"
:current="pageIndex"
:page-size="pageSize"
:page-size-opts="pageSizeOpts"
show-total
show-sizer
@on-change="handleChangePage"
@on-page-size-change="handleChangePageSize"
/>
</div>
</div>
</template>
<script>
import {Page, Poptip, Switch} from "view-ui-plus";
export default {
components: {Page, Poptip, Switch},
props: {
tableBorder: {type: Boolean, default: false},
tableColumns: {type: Array, require: true},
tableData: {type: Array, require: true},
tableLoading: {type: Boolean, default: false},
tableSize: {type: String, default: 'default'},
dataCount: {type: Number, require: true},
pageIndex: {type: Number, require: true},
tableHeight: { default: false, require: false},
pageSize: {type: Number, require: true},
pageSizeOpts: {type: Array, default: () => [10, 20, 50, 100]},
},
data() {
return {}
},
computed: {},
created() {
},
mounted() {
},
methods: {
//列表多选
onSelectionChange(val){
this.$emit('onSelectionChange', val, )
},
// 改变开关
switchChange(val, row, index) {
this.$emit('switchChange', val, row, index)
},
// 详情
details(row) {
this.$emit('rowDetails', row)
},
// 编辑行
edit(row) {
this.$emit('rowEdit', row)
},
// 删除行
del(row) {
this.$emit('rowDelete', row)
},
// 翻页
handleChangePage(val) {
this.$emit('onPageChange', val)
},
// 更改每页长度
handleChangePageSize(val) {
this.$emit('onPageSizeChange', val)
},
},
}
</script>
<style scoped lang="less">
</style>
<template>
<!-- 通用Table -->
<div>
<Table
:height="tableHeight"
:border="tableBorder"
class="ivu-mt"
:columns="tableColumns"
:data="tableData"
:loading="tableLoading"
:size="tableSize"
@on-selection-change="onSelectionChange"
>
<template #generalSwitch="{ row, index }">
<Switch
v-model="row.is_enable"
size="large"
:true-value="1"
:false-value="0"
@on-change="(val) => switchChange(val, row, index)">
<span type="md-checkmark" slot="open">启用</span>
<span type="md-close" slot="close">停用</span>
</Switch>
</template>
<template #action="{row}">
<Button type="info" size="small" @click="edit(row)">编辑</Button>
<Poptip confirm transfer title="是否确认删除?" @on-ok="del(row)">
<Button type="error" size="small" style="margin-left: 8px">删除</Button>
</Poptip>
</template>
<template #actionAndDetails="{ row }">
<a @click="details(row)">详情</a>
<Button type="info" size="small" @click="edit(row)" style="margin-left: 8px">编辑</Button>
<Poptip confirm transfer title="是否确认删除?" @on-ok="del(row)">
<Button type="error" size="small" style="margin-left: 8px">删除</Button>
</Poptip>
</template>
<!-- 自定义插槽 -->
<template v-slot:[slot]="scope" v-for="(_, slot) in $slots" :key="slot">
<slot :name="slot" v-bind="scope"></slot>
</template>
</Table>
<div class="ivu-text-center ivu-mt">
<Page
:transfer="true"
:total="dataCount"
:current="pageIndex"
:page-size="pageSize"
:page-size-opts="pageSizeOpts"
show-total
show-sizer
@on-change="handleChangePage"
@on-page-size-change="handleChangePageSize"
/>
</div>
</div>
</template>
<script>
import {Page, Poptip, Switch} from "view-ui-plus";
export default {
components: {Page, Poptip, Switch},
props: {
tableBorder: {type: Boolean, default: false},
tableColumns: {type: Array, require: true},
tableData: {type: Array, require: true},
tableLoading: {type: Boolean, default: false},
tableSize: {type: String, default: 'default'},
dataCount: {type: Number, require: true},
pageIndex: {type: Number, require: true},
tableHeight: { type: [Number, Boolean], default: false, required: false },
pageSize: {type: Number, require: true},
pageSizeOpts: {type: Array, default: () => [10, 20, 50, 100]},
},
data() {
return {}
},
computed: {},
created() {
},
mounted() {
},
methods: {
//列表多选
onSelectionChange(val){
this.$emit('onSelectionChange', val, )
},
// 改变开关
switchChange(val, row, index) {
this.$emit('switchChange', val, row, index)
},
// 详情
details(row) {
this.$emit('rowDetails', row)
},
// 编辑行
edit(row) {
this.$emit('rowEdit', row)
},
// 删除行
del(row) {
this.$emit('rowDelete', row)
},
// 翻页
handleChangePage(val) {
this.$emit('onPageChange', val)
},
// 更改每页长度
handleChangePageSize(val) {
this.$emit('onPageSizeChange', val)
},
},
}
</script>
<style scoped lang="less">
</style>
<template>
<!-- 通用Table -->
<div>
<Table
:height="tableHeight"
:border="tableBorder"
class="ivu-mt"
:columns="tableColumns"
:data="tableData"
:loading="tableLoading"
:size="tableSize"
@on-selection-change="onSelectionChange"
>
<template #generalSwitch="{ row, index }">
<Switch
v-model="row.is_enable"
size="large"
:true-value="1"
:false-value="0"
@on-change="(val) => switchChange(val, row, index)">
<span type="md-checkmark" slot="open">启用</span>
<span type="md-close" slot="close">停用</span>
</Switch>
</template>
<template #action="{row}">
<Button type="info" size="small" @click="edit(row)">编辑</Button>
<Poptip confirm transfer title="是否确认删除?" @on-ok="del(row)">
<Button type="error" size="small" style="margin-left: 8px">删除</Button>
</Poptip>
</template>
<template #actionAndDetails="{ row }">
<a @click="details(row)">详情</a>
<Button type="info" size="small" @click="edit(row)" style="margin-left: 8px">编辑</Button>
<Poptip confirm transfer title="是否确认删除?" @on-ok="del(row)">
<Button type="error" size="small" style="margin-left: 8px">删除</Button>
</Poptip>
</template>
<!-- 自定义插槽 -->
<template v-slot:[slot]="scope" v-for="(_, slot) in $slots" :key="slot">
<slot :name="slot" v-bind="scope"></slot>
</template>
</Table>
<div class="ivu-text-center ivu-mt">
<Page
:transfer="true"
:total="dataCount"
:current="pageIndex"
:page-size="pageSize"
:page-size-opts="pageSizeOpts"
show-total
show-sizer
@on-change="handleChangePage"
@on-page-size-change="handleChangePageSize"
/>
</div>
</div>
</template>
<script>
import {Page, Poptip, Switch} from "view-ui-plus";
export default {
components: {Page, Poptip, Switch},
props: {
tableBorder: {type: Boolean, default: false},
tableColumns: {type: Array, require: true},
tableData: {type: Array, require: true},
tableLoading: {type: Boolean, default: false},
tableSize: {type: String, default: 'default'},
dataCount: {type: Number, require: true},
pageIndex: {type: Number, require: true},
tableHeight: { type: [Number, String], default: '', required: false },
pageSize: {type: Number, require: true},
pageSizeOpts: {type: Array, default: () => [10, 20, 50, 100]},
},
data() {
return {}
},
computed: {},
created() {
},
mounted() {
},
methods: {
//列表多选
onSelectionChange(val){
this.$emit('onSelectionChange', val, )
},
// 改变开关
switchChange(val, row, index) {
this.$emit('switchChange', val, row, index)
},
// 详情
details(row) {
this.$emit('rowDetails', row)
},
// 编辑行
edit(row) {
this.$emit('rowEdit', row)
},
// 删除行
del(row) {
this.$emit('rowDelete', row)
},
// 翻页
handleChangePage(val) {
this.$emit('onPageChange', val)
},
// 更改每页长度
handleChangePageSize(val) {
this.$emit('onPageSizeChange', val)
},
},
}
</script>
<style scoped lang="less">
</style>
.role-container[data-v-282bbd83]{display:flex;min-height:calc(100vh - 150px);border-radius:4px;overflow:auto;gap:16px}.role-sidebar[data-v-282bbd83]{width:300px;border-right:1px solid #e8eaec;background-color:#fff;overflow-y:auto;height:200px}.role-title[data-v-282bbd83]{padding:16px;font-size:16px;font-weight:700;border-bottom:1px solid #e8eaec}.role-list[data-v-282bbd83]{padding:10px 0}.role-item[data-v-282bbd83]{display:flex;align-items:center;padding:12px 16px;cursor:pointer;transition:background-color .3s}.role-item[data-v-282bbd83]:hover{background-color:#f0f0f0}.role-item.active[data-v-282bbd83]{background-color:#e8f7ff;color:#2d8cf0}.role-item-icon[data-v-282bbd83]{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:12px;color:#fff}.role-admin[data-v-282bbd83]{background-color:#2d8cf0}.role-party-office[data-v-282bbd83]{background-color:#19be6b}.role-entrance-dept[data-v-282bbd83]{background-color:#f90}.role-responsible-dept[data-v-282bbd83]{background-color:#ed4014}.role-item-info[data-v-282bbd83]{flex:1}.role-name[data-v-282bbd83]{font-size:14px;margin-bottom:4px}.role-count[data-v-282bbd83]{font-size:12px;color:#808695}.role-content[data-v-282bbd83]{display:flex;flex-direction:column;gap:16px;flex:1}.role-toolbar[data-v-282bbd83]{height:100%;display:flex;flex-direction:column;gap:20px;top:0;background-color:#fff;z-index:1}.search-box[data-v-282bbd83]{width:280px}.pagination[data-v-282bbd83]{text-align:center;position:sticky;bottom:0;background-color:#fff;z-index:1}.action-btns[data-v-282bbd83],.user-avatar[data-v-282bbd83]{display:flex;justify-content:center;align-items:center}.user-avatar img[data-v-282bbd83]{width:100%;height:100%;object-fit:cover}.add-user-search[data-v-282bbd83]{display:flex;margin-bottom:16px}.duty-dept-select[data-v-282bbd83]{margin-bottom:16px}
.role-container[data-v-5e8b1b40]{display:flex;min-height:calc(100vh - 150px);border-radius:4px;overflow:auto;gap:16px}.role-sidebar[data-v-5e8b1b40]{width:300px;border-right:1px solid #e8eaec;background-color:#fff;overflow-y:auto;height:200px}.role-title[data-v-5e8b1b40]{padding:16px;font-size:16px;font-weight:700;border-bottom:1px solid #e8eaec}.role-list[data-v-5e8b1b40]{padding:10px 0}.role-item[data-v-5e8b1b40]{display:flex;align-items:center;padding:12px 16px;cursor:pointer;transition:background-color .3s}.role-item[data-v-5e8b1b40]:hover{background-color:#f0f0f0}.role-item.active[data-v-5e8b1b40]{background-color:#e8f7ff;color:#2d8cf0}.role-item-icon[data-v-5e8b1b40]{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:12px;color:#fff}.role-admin[data-v-5e8b1b40]{background-color:#2d8cf0}.role-party-office[data-v-5e8b1b40]{background-color:#19be6b}.role-entrance-dept[data-v-5e8b1b40]{background-color:#f90}.role-responsible-dept[data-v-5e8b1b40]{background-color:#ed4014}.role-item-info[data-v-5e8b1b40]{flex:1}.role-name[data-v-5e8b1b40]{font-size:14px;margin-bottom:4px}.role-count[data-v-5e8b1b40]{font-size:12px;color:#808695}.role-content[data-v-5e8b1b40]{display:flex;flex-direction:column;gap:16px;flex:1}.role-toolbar[data-v-5e8b1b40]{height:100%;display:flex;flex-direction:column;gap:20px;top:0;background-color:#fff;z-index:1}.search-box[data-v-5e8b1b40]{width:280px}.pagination[data-v-5e8b1b40]{text-align:center;position:sticky;bottom:0;background-color:#fff;z-index:1}.action-btns[data-v-5e8b1b40],.user-avatar[data-v-5e8b1b40]{display:flex;justify-content:center;align-items:center}.user-avatar img[data-v-5e8b1b40]{width:100%;height:100%;object-fit:cover}.add-user-search[data-v-5e8b1b40]{margin-bottom:16px;display:flex}.duty-dept-select[data-v-5e8b1b40]{margin-bottom:16px}
此差异已折叠。
.demo-split[data-v-e6d54e3a]{height:calc(100vh - 112px)}.demo-split .demo-split-pane-L[data-v-e6d54e3a]{padding:10px;height:100%;background-color:#fff}.demo-split .demo-split-pane-R[data-v-e6d54e3a]{padding-left:24px}
.demo-split[data-v-2031f73d]{height:calc(100vh - 112px)}.demo-split .demo-split-pane-L[data-v-2031f73d]{padding:10px;height:100%;background-color:#fff}.demo-split .demo-split-pane-R[data-v-2031f73d]{padding-left:24px}.role-container[data-v-2031f73d]{display:flex;min-height:calc(100vh - 150px);border-radius:4px;overflow:auto;gap:16px}.role-sidebar[data-v-2031f73d]{width:300px;border-right:1px solid #e8eaec;background-color:#fff;overflow-y:auto;height:200px}.role-title[data-v-2031f73d]{padding:16px;font-size:16px;font-weight:700;border-bottom:1px solid #e8eaec}.role-list[data-v-2031f73d]{padding:10px 0}.role-item[data-v-2031f73d]{display:flex;align-items:center;padding:12px 16px;cursor:pointer;transition:background-color .3s}.role-item[data-v-2031f73d]:hover{background-color:#f0f0f0}.role-item.active[data-v-2031f73d]{background-color:#e8f7ff;color:#2d8cf0}.role-item-icon[data-v-2031f73d]{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:12px;color:#fff}.role-admin[data-v-2031f73d]{background-color:#2d8cf0}.role-party-office[data-v-2031f73d]{background-color:#19be6b}.role-entrance-dept[data-v-2031f73d]{background-color:#f90}.role-responsible-dept[data-v-2031f73d]{background-color:#ed4014}.role-item-info[data-v-2031f73d]{flex:1}.role-name[data-v-2031f73d]{font-size:14px;margin-bottom:4px}.role-count[data-v-2031f73d]{font-size:12px;color:#808695}.role-content[data-v-2031f73d]{display:flex;flex-direction:column;gap:16px;flex:1}.role-toolbar[data-v-2031f73d]{height:100%;display:flex;flex-direction:column;gap:20px;top:0;background-color:#fff;z-index:1}.search-box[data-v-2031f73d]{width:280px}.pagination[data-v-2031f73d]{text-align:center;position:sticky;bottom:0;background-color:#fff;z-index:1}.action-btns[data-v-2031f73d]{display:flex;justify-content:center}.user-avatar[data-v-2031f73d]{display:flex;justify-content:center;align-items:center}.user-avatar img[data-v-2031f73d]{width:100%;height:100%;object-fit:cover}.add-user-search[data-v-2031f73d]{margin-bottom:16px;display:flex}.duty-dept-select[data-v-2031f73d]{margin-bottom:16px}
.role-container[data-v-e004d337]{display:flex;min-height:calc(100vh - 150px);border-radius:4px;overflow:auto;gap:16px}.role-sidebar[data-v-e004d337]{width:300px;border-right:1px solid #e8eaec;background-color:#fff;overflow-y:auto;height:200px}.role-title[data-v-e004d337]{padding:16px;font-size:16px;font-weight:700;border-bottom:1px solid #e8eaec}.role-list[data-v-e004d337]{padding:10px 0}.role-item[data-v-e004d337]{display:flex;align-items:center;padding:12px 16px;cursor:pointer;transition:background-color .3s}.role-item[data-v-e004d337]:hover{background-color:#f0f0f0}.role-item.active[data-v-e004d337]{background-color:#e8f7ff;color:#2d8cf0}.role-item-icon[data-v-e004d337]{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:12px;color:#fff}.role-admin[data-v-e004d337]{background-color:#2d8cf0}.role-party-office[data-v-e004d337]{background-color:#19be6b}.role-entrance-dept[data-v-e004d337]{background-color:#f90}.role-responsible-dept[data-v-e004d337]{background-color:#ed4014}.role-item-info[data-v-e004d337]{flex:1}.role-name[data-v-e004d337]{font-size:14px;margin-bottom:4px}.role-count[data-v-e004d337]{font-size:12px;color:#808695}.role-content[data-v-e004d337]{display:flex;flex-direction:column;gap:16px;flex:1}.role-toolbar[data-v-e004d337]{height:100%;display:flex;flex-direction:column;gap:20px;top:0;background-color:#fff;z-index:1}.search-box[data-v-e004d337]{width:280px}.pagination[data-v-e004d337]{text-align:center;position:sticky;bottom:0;background-color:#fff;z-index:1}.action-btns[data-v-e004d337]{display:flex;justify-content:center}.user-avatar[data-v-e004d337]{display:flex;justify-content:center;align-items:center}.user-avatar img[data-v-e004d337]{width:100%;height:100%;object-fit:cover}.add-user-search[data-v-e004d337]{margin-bottom:16px;display:flex}.duty-dept-select[data-v-e004d337]{margin-bottom:16px}
.role-container[data-v-019bf2e1]{display:flex;min-height:calc(100vh - 150px);border-radius:4px;overflow:auto;gap:16px}.role-sidebar[data-v-019bf2e1]{width:300px;border-right:1px solid #e8eaec;background-color:#fff;overflow-y:auto;height:200px}.role-title[data-v-019bf2e1]{padding:16px;font-size:16px;font-weight:700;border-bottom:1px solid #e8eaec}.role-list[data-v-019bf2e1]{padding:10px 0}.role-item[data-v-019bf2e1]{display:flex;align-items:center;padding:12px 16px;cursor:pointer;transition:background-color .3s}.role-item[data-v-019bf2e1]:hover{background-color:#f0f0f0}.role-item.active[data-v-019bf2e1]{background-color:#e8f7ff;color:#2d8cf0}.role-item-icon[data-v-019bf2e1]{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:12px;color:#fff}.role-admin[data-v-019bf2e1]{background-color:#2d8cf0}.role-party-office[data-v-019bf2e1]{background-color:#19be6b}.role-entrance-dept[data-v-019bf2e1]{background-color:#f90}.role-responsible-dept[data-v-019bf2e1]{background-color:#ed4014}.role-item-info[data-v-019bf2e1]{flex:1}.role-name[data-v-019bf2e1]{font-size:14px;margin-bottom:4px}.role-count[data-v-019bf2e1]{font-size:12px;color:#808695}.role-content[data-v-019bf2e1]{display:flex;flex-direction:column;gap:16px;flex:1}.role-toolbar[data-v-019bf2e1]{height:100%;display:flex;flex-direction:column;gap:20px;top:0;background-color:#fff;z-index:1}.search-box[data-v-019bf2e1]{width:280px}.pagination[data-v-019bf2e1]{text-align:center;position:sticky;bottom:0;background-color:#fff;z-index:1}.action-btns[data-v-019bf2e1],.user-avatar[data-v-019bf2e1]{display:flex;justify-content:center;align-items:center}.user-avatar img[data-v-019bf2e1]{width:100%;height:100%;object-fit:cover}.add-user-search[data-v-019bf2e1]{display:flex;margin-bottom:16px}.duty-dept-select[data-v-019bf2e1]{margin-bottom:16px}
.role-container[data-v-db149862]{display:flex;min-height:calc(100vh - 150px);border-radius:4px;overflow:auto;gap:16px}.role-sidebar[data-v-db149862]{width:300px;border-right:1px solid #e8eaec;background-color:#fff;overflow-y:auto;height:200px}.role-title[data-v-db149862]{padding:16px;font-size:16px;font-weight:700;border-bottom:1px solid #e8eaec}.role-list[data-v-db149862]{padding:10px 0}.role-item[data-v-db149862]{display:flex;align-items:center;padding:12px 16px;cursor:pointer;transition:background-color .3s}.role-item[data-v-db149862]:hover{background-color:#f0f0f0}.role-item.active[data-v-db149862]{background-color:#e8f7ff;color:#2d8cf0}.role-item-icon[data-v-db149862]{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;margin-right:12px;color:#fff}.role-admin[data-v-db149862]{background-color:#2d8cf0}.role-party-office[data-v-db149862]{background-color:#19be6b}.role-entrance-dept[data-v-db149862]{background-color:#f90}.role-responsible-dept[data-v-db149862]{background-color:#ed4014}.role-item-info[data-v-db149862]{flex:1}.role-name[data-v-db149862]{font-size:14px;margin-bottom:4px}.role-count[data-v-db149862]{font-size:12px;color:#808695}.role-content[data-v-db149862]{display:flex;flex-direction:column;gap:16px;flex:1}.role-toolbar[data-v-db149862]{height:100%;display:flex;flex-direction:column;gap:20px;top:0;background-color:#fff;z-index:1}.search-box[data-v-db149862]{width:280px}.pagination[data-v-db149862]{text-align:center;position:sticky;bottom:0;background-color:#fff;z-index:1}.action-btns[data-v-db149862],.user-avatar[data-v-db149862]{display:flex;justify-content:center;align-items:center}.user-avatar img[data-v-db149862]{width:100%;height:100%;object-fit:cover}.add-user-search[data-v-db149862]{display:flex;margin-bottom:16px}.duty-dept-select[data-v-db149862]{margin-bottom:16px}.drawer-content[data-v-db149862]{width:100%;height:calc(100% - 60px);display:flex;justify-content:center;overflow:auto}.approval-card[data-v-db149862]{height:fit-content;width:60%;margin-bottom:50px}.approval-col[data-v-db149862]{display:flex}.drawer-footer[data-v-db149862]{width:100%;height:60px}.action-btns[data-v-db149862]{display:flex;justify-content:center;align-items:center;width:100%;height:60px}[data-v-db149862] .ivu-divider-horizontal{display:block;height:1px;width:100%;min-width:100%;margin:13px 0;clear:both}.previewImg[data-v-db149862]{width:80px;height:80px;cursor:pointer;margin-right:15px}.file-cell[data-v-db149862]{display:flex;justify-content:space-between;align-items:center;padding:10px 0;color:#1989f9;cursor:pointer}.file-cell .file-delete-icon[data-v-db149862]{width:20px;height:24px;line-height:24px;background:#d6d6d6;border-radius:5px;text-align:center;color:#fff;margin-left:25px;cursor:pointer}.file-cell .file-name[data-v-db149862]{flex:1;word-break:break-all}.demo-split[data-v-db149862]{height:calc(80vh - 130px);width:100%;padding-left:12px}.demo-split .demo-split-pane-L[data-v-db149862]{padding:10px;height:100%;background-color:#fff}.demo-split .demo-split-pane-R[data-v-db149862]{padding-left:24px}.filelist[data-v-db149862]{cursor:pointer}.filelist[data-v-db149862]:hover{color:#1e93ff;background-color:#f7f7f7}.fileddelete[data-v-db149862]{cursor:pointer;margin-left:auto}.fileddelete[data-v-db149862]:hover{color:red;transform:scale(1.5)}
<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href="./favicon.ico"><title></title><script type="module" crossorigin src="./js/index-ba497f75.js"></script><link rel="modulepreload" crossorigin href="./js/vendor-c142c249.js"><link rel="stylesheet" href="./css/index-87ae257b.css"></head><body><noscript><strong>请开启 JavaScript 功能来使用 。</strong></noscript><div id="app"></div></body></html> <!doctype html><html><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=0"><link rel="shortcut icon" href="./favicon.ico"><title></title><script type="module" crossorigin src="./js/index-1cf9ae58.js"></script><link rel="modulepreload" crossorigin href="./js/vendor-c142c249.js"><link rel="stylesheet" href="./css/index-e6819192.css"></head><body><noscript><strong>请开启 JavaScript 功能来使用 。</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file \ No newline at end of file
import{_ as z,v as c}from"./index-ba497f75.js";import{r as d,o as S,c as _,a as s,a5 as b,k as y,w as l,X as O,a2 as P,a3 as v,h as g,l as m}from"./vendor-c142c249.js";const k={components:{Page:c.Page,Poptip:c.Poptip,Switch:c.Switch},props:{tableBorder:{type:Boolean,default:!1},tableColumns:{type:Array,require:!0},tableData:{type:Array,require:!0},tableLoading:{type:Boolean,default:!1},tableSize:{type:String,default:"default"},dataCount:{type:Number,require:!0},pageIndex:{type:Number,require:!0},tableHeight:{default:!1,require:!1},pageSize:{type:Number,require:!0},pageSizeOpts:{type:Array,default:()=>[10,20,50,100]}},data(){return{}},computed:{},created(){},mounted(){},methods:{onSelectionChange(e){this.$emit("onSelectionChange",e)},switchChange(e,t,a){this.$emit("switchChange",e,t,a)},details(e){this.$emit("rowDetails",e)},edit(e){this.$emit("rowEdit",e)},del(e){this.$emit("rowDelete",e)},handleChangePage(e){this.$emit("onPageChange",e)},handleChangePageSize(e){this.$emit("onPageSizeChange",e)}}},w=["onClick"],x={class:"ivu-text-center ivu-mt"};function B(e,t,a,V,q,i){const p=d("Switch"),u=d("Button"),h=d("Poptip"),f=d("Table"),C=d("Page");return S(),_("div",null,[s(f,{height:a.tableHeight,border:a.tableBorder,class:"ivu-mt",columns:a.tableColumns,data:a.tableData,loading:a.tableLoading,size:a.tableSize,onOnSelectionChange:i.onSelectionChange},b({generalSwitch:l(({row:n,index:o})=>[s(p,{modelValue:n.is_enable,"onUpdate:modelValue":r=>n.is_enable=r,size:"large","true-value":1,"false-value":0,onOnChange:r=>i.switchChange(r,n,o)},{default:l(()=>t[0]||(t[0]=[g("span",{type:"md-checkmark",slot:"open"},"启用",-1),g("span",{type:"md-close",slot:"close"},"停用",-1)])),_:2},1032,["modelValue","onUpdate:modelValue","onOnChange"])]),action:l(({row:n})=>[s(u,{type:"info",size:"small",onClick:o=>i.edit(n)},{default:l(()=>t[1]||(t[1]=[m("编辑")])),_:2},1032,["onClick"]),s(h,{confirm:"",transfer:"",title:"是否确认删除?",onOnOk:o=>i.del(n)},{default:l(()=>[s(u,{type:"error",size:"small",style:{"margin-left":"8px"}},{default:l(()=>t[2]||(t[2]=[m("删除")])),_:1})]),_:2},1032,["onOnOk"])]),actionAndDetails:l(({row:n})=>[g("a",{onClick:o=>i.details(n)},"详情",8,w),s(u,{type:"info",size:"small",onClick:o=>i.edit(n),style:{"margin-left":"8px"}},{default:l(()=>t[3]||(t[3]=[m("编辑")])),_:2},1032,["onClick"]),s(h,{confirm:"",transfer:"",title:"是否确认删除?",onOnOk:o=>i.del(n)},{default:l(()=>[s(u,{type:"error",size:"small",style:{"margin-left":"8px"}},{default:l(()=>t[4]||(t[4]=[m("删除")])),_:1})]),_:2},1032,["onOnOk"])]),_:2},[y(e.$slots,(n,o)=>({name:o,fn:l(r=>[O(e.$slots,o,P(v(r)))])}))]),1032,["height","border","columns","data","loading","size","onOnSelectionChange"]),g("div",x,[s(C,{transfer:!0,total:a.dataCount,current:a.pageIndex,"page-size":a.pageSize,"page-size-opts":a.pageSizeOpts,"show-total":"","show-sizer":"",onOnChange:i.handleChangePage,onOnPageSizeChange:i.handleChangePageSize},null,8,["total","current","page-size","page-size-opts","onOnChange","onOnPageSizeChange"])])])}const A=z(k,[["render",B]]);export{A as C};
import{_ as B}from"./通用文件-4cba10c0.js";import{_ as I,v as s}from"./index-ba497f75.js";import{R as N,$ as S,r as _,o as a,e as c,w as t,h as n,a as o,a0 as i,c as u,F as p,k as m,t as g,f as k,p as D,l as $,X as j}from"./vendor-c142c249.js";const E={class:"drawer-content"},P=["src"],R=["onClick"],z={class:"drawer-footer"},L={class:"action-btns"},U={__name:"DrawerDetails",props:{title:{type:String,default:"详情"},dataArray:{type:Array,default:()=>[]}},emits:["close"],setup(f,{expose:F}){const v=N(!1),y=S({grid:{xs:24,sm:12,md:12,lg:12},drawer:{show:!0}});function w(d){let l="";switch(d){case".png":l="image";break;case".jpeg":l="image";break;case".jpg":l="image";break;default:l="otherFile"}return l}function C(d){console.log(d),window.location.href=window.location.origin+d.path}return F({show:v}),(d,l)=>{const V=_("Table"),x=_("Col"),T=_("viewer"),A=_("Form");return a(),c(i(s.Drawer),{modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=e=>v.value=e),width:"100%",styles:{padding:"16px 0px 0px 0px"},title:f.title},{default:t(()=>[n("div",E,[o(i(s.Card),{class:"approval-card"},{default:t(()=>[o(A,{"label-width":120},{default:t(()=>[n("div",null,[f.dataArray.filter(e=>e.type==="table").length>0?(a(!0),u(p,{key:0},m(f.dataArray.filter(e=>e.type==="table"),(e,h)=>(a(),u("div",{key:h},[n("h3",null,g(e.label),1),o(i(s.Divider)),e.value&&e.value.length?(a(),c(V,{key:0,columns:e.columns,data:e.value,border:"",size:"small",style:{margin:"8px 0px"}},null,8,["columns","data"])):k("",!0)]))),128)):k("",!0),l[2]||(l[2]=n("h3",null,"基本信息",-1)),o(i(s.Divider)),o(i(s.Row),null,{default:t(()=>[(a(!0),u(p,null,m(f.dataArray.filter(e=>e.type!=="table"),(e,h)=>(a(),u(p,{key:h},[e.type==="text"?(a(),c(x,D({key:0,ref_for:!0},y.grid,{class:"approval-col"}),{default:t(()=>[o(i(s.FormItem),{label:e.label},{default:t(()=>[n("span",null,g(e.value||"-"),1)]),_:2},1032,["label"])]),_:2},1040)):e.type==="tag"?(a(),c(x,D({key:1,ref_for:!0},y.grid,{class:"approval-col"}),{default:t(()=>[o(i(s.FormItem),{label:e.label},{default:t(()=>[o(i(s.Tag),{color:e.color[e.value]},{default:t(()=>[$(g(e.dict[e.value]),1)]),_:2},1032,["color"])]),_:2},1032,["label"])]),_:2},1040)):e.type==="file"?(a(),c(x,D({key:2,ref_for:!0},y.grid,{class:"approval-col"}),{default:t(()=>[o(i(s.FormItem),{label:"附件"},{default:t(()=>[o(T,{images:(e.value||[]).filter(r=>w(r.extension)==="image")},{default:t(()=>[(a(!0),u(p,null,m((e.value||[]).filter(r=>w(r.extension)==="image"),(r,b)=>(a(),u("img",{key:b,class:"previewImg",src:r.path,alt:""},null,8,P))),128))]),_:2},1032,["images"]),(a(!0),u(p,null,m((e.value||[]).filter(r=>w(r.extension)!=="image"),(r,b)=>(a(),u("p",{class:"file-cell",key:b},[l[1]||(l[1]=n("img",{src:B,style:{"min-width":"15px",height:"15px","margin-right":"8px"}},null,-1)),n("span",{class:"file-name",onClick:X=>C(r)},g(r.name),9,R)]))),128))]),_:2},1024)]),_:2},1040)):k("",!0)],64))),128))]),_:1})])]),_:1})]),_:1})]),n("div",z,[n("div",L,[j(d.$slots,"footer",{},void 0,!0)])])]),_:3},8,["modelValue","title"])}}},J=I(U,[["__scopeId","data-v-35fc53a5"]]);export{J as default};
import{_ as P,l as x}from"./index-ba497f75.js";import{r,o,c as p,a as c,w as n,l as C,h as j,e as i,f as b,F as _,k as y,p as F,t as k}from"./vendor-c142c249.js";const T={props:{loading:{type:Boolean,default:!1},formItem:{type:Array,require:!0},formRule:{type:Object,default:()=>{}},formLabelWidth:{type:Number,default:80},value:{type:Boolean,require:!0},width:{default:"520"},maskClosable:{type:Boolean,default:!1},__PROP_NAMES_MAP:{maskClosable:"mask-closable"}},watch:{value(s){this.show=s}},data(){return{show:this.value,modalTitle:"编辑",formData:{},grid:{xl:12,lg:12,md:24,sm:24,xs:24},uploadBtLoading:[],isDetails:!1,peopleKey:""}},computed:{},created(){},mounted(){},methods:{onQueryChange(s){this.peopleKey=s,this.$emit("getPeopleList",s)},modalInit(s="add",t,d=""){if(this.isDetails=!1,this.uploadBtLoading=[],s=="add")this.$refs.form.resetFields(),this.modalTitle=d||"新增",this.formData=t?x.cloneDeep(t):{};else if(s=="edit"){this.modalTitle="编辑",this.$refs.form.resetFields(),this.formData=x.cloneDeep(t);let m=this.formItem.findIndex(l=>l.type=="timerange");if(m!=-1){let l=this.formItem[m].id;this.formData[l]=this.formData[l].split("-")}}this.formItem.forEach(m=>{m.type=="file"&&this.uploadBtLoading.push(!1)})},modalDetailsInit(s,t){this.isDetails=!0,this.modalTitle=`${s[t]} - 详情`,this.formData=x.cloneDeep(s)},uploadFile(s,t,d){this.uploadBtLoading[d]=!0,this.$forceUpdate();let m=new FormData;return m.append("file",s),this.asc.postApiCommonFileUpload(m).then(l=>{l.code==1?(this.formData[t].push(l.response),this.$Message.success(l.msg)):this.$Message.error(l.msg_detail)}).finally(()=>{this.uploadBtLoading[d]=!1,this.$forceUpdate()}),!1},fileDel(s,t){let d=this.formData[t].findIndex(m=>m.id==s.id);this.formData[t].splice(d,1)},onClearTimerange(s,t){this.formData[t]=[]},beforeClose(){this.$emit("onClose")},onCancel(){this.$emit("onCancel"),this.$emit("onClose")},onSubmit(){this.$refs.form.validate(s=>{if(s){let t=x.cloneDeep(this.formData),d=this.formItem.findIndex(m=>m.type=="timerange");if(d!=-1){let m=this.formItem[d].id;t[m]=t[m].join("-")}this.$emit("onSubmit",t)}else this.$Message.warning("请检查输入项")})}}},N=["href"],A={key:0},E={key:1},H={key:2},Q=["href"],W={key:0},q={key:1};function K(s,t,d,m,l,h){const L=r("Spin"),v=r("Input"),I=r("Option"),O=r("Select"),S=r("Switch"),U=r("TimePicker"),D=r("FormItem"),w=r("Col"),V=r("Button"),u=r("Upload"),f=r("Icon"),B=r("Row"),M=r("Form"),R=r("Modal");return o(),p("div",null,[c(R,{modelValue:l.show,"onUpdate:modelValue":t[0]||(t[0]=e=>l.show=e),title:l.modalTitle,width:d.width,"mask-closable":d.maskClosable,transfer:!1,"before-close":h.beforeClose},{footer:n(()=>[l.isDetails?(o(),p("div",q,[c(V,{onClick:h.onCancel},{default:n(()=>t[4]||(t[4]=[C("关闭")])),_:1},8,["onClick"])])):(o(),p("div",W,[c(V,{onClick:h.onCancel},{default:n(()=>t[2]||(t[2]=[C("取消")])),_:1},8,["onClick"]),c(V,{type:"primary",onClick:h.onSubmit},{default:n(()=>t[3]||(t[3]=[C("提交")])),_:1},8,["onClick"])]))]),default:n(()=>[j("template",null,[d.loading?(o(),i(L,{key:0,size:"large",fix:""})):b("",!0),c(M,{ref:"form","label-colon":"",model:l.formData,rules:d.formRule,"label-width":d.formLabelWidth},{default:n(()=>[l.isDetails?b("",!0):(o(),i(B,{key:0},{default:n(()=>[(o(!0),p(_,null,y(d.formItem.filter(e=>e.type!="file"&&(!e.hasOwnProperty("show")||e.show)),e=>(o(),i(w,F({ref_for:!0},l.grid,{key:e.id}),{default:n(()=>[c(D,{label:e.name,prop:e.id},{default:n(()=>[e.type=="input"?(o(),i(v,{key:0,modelValue:l.formData[e.id],"onUpdate:modelValue":a=>l.formData[e.id]=a,clearable:"",placeholder:"请输入"+e.name,disabled:e.disabled},null,8,["modelValue","onUpdate:modelValue","placeholder","disabled"])):b("",!0),e.type=="textarea"?(o(),i(v,{key:1,modelValue:l.formData[e.id],"onUpdate:modelValue":a=>l.formData[e.id]=a,clearable:"",type:"textarea",placeholder:"请输入"+e.name,rows:e.rows,disabled:e.disabled},null,8,["modelValue","onUpdate:modelValue","placeholder","rows","disabled"])):e.type=="select"?(o(),i(O,{key:2,onOnQueryChange:h.onQueryChange,modelValue:l.formData[e.id],"onUpdate:modelValue":a=>l.formData[e.id]=a,clearable:"",placeholder:"请选择"+e.name,filterable:"",disabled:e.disabled},{default:n(()=>[(o(!0),p(_,null,y(e.optList,a=>(o(),i(I,{key:a.value,value:a.value},{default:n(()=>[C(k(a.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["onOnQueryChange","modelValue","onUpdate:modelValue","placeholder","disabled"])):e.type=="multipleselect"?(o(),i(O,{key:3,modelValue:l.formData[e.id],"onUpdate:modelValue":a=>l.formData[e.id]=a,clearable:"",multiple:"",filterable:"",placeholder:"请选择"+e.name,disabled:e.disabled},{default:n(()=>[(o(!0),p(_,null,y(e.optList,a=>(o(),i(I,{key:a.value,value:a.value},{default:n(()=>[C(k(a.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder","disabled"])):e.type=="switch"?(o(),i(S,{key:4,modelValue:l.formData[e.id],"onUpdate:modelValue":a=>l.formData[e.id]=a,"true-value":1,"false-value":0},null,8,["modelValue","onUpdate:modelValue"])):e.type=="timerange"?(o(),i(U,{key:5,modelValue:l.formData[e.id],"onUpdate:modelValue":a=>l.formData[e.id]=a,style:{width:"100%"},format:"HH:mm",type:"timerange",placement:"bottom-end",placeholder:"请选择"+e.name,onOnClear:a=>h.onClearTimerange(a,e.id)},null,8,["modelValue","onUpdate:modelValue","placeholder","onOnClear"])):b("",!0)]),_:2},1032,["label","prop"])]),_:2},1040))),128)),(o(!0),p(_,null,y(d.formItem.filter(e=>e.type=="file"&&(!e.hasOwnProperty("show")||e.show)),(e,a)=>(o(),i(w,{span:"12",key:e.id},{default:n(()=>[c(D,{label:e.name,prop:e.name},{default:n(()=>[c(u,{multiple:"",action:"#","before-upload":g=>h.uploadFile(g,e.id,a)},{default:n(()=>[c(V,{icon:"ios-cloud-upload-outline",loading:l.uploadBtLoading[a]},{default:n(()=>t[1]||(t[1]=[C("选择文件 ")])),_:2},1032,["loading"])]),_:2},1032,["before-upload"]),(o(!0),p(_,null,y(l.formData[e.id],g=>(o(),p("p",{key:g.path,class:"fileRow"},[j("a",{target:"_blank",href:g.path},k(g.file_name),9,N),c(f,{class:"delIcon",type:"md-close",onClick:J=>h.fileDel(g,e.id)},null,8,["onClick"])]))),128))]),_:2},1032,["label","prop"])]),_:2},1024))),128))]),_:1})),l.isDetails?(o(),i(B,{key:1},{default:n(()=>[(o(!0),p(_,null,y(d.formItem.filter(e=>e.type!="file"&&(!e.hasOwnProperty("show")||e.show)),e=>(o(),i(w,F({ref_for:!0},l.grid,{key:e.id}),{default:n(()=>[c(D,{label:e.name,prop:e.name},{default:n(()=>[e.type=="input"?(o(),p("span",A,k(l.formData[e.id]),1)):b("",!0),e.type=="select"?(o(),p("span",E,k(e.optList[e.optList.findIndex(a=>a.value==l.formData[e.id])].label),1)):b("",!0),e.type=="switch"?(o(),p("span",H,k(`${l.formData[e.id]==1?"是":"否"}`),1)):b("",!0)]),_:2},1032,["label","prop"])]),_:2},1040))),128)),(o(!0),p(_,null,y(d.formItem.filter(e=>e.type=="file"&&(!e.hasOwnProperty("show")||e.show)),e=>(o(),i(w,{span:"12",key:e.id},{default:n(()=>[c(D,{label:e.name,prop:e.name},{default:n(()=>[(o(!0),p(_,null,y(l.formData[e.id],a=>(o(),p("p",{key:a.path,class:"fileRow"},[j("a",{target:"_blank",href:a.path},k(a.file_name),9,Q),c(f,{class:"delIcon",type:"md-close",onClick:g=>h.fileDel(a,e.id)},null,8,["onClick"])]))),128))]),_:2},1032,["label","prop"])]),_:2},1024))),128))]),_:1})):b("",!0)]),_:1},8,["model","rules","label-width"])])]),_:1},8,["modelValue","title","width","mask-closable","before-close"])])}const Z=P(T,[["render",K],["__scopeId","data-v-0f26ff3f"]]);const z={props:{searchCondList:{type:Array,require:!0},labelWidth:{type:Number,default:100},labelColon:{type:Boolean,default:!0}},data(){return{grid:{sm:12,md:12,lg:8,xl:6},searchCondObj:{}}},computed:{},created(){},mounted(){},methods:{searchBt(){this.$emit("onSubmit",this.searchCondObj)},resetBt(){this.searchCondObj={},this.$emit("onReset")},datetimeChange(s,t,d){this.searchCondObj[d]=s}}};function G(s,t,d,m,l,h){const L=r("Input"),v=r("Option"),I=r("Select"),O=r("DatePicker"),S=r("FormItem"),U=r("Col"),D=r("Button"),w=r("Row"),V=r("Form");return o(),p("div",null,[c(V,{class:"searchDiv",model:l.searchCondObj,"label-width":d.labelWidth,"label-colon":d.labelColon},{default:n(()=>[c(w,null,{default:n(()=>[(o(!0),p(_,null,y(d.searchCondList.filter(u=>u.show),u=>(o(),i(U,F({ref_for:!0},l.grid,{key:u.id}),{default:n(()=>[c(S,{label:u.name},{default:n(()=>[u.type=="input"?(o(),i(L,{key:0,style:{width:"100%"},modelValue:l.searchCondObj[u.id],"onUpdate:modelValue":f=>l.searchCondObj[u.id]=f,clearable:"",placeholder:"请输入"+u.name},null,8,["modelValue","onUpdate:modelValue","placeholder"])):u.type=="select"?(o(),i(I,{key:1,style:{width:"100%"},modelValue:l.searchCondObj[u.id],"onUpdate:modelValue":f=>l.searchCondObj[u.id]=f,clearable:"",placeholder:"请选择"+u.name},{default:n(()=>[(o(!0),p(_,null,y(u.optList,f=>(o(),i(v,{key:f.value,value:f.value},{default:n(()=>[C(k(f.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])):u.type=="datetime"?(o(),i(O,{key:2,modelValue:l.searchCondObj[u.id],"onUpdate:modelValue":f=>l.searchCondObj[u.id]=f,type:"datetime",format:"yyyy-MM-dd HH:mm",placeholder:"请选择"+u.name,onOnChange:(f,B)=>h.datetimeChange(f,B,u.id)},null,8,["modelValue","onUpdate:modelValue","placeholder","onOnChange"])):b("",!0)]),_:2},1032,["label"])]),_:2},1040))),128)),c(U,F(l.grid,{class:"buttonCol"}),{default:n(()=>[c(D,{type:"primary",onClick:h.searchBt},{default:n(()=>t[0]||(t[0]=[C("查询")])),_:1},8,["onClick"]),c(D,{onClick:h.resetBt},{default:n(()=>t[1]||(t[1]=[C("重置")])),_:1},8,["onClick"])]),_:1},16)]),_:1})]),_:1},8,["model","label-width","label-colon"])])}const $=P(z,[["render",G],["__scopeId","data-v-d60a2dac"]]);export{Z as C,$ as S};
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
import{s as i}from"./index-ba497f75.js";function o(e,r){const t={query:e.query,page_index:e.page_index,page_size:e.page_size};return i.get("/api/Common/userSelect",{params:t,...r})}export{o as g};
import{s as i}from"./index-ba497f75.js";function n(e){return i.get("/api/ConsumaMeterial/GetClassificationTree",e)}function r(e,a){const t={query:e.query,classification_id:e.classification_id,is_under_safe:e.is_under_safe,page_index:e.page_index,page_size:e.page_size};return i.get("/api/ConsumaMeterial/MaterialList",{params:t,...a})}export{n as a,r as g};
import{s as i}from"./index-ba497f75.js";function m(e,t){const n={equipment_id:e.equipment_id,month:e.month};return i.get("/api/Equipment/EquipmentCalendar",{params:n,...t})}export{m as g};
import{s as p}from"./index-ba497f75.js";function u(e,t){const i={query:e.query,page_index:e.page_index,page_size:e.page_size};return p.get("/api/Equipment/EquipmentSelect",{params:i,...t})}export{u as g};
import{s as i}from"./index-ba497f75.js";function u(e,t){return i.post("/api/Equipment/EquipmentAdd",e,t)}function m(e,t){return i.post("/api/Equipment/EquipmentOut",e,t)}function q(e,t){const n={equipment_id:e.equipment_id,page_index:e.page_index,page_size:e.page_size};return i.get("/api/Equipment/EquipmentLendLsit",{params:n,...t})}function a(e,t){const n={equipment_id:e.equipment_id,return_date:e.return_date,returnee_id:e.returnee_id};return i.get("/api/Equipment/EquipmentReturn",{params:n,...t})}function r(e,t){return i.post("/api/Equipment/EquipmentUpdate",e,t)}function s(e,t){const n={equipment_id:e.equipment_id};return i.get("/api/Equipment/EquipmentDelete",{params:n,...t})}function E(e){return i.get("/api/Equipment/GetEquipmentClassificationTree",e)}export{q as a,s as b,a as c,u as d,r as e,E as g,m as p};
import{s as i}from"./index-ba497f75.js";function r(e){return i.post("/api/Common/GetDept",e)}function o(e){return i.get("/api/Permission/Init",e)}function p(e,n){const s={query:e.query,role:e.role,page_index:e.page_index,page_size:e.page_size};return i.get("/api/Permission/Query",{params:s,...n})}function a(e,n){const s={id:e.id};return i.get("/api/Permission/PermissionDelete",{params:s,...n})}export{o as a,a as b,p as g,r as p};
import{s as i}from"./index-ba497f75.js";function g(n,r){const a={warning_id:n.warning_id};return i.get("/api/Warning/WarningOrdered",{params:a,...r})}function t(n,r){const a={warning_id:n.warning_id};return i.get("/api/Warning/WarningReceived",{params:a,...r})}export{t as a,g};
此差异已折叠。
import{_ as t}from"./index-ba497f75.js";import{r as n,c,a as r,o as a}from"./vendor-c142c249.js";const p={name:"page-error-403"};function s(e,i,l,m,d,_){const o=n("Exception");return a(),c("div",null,[r(o,{type:"403","img-color":"",desc:e.$t("page.exception.e403"),"back-text":e.$t("page.exception.btn")},null,8,["desc","back-text"])])}const u=t(p,[["render",s]]);export{u as default};
import{_ as b,v as t,a as _}from"./index-ba497f75.js";import{$ as f,O as y,c as g,a,w as o,a0 as e,o as s,e as r,f as i,a1 as l}from"./vendor-c142c249.js";const v={dis:"",style:{width:"100%",height:"100%"}},C={__name:"index",setup(w){const c=l(()=>_(()=>import("./outbound-b7ab1106.js"),["./outbound-b7ab1106.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./index-a3853ee9.js","../css/index-6b6653b7.css","./getApiCommonUserSelect-34bfd582.js","./getApiEquipmentEquipmentSelect-cb3aa0c5.js","./index-ca4ab011.js","../css/outbound-cb48a612.css"],import.meta.url)),u=l(()=>_(()=>import("./inventory-f9268beb.js"),["./inventory-f9268beb.js","./index-a3853ee9.js","./vendor-c142c249.js","./index-ba497f75.js","../css/index-87ae257b.css","../css/index-6b6653b7.css","./getApiCommonUserSelect-34bfd582.js","./getApiEquipmentGetEquipmentClassificationTree-486b8952.js","./getApiEquipmentEquipmentCalendar-61b3ce36.js","./index-ca4ab011.js","../css/inventory-b6fdd3f1.css"],import.meta.url)),h=l(()=>_(()=>import("./allBorrowingRecords-4df1d6b9.js"),["./allBorrowingRecords-4df1d6b9.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./index-a3853ee9.js","../css/index-6b6653b7.css","./getApiCommonUserSelect-34bfd582.js","./getApiEquipmentEquipmentSelect-cb3aa0c5.js","./index-ca4ab011.js","../css/allBorrowingRecords-dd640f58.css"],import.meta.url)),m=l(()=>_(()=>import("./storageRecord-979b5ea0.js"),["./storageRecord-979b5ea0.js","./index-a3853ee9.js","./vendor-c142c249.js","./index-ba497f75.js","../css/index-87ae257b.css","../css/index-6b6653b7.css","./getApiCommonUserSelect-34bfd582.js","./getApiEquipmentGetEquipmentClassificationTree-486b8952.js","./getApiEquipmentEquipmentCalendar-61b3ce36.js","./index-ca4ab011.js","../css/storageRecord-5d121ca5.css"],import.meta.url)),n=f({tabsChange:0,equipmentInventoryKey:"",borrowingOutOfStockKey:""});function p(d){console.log("🚀🚀🚀,",d),n.tabsChange=d}return y(()=>{}),(d,E)=>(s(),g("div",v,[a(e(t.Card),{class:"role-content"},{default:o(()=>[a(e(t.Tabs),{style:{width:"100%"},type:"card",onOnClick:p},{default:o(()=>[a(e(t.TabPane),{label:"设备库存",style:{width:"100%",height:"100%"}},{default:o(()=>[n.tabsChange==0?(s(),r(e(u),{key:0})):i("",!0)]),_:1}),a(e(t.TabPane),{label:"设备入库记录",style:{width:"100%",height:"100%"}},{default:o(()=>[n.tabsChange==1?(s(),r(e(m),{key:0})):i("",!0)]),_:1}),a(e(t.TabPane),{label:"所有申请记录",style:{height:"100%",width:"100%"}},{default:o(()=>[n.tabsChange==2?(s(),r(e(c),{key:0})):i("",!0)]),_:1}),a(e(t.TabPane),{label:"所有借用记录",style:{height:"100%",width:"100%"}},{default:o(()=>[n.tabsChange==3?(s(),r(e(h),{key:0})):i("",!0)]),_:1})]),_:1})]),_:1})]))}},O=b(C,[["__scopeId","data-v-ead70f67"]]);export{O as default};
import{_ as b,a as r}from"./index-ba497f75.js";import{R as e,L as I,$ as D,O as L,r as c,c as l,h as s,F as R,k as E,a as d,w as A,o as n,n as _,t as B,e as p,C as V,a0 as u,K as W,a1 as m}from"./vendor-c142c249.js";const K={class:"role-container"},O={class:"role-sidebar"},P={class:"role-list"},F=["onClick"],N={class:"role-item-info"},S={class:"role-name"},T={__name:"index",setup($){const v=m(()=>r(()=>import("./index-fe967694.js"),["./index-fe967694.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","../css/index-1da2cf81.css"],import.meta.url)),y=m(()=>r(()=>import("./index-f4bde159.js"),["./index-f4bde159.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","../css/index-96c1e616.css"],import.meta.url)),h=e([{role_type:0,role_name:"设备",count:14},{role_type:1,role_name:"耗材",count:4}]);e([]);const a=e({role_type:0}),f=t=>{switch(t){case 0:return"role-admin";case 1:return"role-party-office";case 2:return"role-responsible-dept";case 3:return"role-entrance-dept";default:return"role-admin"}};I(()=>{const t=[{title:"#",type:"index",width:60},{title:"照片",slot:"avatar",width:80},{title:"工号",key:"user_id",width:120},{title:"姓名",key:"name",minWidth:120}];return a.value.role_type===2&&t.push({title:"负责部门",slot:"duty_depts",minWidth:200}),t.push({title:"操作",slot:"action",width:80,align:"center"}),t}),e([{title:"照片",slot:"avatar",width:80},{title:"工号",key:"user_id",width:120},{title:"姓名",key:"name",minWidth:120},{title:"部门",key:"dept_name",minWidth:150},{title:"操作",slot:"action",width:80,align:"center"}]),e(0);const k=e(1);e(20);const w=e("");e(!1),D({show:!1,loading:!1,keyword:"",userList:[],dutyDepts:[]}),e([]);const C=t=>{console.log("role🚀🚀🚀,",t),a.value=t,w.value="",k.value=1};return L(()=>{}),(t,i)=>{const x=c("Icon"),g=c("Card");return n(),l("div",K,[s("div",O,[i[0]||(i[0]=s("div",{class:"role-title"},"审核审批",-1)),s("div",P,[(n(!0),l(R,null,E(h.value,o=>(n(),l("div",{key:o.role_type,class:_(["role-item",{active:a.value.role_type===o.role_type}]),onClick:z=>C(o)},[s("div",{class:_(["role-item-icon",f(o.role_type)])},[d(x,{type:o.role_type===0?"ios-desktop":"ios-cube"},null,8,["type"])],2),s("div",N,[s("div",S,B(o.role_name),1)])],10,F))),128))])]),d(g,{"dis-hover":"",bordered:!1,style:{width:"calc(100% - 300px)",height:"100%"}},{default:A(()=>[(n(),p(W,null,[(n(),p(V(a.value.role_type==0?u(v):u(y))))],1024))]),_:1})])}}},q=b(T,[["__scopeId","data-v-5b107e14"]]);export{q as default};
import{_ as a,b as c}from"./index-ba497f75.js";import{O as s,r as u,c as i,a as d,a4 as _,o as p}from"./vendor-c142c249.js";const l={class:"demo-spin-container"},m={__name:"index",setup(v){let e=_();const t=e.currentRoute.value.query.token;e.currentRoute.value.query.userType;const f=e.currentRoute.value.query.card,o=e.currentRoute.value.query.redirect;async function r(){t&&(await c.dispatch("admin/account/ascLogin",{token:t},{root:!0}),e.replace(o||"/"))}return s(()=>{r()}),(x,y)=>{const n=u("Spin");return p(),i("div",l,[d(n,{fix:"",size:"large"})])}}},R=a(m,[["__scopeId","data-v-d3091835"]]);export{R as default};
import{_ as t}from"./index-ba497f75.js";import{r as n,c,a as r,o as a}from"./vendor-c142c249.js";const p={name:"page-error-500"};function s(e,i,l,m,d,_){const o=n("Exception");return a(),c("div",null,[r(o,{type:"500","img-color":"",desc:e.$t("page.exception.e500"),"back-text":e.$t("page.exception.btn")},null,8,["desc","back-text"])])}const u=t(p,[["render",s]]);export{u as default};
import{_ as f,v as o,a as l}from"./index-ba497f75.js";import{$ as y,R as b,O as g,o as s,c as v,h as C,a as n,w as _,a0 as t,e as d,f as i,a1 as c}from"./vendor-c142c249.js";const x={style:{width:"100%",height:"100%"}},V={class:"role-content"},k={__name:"index",setup(w){const u=c(()=>l(()=>import("./applyFor-98592c33.js"),["./applyFor-98592c33.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./zip-3379b2db.js","./index-a3853ee9.js","../css/index-6b6653b7.css","./postApiCommonUploadFile-05b67979.js","./getApiEquipmentEquipmentCalendar-61b3ce36.js","./getApiEquipmentEquipmentSelect-cb3aa0c5.js","./postApiEquipmentApplicationEquipmentApply-ad93fe8a.js","./index-ca4ab011.js","../css/applyFor-20d7aca5.css"],import.meta.url)),p=c(()=>l(()=>import("./takeOver-c622e5a1.js"),["./takeOver-c622e5a1.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./index-a3853ee9.js","../css/index-6b6653b7.css","./postApiClassificationClassificationList-20bd57a5.js","../css/takeOver-3786b562.css"],import.meta.url)),e=y({tabsChange:0});b([{role_type:0,role_name:"设备审核",count:14},{role_type:1,role_name:"耗材审核",count:4}]);function m(a){console.log("🚀🚀🚀,",a),e.tabsChange=a}return g(()=>{}),(a,r)=>(s(),v("div",x,[C("div",V,[n(t(o.Tabs),{modelValue:e.tabsChange,"onUpdate:modelValue":r[0]||(r[0]=h=>e.tabsChange=h),style:{width:"100%"},type:"card",onOnClick:m},{default:_(()=>[n(t(o.TabPane),{label:"申请设备",style:{width:"100%",height:"100%"}},{default:_(()=>[e.tabsChange==0?(s(),d(t(u),{key:0})):i("",!0)]),_:1}),n(t(o.TabPane),{label:"借用记录",style:{height:"100%",width:"100%"}},{default:_(()=>[e.tabsChange==1?(s(),d(t(p),{key:0})):i("",!0)]),_:1})]),_:1},8,["modelValue"])])]))}},O=f(k,[["__scopeId","data-v-d22fd7c5"]]);export{O as default};
import{_ as I,a as r}from"./index-ba497f75.js";import{R as e,L as D,$ as L,O as R,r as c,c as l,h as s,F as b,k as E,a as d,w as A,o as n,n as _,t as B,e as p,C as V,a0 as u,K as W,a1 as m}from"./vendor-c142c249.js";const K={class:"role-container"},O={class:"role-sidebar"},P={class:"role-list"},F=["onClick"],N={class:"role-item-info"},S={class:"role-name"},T={__name:"index",setup($){const v=m(()=>r(()=>import("./index-73c0f341.js"),["./index-73c0f341.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","../css/index-4dff454f.css"],import.meta.url)),y=m(()=>r(()=>import("./index-ad28ac1a.js"),["./index-ad28ac1a.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","../css/index-eba06876.css"],import.meta.url)),h=e([{role_type:0,role_name:"设备",count:14},{role_type:1,role_name:"耗材",count:4}]);e([]);const a=e({role_type:0}),f=t=>{switch(t){case 0:return"role-admin";case 1:return"role-party-office";case 2:return"role-responsible-dept";case 3:return"role-entrance-dept";default:return"role-admin"}};D(()=>{const t=[{title:"#",type:"index",width:60},{title:"照片",slot:"avatar",width:80},{title:"工号",key:"user_id",width:120},{title:"姓名",key:"name",minWidth:120}];return a.value.role_type===2&&t.push({title:"负责部门",slot:"duty_depts",minWidth:200}),t.push({title:"操作",slot:"action",width:80,align:"center"}),t}),e([{title:"照片",slot:"avatar",width:80},{title:"工号",key:"user_id",width:120},{title:"姓名",key:"name",minWidth:120},{title:"部门",key:"dept_name",minWidth:150},{title:"操作",slot:"action",width:80,align:"center"}]),e(0);const k=e(1);e(20);const w=e("");e(!1),L({show:!1,loading:!1,keyword:"",userList:[],dutyDepts:[]}),e([]);const C=t=>{console.log("role🚀🚀🚀,",t),a.value=t,w.value="",k.value=1};return R(()=>{}),(t,i)=>{const x=c("Icon"),g=c("Card");return n(),l("div",K,[s("div",O,[i[0]||(i[0]=s("div",{class:"role-title"},"申请申领",-1)),s("div",P,[(n(!0),l(b,null,E(h.value,o=>(n(),l("div",{key:o.role_type,class:_(["role-item",{active:a.value.role_type===o.role_type}]),onClick:z=>C(o)},[s("div",{class:_(["role-item-icon",f(o.role_type)])},[d(x,{type:o.role_type===0?"ios-desktop":"ios-cube"},null,8,["type"])],2),s("div",N,[s("div",S,B(o.role_name),1)])],10,F))),128))])]),d(g,{"dis-hover":"",bordered:!1,style:{width:"calc(100% - 300px)",height:"100%"}},{default:A(()=>[(n(),p(W,null,[(n(),p(V(a.value.role_type==0?u(v):u(y))))],1024))]),_:1})])}}},q=I(T,[["__scopeId","data-v-18ff7972"]]);export{q as default};
此差异已折叠。
import{i as se}from"./index-a3853ee9.js";import{_ as re,v as n}from"./index-ba497f75.js";import{g as F}from"./getApiCommonUserSelect-34bfd582.js";import{g as le,a as ne,p as de,b as ie}from"./getApiPermissionPermissionDelete-20fceb50.js";import{p as ue,a as pe}from"./postApiPermissionPermissionUpdate-c9cba0e4.js";import{m as D}from"./index-ca4ab011.js";import{$ as L,R as w,O as me,r as m,c as h,a as l,w as s,a0 as i,F as R,o as u,h as p,l as g,e as y,k as x,t as v,a2 as z,a3 as P}from"./vendor-c142c249.js";const ce={class:"role-content"},ge={class:"role-toolbar"},fe={class:"user-avatar"},_e={class:"action-btns"},ye=["onClick"],he={class:"pagination"},Re={class:"add-user-search"},ve={class:"user-avatar"},be={class:"action-btns"},ke={class:"pagination",style:{"margin-top":"16px"}},Ce={__name:"index",setup(De){const e=L({grid:{xs:24,sm:12,md:12,lg:12},searchList:[],userRole:{flag:"add",loading:!1,total:0,data:[],columns:[{title:"#",type:"index",width:60,fixed:"left"},{title:"工号",key:"card",minWidth:120,render:(t,a)=>t("span",a.row.card||"-")},{title:"用户姓名",key:"name",minWidth:120,render:(t,a)=>t("span",a.row.name||"-")},{title:"权限",key:"role",minWidth:100,render:(t,a)=>t("span",{dept:"系部管理员",user:"普通用户",admin:"管理员"}[a.row.role]||a.row.role||"-")},{title:"所属部门",slot:"duty_dept",minWidth:180},{title:"操作",slot:"action",width:120,align:"center",fixed:"right"}],params:{query:"",role:"",page_index:1,page_size:10},show:!1,file_id_lists:[],equipment_id_lists:[],equipmentOptions:[],roles:[],duty_depts:[],formData:{recordId:"",tid:"",tids:[],role:"",duty_dept:[]},rules:{tid:[{required:!0,type:"string",message:"请选择用户",trigger:"change"}],duty_dept:[{required:!0,type:"array",message:"请选择部门",trigger:"change"}],role:[{required:!0,type:"string",message:"请选择权限",trigger:"change"}]}},downloadLoading:!1}),f=()=>{e.userRole.loading=!0,le(e.userRole.params).then(t=>{e.userRole.data=t.response.data,e.userRole.total=t.response.data_count,e.userRole.loading=!1}).finally(()=>{e.userRole.loading=!1})},I=t=>{e.userRole.params={...e.userRole.params,...t,page_index:1},f()},q=()=>{e.userRole.params={query:"",status:"",audit_status:"0",page_index:1,page_size:10},f()},M=t=>{e.userRole.params.page_index=t,f()},B=t=>{e.userRole.params.page_size=t,e.userRole.params.page_index=1,f()},T=()=>{e.userRole.flag="add",e.userRole.show=!0,e.userRole.formData={...e.userRole.formData,tid:"",role:"",duty_dept:[]},b.value.resetFields()},b=w(),W=()=>{console.log("🚀🚀🚀,",e.userRole.formData),b.value.validate(t=>{t&&{add:()=>{D(()=>ue({tid:e.userRole.formData.tid,role:e.userRole.formData.role,duty_dept:e.userRole.formData.duty_dept.join(";")}).then(d=>{if(d.code===1)return f(),e.userRole.show=!1,d}),!1,"正在提交中...")},edit:()=>{D(()=>pe({id:e.userRole.formData.recordId,role:e.userRole.formData.role,duty_dept:e.userRole.formData.duty_dept.join(";")}).then(d=>{if(d.code===1)return f(),e.userRole.show=!1,d}),!1,"正在提交中...")}}[e.userRole.flag]()})};function $(t){D(()=>ie({id:t.id}).then(a=>{if(a.code===1)return f(),a}),!1,"正在删除中...")}async function j(t){e.userRole.formData={...e.userRole.formData,recordId:t.id,tid:t.tid,role:t.role,duty_dept:t.duty_dept.map(a=>a.dept_id),tids:[{...t,card_number:t.card}]},console.log("🚀🚀🚀,",t),e.userRole.flag="edit",e.userRole.show=!0}const r=L({flag:"",pageKey:"",params:{page_index:1,page_size:100,query:""},total:0,show:!1,loading:!1,keyword:"",batchUserList:[],userList:[],dutyDepts:[],availableUserColumns:[{align:"center",type:"selection",width:60},{title:"照片",slot:"avatar",width:80},{title:"工号",key:"card_number",width:120},{title:"姓名",key:"name",minWidth:120},{title:"部门",key:"dept_name",minWidth:150},{title:"性别",key:"gender",width:80}]});w([]);const E=async()=>{k()};function G(){({选择用户:()=>{const a=e.userRole.formData.tids.map(c=>c.tid);let d=[];r.batchUserList.forEach((c,O)=>{a.includes(c.tid)||d.push(c)}),e.userRole.formData.tids=e.userRole.formData.tids.concat(d),r.show=!1}})[r.flag]()}function N(t){console.log("e",t),r.batchUserList=t}const Q=async t=>{},k=()=>{r.loading=!0;try{F({...r.params,query:r.keyword}).then(t=>{r.userList=t.response.data||[],r.total=t.response.data_count}).catch(t=>{console.error("获取角色用户列表失败:",t),n.Message.error("获取角色用户列表失败")}).finally(()=>{r.loading=!1})}catch(t){console.error("获取角色用户列表失败:",t),n.Message.error("获取角色用户列表失败"),r.loading=!1}},K=t=>{r.params.page_index=t,k()},H=t=>{r.params.page_size=t,r.params.page_index=1,k()};function J(){ne().then(t=>{e.searchList=t.response})}function X(){de().then(t=>{e.userRole.duty_depts=t.response})}function U(){return r.loading=!0,F(r.params).then(t=>(e.userRole.formData.tids=t.response.data,r.loading=!1,t))}const V=w({});function Y(t){console.log("🚀🚀🚀,",t),r.params.query=t,clearTimeout(V.value),V.value=setTimeout(()=>U(),100)}return me(()=>{U(),X(),J(),f()}),(t,a)=>{const d=m("Button"),c=m("Avatar"),O=m("Divider"),Z=m("Poptip"),A=m("Table"),ee=m("Card"),C=m("Col"),S=m("Row"),te=m("Form"),ae=m("Input");return u(),h(R,null,[l(ee,{"dis-hover":"",style:{width:"100%",height:"100%"}},{default:s(()=>[p("div",ce,[p("div",ge,[l(i(se),{ref:"searchFormRef",searchCondList:e.searchList,onOnSubmit:I,onOnReset:q},null,8,["searchCondList"]),p("div",null,[l(d,{type:"primary",icon:"md-add",onClick:T},{default:s(()=>a[8]||(a[8]=[g("分配权限")])),_:1})])]),l(A,{loading:e.userRole.loading,columns:e.userRole.columns,data:e.userRole.data,border:""},{avatar:s(({row:o})=>[p("div",fe,[o.photo?(u(),y(c,{key:0,size:"large",src:o.photo},null,8,["src"])):(u(),y(c,{key:1,icon:"ios-person",size:"large"}))])]),duty_dept:s(({row:o})=>[(u(!0),h(R,null,x(o.duty_dept,(_,oe)=>(u(),y(i(n.Tag),{key:oe,color:"blue",style:{margin:"2px"}},{default:s(()=>[g(v(_.dept_name),1)]),_:2},1024))),128))]),action:s(({row:o})=>[p("div",_e,[p("a",{href:"javascript:;",onClick:_=>j(o)},"编辑",8,ye),l(O,{type:"vertical"}),l(Z,{confirm:"",transfer:"",title:"确定要删除该设备吗?",onOnOk:_=>$(o)},{default:s(()=>a[9]||(a[9]=[p("a",{href:"javascript:;"},"删除",-1)])),_:2},1032,["onOnOk"])])]),_:1},8,["loading","columns","data"]),p("div",he,[l(i(n.Page),{transfer:!0,total:e.userRole.total,current:e.userRole.params.page_index,"page-size":e.userRole.params.page_size,"show-elevator":"","show-sizer":"","show-total":"",onOnChange:M,onOnPageSizeChange:B},null,8,["total","current","page-size"])])])]),_:1}),l(i(n.Modal),{modelValue:e.userRole.show,"onUpdate:modelValue":a[4]||(a[4]=o=>e.userRole.show=o),title:"分配权限",width:"700","mask-closable":!1},{footer:s(()=>[l(d,{onClick:a[3]||(a[3]=o=>e.userRole.show=!1)},{default:s(()=>a[10]||(a[10]=[g("取消")])),_:1}),l(d,{type:"primary",onClick:W},{default:s(()=>a[11]||(a[11]=[g("确定")])),_:1})]),default:s(()=>[l(te,{ref_key:"deviceForm",ref:b,model:e.userRole.formData,rules:e.userRole.rules,"label-width":100},{default:s(()=>[l(S,null,{default:s(()=>[l(C,z(P(e.grid)),{default:s(()=>[l(i(n.FormItem),{label:"用户",prop:"tid"},{default:s(()=>[l(i(n.Select),{disabled:e.userRole.flag=="edit",filterable:"",clearable:"",loading:r.loading,modelValue:e.userRole.formData.tid,"onUpdate:modelValue":a[0]||(a[0]=o=>e.userRole.formData.tid=o),placeholder:"请选择用户","remote-method":Y},{default:s(()=>[(u(!0),h(R,null,x(e.userRole.formData.tids,(o,_)=>(u(),y(i(n.Option),{key:_,value:o.tid},{default:s(()=>[g(v(o.name)+"("+v(o.card_number)+")",1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","loading","modelValue"])]),_:1})]),_:1},16),l(C,z(P(e.grid)),{default:s(()=>[l(i(n.FormItem),{label:"权限",prop:"role"},{default:s(()=>[l(i(n.Select),{clearable:"",modelValue:e.userRole.formData.role,"onUpdate:modelValue":a[1]||(a[1]=o=>e.userRole.formData.role=o),placeholder:"请输入申请原因"},{default:s(()=>[l(i(n.Option),{value:"admin",label:"管理员"}),l(i(n.Option),{value:"dept",label:"部门管理员"})]),_:1},8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),l(S,z(P(e.grid)),{default:s(()=>[l(C,null,{default:s(()=>[l(i(n.FormItem),{label:"部门信息",prop:"duty_dept"},{default:s(()=>[l(i(n.CheckboxGroup),{modelValue:e.userRole.formData.duty_dept,"onUpdate:modelValue":a[2]||(a[2]=o=>e.userRole.formData.duty_dept=o)},{default:s(()=>[(u(!0),h(R,null,x(e.userRole.duty_depts,(o,_)=>(u(),y(i(n.Checkbox),{label:o.dept_id,key:_},{default:s(()=>[g(v(o.dept_name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},16)]),_:1},8,["model","rules"])]),_:1},8,["modelValue"]),l(i(n.Modal),{modelValue:r.show,"onUpdate:modelValue":a[7]||(a[7]=o=>r.show=o),title:"选择用户",width:"700","mask-closable":!1},{footer:s(()=>[l(d,{onClick:a[6]||(a[6]=o=>r.show=!1)},{default:s(()=>a[14]||(a[14]=[g("关闭")])),_:1})]),default:s(()=>[p("div",Re,[l(ae,{modelValue:r.keyword,"onUpdate:modelValue":a[5]||(a[5]=o=>r.keyword=o),placeholder:"输入用户名称搜索",search:"",clearable:"","enter-button":"",onOnSearch:E},null,8,["modelValue"]),l(d,{style:{"margin-left":"10px"},type:"primary",onClick:G},{default:s(()=>a[12]||(a[12]=[g("批量添加 ")])),_:1})]),l(A,{onOnSelectionChange:N,loading:r.loading,columns:r.availableUserColumns,data:r.userList,border:""},{avatar:s(({row:o})=>[p("div",ve,[o.photo?(u(),y(c,{key:0,size:"large",src:o.photo},null,8,["src"])):(u(),y(c,{key:1,icon:"ios-person",size:"large"}))])]),action:s(({row:o})=>[p("div",be,[l(d,{type:"primary",size:"small",onClick:_=>Q(o)},{default:s(()=>a[13]||(a[13]=[g("添加 ")])),_:2},1032,["onClick"])])]),_:1},8,["loading","columns","data"]),p("div",ke,[(u(),y(i(n.Page),{key:r.pageKey,total:r.total,current:r.params.page_index,"page-size":r.params.page_size,"show-elevator":"","show-sizer":"","show-total":"",onOnChange:K,onOnPageSizeChange:H},null,8,["total","current","page-size"]))])]),_:1},8,["modelValue"])],64)}}},Ae=re(Ce,[["__scopeId","data-v-d0d63add"]]);export{Ae as default};
import{o as s,c as h,F as C,h as v,t as f,f as V,n as K,R as k,M as Q,r as c,a as p,w as r,k as I,e as u,p as M,a5 as Z,l as S,X as ee,Y as ae}from"./vendor-c142c249.js";import{_ as T}from"./index-ba497f75.js";const le={class:"chinese"},ne={class:"separator"},oe={key:0,class:"english"},te={class:"separator"},se={class:"chinese"},de={key:0,class:"english"},ce={__name:"index",props:{chinese:{type:String,default:""},english:{type:String,default:""},mode:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},separator:{type:String,default:"("},endSeparator:{type:String,default:")"}},setup(t){return(w,x)=>(s(),h("div",{class:K(["bilingual-text",{"vertical-mode":t.mode==="vertical","horizontal-mode":t.mode==="horizontal"}])},[t.mode==="horizontal"?(s(),h(C,{key:0},[v("span",le,f(t.chinese),1),v("span",ne,f(t.separator),1),t.english?(s(),h("span",oe,f(t.english),1)):V("",!0),v("span",te,f(t.endSeparator),1)],64)):(s(),h(C,{key:1},[v("span",se,f(t.chinese),1),t.english?(s(),h("span",de,f(t.english),1)):V("",!0)],64))],2))}},re=T(ce,[["__scopeId","data-v-b7c6ed2f"]]);const ue={__name:"index",props:{searchCondList:{type:Array,default:()=>[]},labelWidth:{type:Number,default:100},labelPosition:{type:String,default:"right"},labelColon:{type:Boolean,default:!0},hiddenExpBt:{type:Boolean,default:!1},showReset:{type:Boolean,default:!0}},emits:["on-submit","on-reset"],setup(t,{expose:w,emit:x}){const O=t,B=x,P=k(null),_=k(!1),l=k({}),U={sm:12,md:12,lg:8,xl:6},J=()=>{B("on-submit",{...l.value})},z=()=>{E(),B("on-reset")},N=(n,a,d)=>{l.value[d]=n},L=()=>{_.value=!_.value},R=(n,a)=>{l.value[a.code]=n,l.value[a.code+"_start"]=n[0],l.value[a.code+"_end"]=n[1]},E=()=>{const n={};O.searchCondList.forEach(a=>{a.search_type==="tree"||a.search_type==="cascader"?n[a.code]=a.defaultValue!==void 0?a.defaultValue:[]:n[a.code]=a.defaultValue!==void 0?a.defaultValue:""}),l.value=n},H=(n,a)=>{const d={...l.value};d[n]=a[0]||null,l.value=d},W=n=>{var a;return(a=n.options)!=null&&a.value?n.options.value:n.options||[]},$=(n,a)=>{l.value[a.code]=n,a.onChange&&a.onChange(n)},j=(n,a)=>{console.log("🚀🚀11🚀,",n,a),l.value[a.code]=n,a.onChange&&a.onChange(n)};return Q(()=>O.searchCondList,(n,a)=>{if(!a||n.length!==a.length){E();return}n.forEach((d,b)=>{const i=a[b];if(d.search_type==="cascader"&&JSON.stringify(d.options)!==JSON.stringify(i==null?void 0:i.options)){const y=l.value[d.code];y&&(l.value={...l.value,[d.code]:y})}if(d.search_type==="select"&&JSON.stringify(d.option_list)!==JSON.stringify(i==null?void 0:i.option_list)){const y=l.value[d.code];y&&(l.value={...l.value,[d.code]:y})}})},{deep:!0,immediate:!0}),w({searchCondObj:l,resetBt:z,handleTreeSelect:H}),(n,a)=>{const d=c("Input"),b=c("Option"),i=c("Select"),y=c("Cascader"),A=c("TreeSelect"),m=c("DatePicker"),X=c("FormItem"),F=c("Col"),Y=c("Icon"),D=c("Button"),q=c("Row"),G=c("Form");return s(),h("div",{ref_key:"searchcondform",ref:P},[p(G,{class:"searchDiv",model:l.value,"label-width":t.labelWidth,"label-colon":t.labelColon,"label-position":t.labelPosition},{default:r(()=>[p(q,null,{default:r(()=>[(s(!0),h(C,null,I(_.value?t.searchCondList:t.searchCondList.slice(0,3),e=>(s(),u(F,M({ref_for:!0},U,{key:e.code}),{default:r(()=>[p(X,{label:e.label},Z({default:r(()=>[e.search_type=="input"?(s(),u(d,{key:0,modelValue:l.value[e.code],"onUpdate:modelValue":o=>l.value[e.code]=o,style:{width:"100%"},placeholder:"请输入",clearable:""},null,8,["modelValue","onUpdate:modelValue"])):e.search_type=="select"?(s(),u(i,{key:1,modelValue:l.value[e.code],"onUpdate:modelValue":o=>l.value[e.code]=o,multiple:e.multiple,filterable:"",clearable:"",transfer:!0,placeholder:e.placeholder?e.placeholder:"请选择"+e.label,style:{width:"100%"}},{default:r(()=>[(s(!0),h(C,null,I(e.option_list,(o,g)=>(s(),u(b,{value:o.value,key:g},{default:r(()=>[S(f(o.label),1)]),_:2},1032,["value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","placeholder"])):e.search_type=="cascader"?(s(),u(y,{key:2,modelValue:l.value[e.code],"onUpdate:modelValue":o=>l.value[e.code]=o,data:W(e),loading:e.loading,style:{width:"100%"},placeholder:"请选择",clearable:"",onOnChange:o=>$(o,e)},null,8,["modelValue","onUpdate:modelValue","data","loading","onOnChange"])):e.search_type=="treeselect"?(s(),u(A,{key:3,transfer:!0,modelValue:l.value[e.code],"onUpdate:modelValue":o=>l.value[e.code]=o,data:e.options,style:{width:"100%"},placeholder:"请选择",clearable:"",onOnChange:o=>j(o,e)},null,8,["modelValue","onUpdate:modelValue","data","onOnChange"])):e.search_type=="date"?(s(),u(m,{key:4,modelValue:l.value[e.code],"onUpdate:modelValue":o=>l.value[e.code]=o,type:"date",format:"yyyy-MM-dd",placeholder:"请选择时间",clearable:"",transfer:!0,style:{width:"100%"},onOnChange:(o,g)=>N(o,g,e.code)},null,8,["modelValue","onUpdate:modelValue","onOnChange"])):e.search_type=="datetime"?(s(),u(m,{key:5,modelValue:l.value[e.code],"onUpdate:modelValue":o=>l.value[e.code]=o,type:"datetime",format:"yyyy-MM-dd HH:mm",placeholder:"请选择时间",clearable:"",style:{width:"100%"},transfer:!0,onOnChange:(o,g)=>N(o,g,e.code)},null,8,["modelValue","onUpdate:modelValue","onOnChange"])):e.search_type=="daterang"?(s(),u(m,{key:6,modelValue:l.value[e.code],"onUpdate:modelValue":o=>l.value[e.code]=o,style:{width:"100%"},type:"daterange",placement:"bottom-start",placeholder:"请选择日期范围",clearable:"",transfer:!0,onOnChange:o=>R(o,e)},null,8,["modelValue","onUpdate:modelValue","onOnChange"])):V("",!0)]),_:2},[e.zh_en?{name:"label",fn:r(()=>[p(re,{chinese:e.zh_en.chinese,english:e.zh_en.english,mode:e.zh_en.mode},null,8,["chinese","english","mode"])]),key:"0"}:void 0]),1032,["label"])]),_:2},1040))),128)),p(F,M(U,{class:"buttonCol"}),{default:r(()=>[ee(n.$slots,"operateBt",{},void 0,!0),!t.hiddenExpBt&&t.searchCondList.length>3?(s(),h("a",{key:0,href:"#",onClick:ae(L,["prevent"])},[p(Y,{class:"btExtend",type:_.value?"ios-arrow-up":"ios-arrow-down"},null,8,["type"]),v("span",null,f(_.value?"收起":"展开"),1)])):V("",!0),p(D,{class:"ivu-ml-8",type:"primary",onClick:J},{default:r(()=>a[0]||(a[0]=[S("查询")])),_:1}),p(D,{class:"ivu-ml-8",onClick:z},{default:r(()=>a[1]||(a[1]=[S("重置")])),_:1})]),_:3},16)]),_:3})]),_:3},8,["model","label-width","label-colon","label-position"])],512)}}},pe=T(ue,[["__scopeId","data-v-3f93dd59"]]);export{pe as i};
import{_ as f,v as o,a as i}from"./index-ba497f75.js";import{$ as b,O as v,o as s,c as g,h as C,a as n,w as _,a0 as t,e as l,f as d,a1 as c}from"./vendor-c142c249.js";const y={style:{width:"100%",height:"100%"}},x={class:"role-content"},V={__name:"index",setup(k){const u=c(()=>i(()=>import("./applyFor-e07c49a0.js"),["./applyFor-e07c49a0.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./zip-3379b2db.js","./index-a3853ee9.js","../css/index-6b6653b7.css","./postApiCommonUploadFile-05b67979.js","./getApiConsumaMeterialMaterialList-645a9c9f.js","./getApiEquipmentEquipmentSelect-cb3aa0c5.js","./index-ca4ab011.js","./CTable-054f4421.js","../css/applyFor-7a8e1b66.css"],import.meta.url)),p=c(()=>i(()=>import("./takeOver-4a222d76.js"),["./takeOver-4a222d76.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./index-a3853ee9.js","../css/index-6b6653b7.css","./postApiClassificationClassificationList-20bd57a5.js","../css/takeOver-099ec84f.css"],import.meta.url)),e=b({tabsChange:0});function m(a){console.log("🚀🚀🚀,",a),e.tabsChange=a}return v(()=>{}),(a,r)=>(s(),g("div",y,[C("div",x,[n(t(o.Tabs),{modelValue:e.tabsChange,"onUpdate:modelValue":r[0]||(r[0]=h=>e.tabsChange=h),style:{width:"100%"},type:"card",onOnClick:m},{default:_(()=>[n(t(o.TabPane),{label:"申请耗材",style:{width:"100%",height:"100%"}},{default:_(()=>[e.tabsChange==0?(s(),l(t(u),{key:0})):d("",!0)]),_:1}),n(t(o.TabPane),{label:"领用记录"},{default:_(()=>[e.tabsChange==1?(s(),l(t(p),{key:0})):d("",!0)]),_:1})]),_:1},8,["modelValue"])])]))}},T=f(V,[["__scopeId","data-v-9f63e4aa"]]);export{T as default};
此差异已折叠。
import{C as z}from"./CTable-054f4421.js";import{C as F,S as P}from"./SearchCondForm-de7d9317.js";import{s as g,_ as A,v as N}from"./index-ba497f75.js";import{p as B}from"./postApiClassificationClassificationList-20bd57a5.js";import{m as C}from"./index-ca4ab011.js";import{r as o,c as R,h as m,a as n,w as s,o as y,e as U,f as q,l as h,Y as j}from"./vendor-c142c249.js";function G(t,e){const l={parent_id:t.parent_id,name:t.name};return g.get("/api/Classification/ClassificationAdd",{params:l,...e})}function W(t,e){const l={id:t.id,name:t.name};return g.get("/api/Classification/ClassificationEdit",{params:l,...e})}function Y(t,e){const l={classification_id:t.classification_id,query:t.query,page_index:t.page_index,page_size:t.page_size};return g.get("/api/Classification/GetClassificationById",{params:l,...e})}const H={name:"list",components:{Divider:N.Divider,CTable:z,CEditModal:F,SearchCondForm:P},data(){return{init:{category:{flag:"add",show:!1,formData:{id:"",name:"",parent_id:"",parent_name:""},rules:{parent_id:[{required:!0,message:"请输入父级ID",trigger:"blur"}],name:[{required:!0,message:"请输入分类名称",trigger:"blur"}]}}},split:"250px",treePanelLoading:!1,materialsTree:[],currentTreeNode:{},placeTypeList:[],searchCondList:[{id:"parent_id",name:"父级id",type:"input",show:!1,optList:[]},{id:"name",name:"关键字",type:"input",show:!0,optList:[]}],params:{page_index:1,page_size:10,classification_id:""},tableColumns:[{type:"index",title:"序号",align:"center",width:80,show:!0,fixed:"left"},{key:"name",title:"名称",align:"center",minWidth:150,show:!0},{slot:"action",title:"操作",align:"center",width:180,show:!0,fixed:"right"}],tableLoading:!1,tableData:[],tableSize:"default",tableFullscreen:!1,dataCount:0,collapse:!1,editModalshow:!1,editModalLoading:!1,isEdit:!1,formItem:[{id:"parent_id",name:"父级",type:"input",show:!0,disabled:!0,require:!1,optList:[]},{id:"name",name:"名称",type:"input",disabled:!1,show:!0,require:!1,optList:[]}],defaultFormData:{parent_id:"",name:""}}},created(){},mounted(){this.getTreeData().then(t=>{console.log("🚀🚀🚀",t.response[0]),this.init.category.formData.parent_name=t.response[0].name,this.params.classification_id=t.response[0].id,this.materialsTree[0].selected=!0,this.getData()})},methods:{handleSubmitCategory(){const t={add:()=>{C(()=>G({name:this.init.category.formData.name,parent_id:this.params.classification_id}).then(e=>(this.getData(),this.getTreeData(),this.init.category.show=!1,e),"提交中...",!1))},edit:()=>{C(()=>W({name:this.init.category.formData.name,id:this.init.category.formData.id}).then(e=>(this.getData(),this.getTreeData(),this.init.category.show=!1,e),"提交中...",!1))}};this.$refs.categoryForm.validate(e=>{e&&t[this.init.category.flag]()})},async getTreeData(){return this.treePanelLoading=!0,B().then(t=>(this.materialsTree=this.treeFormat(t.response),this.treePanelLoading=!1,t))},treeNodeChange(t,e){console.log("树形节点改变",t),this.params.classification_id=t[0].value,this.init.category.formData.parent_name=t[0].title,this.init.category.formData.parent_id=t[0].parent_id,this.getData()},search(t){Object.keys(t).forEach(e=>{t[e]?this.params[e]=t[e]:this.params[e]=""}),this.onPageChange(1)},reset(){this.searchCondList.forEach(t=>{t.id=="parent_id"?this.params[t.id]="1":this.params[t.id]=""}),this.currentTreeNode.selected=!1,this.currentTreeNode={},this.onPageChange(1)},getData(){this.tableLoading=!0,Y(this.params).then(t=>{this.tableData=t.response.data,this.dataCount=t.response.data_count,this.tableLoading=!1}).finally(()=>{this.tableLoading=!1})},switchChange(t,e,l){this.tableData[l].is_enable=t,this.asc.getApiCommodityCommodityEnable({id:e.id,is_enable:t}).then(d=>{d.code==1?this.$Message.success(d.response):(this.tableData[l].is_enable=t==0?1:0,this.$Message.error(d.msg_detail))})},add(){this.init.category.formData.name="",this.init.category.flag="add",this.init.category.show=!0},handleEdit(t){this.init.category.flag="edit",this.init.category.show=!0,this.init.category.formData={...this.init.category.formData,...t}},modalSubmit(t){let e=Object.keys(this.currentTreeNode).length!=0;t.parent_id=e?this.currentTreeNode.id:"1",this.$Modal.confirm({title:"提示",content:"是否确定提交?",loading:!0,onOk:async()=>{let l=null;if(!this.isEdit){if(l=await this.asc.getApiCommodityGetCommodityIdAndCode({parent_id:t.parent_id}),l.code!=1){this.$Message.error(l.msg_detail),this.$Modal.remove();return}t.id=l.response}const d=this.isEdit?await this.asc.postApiCommodityCommoditySave(t):await this.asc.postApiCommodityCommodityIns(t);d.code==1?(this.$Message.success(d.response),this.editModalshow=!1,this.getData(),this.getTreeData()):this.$Message.error(d.msg_detail),this.$Modal.remove()}})},rowDelete(t){this.asc.getApiCommodityCommodityDel({id:t.id,is_del:1}).then(e=>{e.code==1?(this.$Message.success(e.msg),this.getData(),this.getTreeData()):this.$Message.error(e.msg_detail)})},onPageChange(t){this.params.page_index=t,this.getData()},onPageSizeChange(t){this.params.page_size=t,this.params.page_index==1&&this.onPageChange(1)},treeFormat(t){return t.map(e=>(e.children&&e.children.length!=0&&(e.children=this.treeFormat(e.children)),{...e,title:e.name,value:e.id,expand:!0,selected:!!(this.params.classification_id&&e.id==this.params.classification_id)}))}}},J={class:"demo-split"},K={class:"demo-split-pane-L"},Q={class:"demo-split-pane-R"},X=["onClick"],Z=["onClick"];function $(t,e,l,d,a,r){const b=o("Spin"),D=o("Tree"),w=o("SearchCondForm"),S=o("Icon"),p=o("Button"),L=o("Switch"),v=o("Divider"),k=o("Poptip"),M=o("CTable"),O=o("CEditModal"),u=o("Input"),f=o("FormItem"),_=o("Col"),V=o("Row"),T=o("Form"),x=o("Modal"),I=o("Card"),E=o("Split");return y(),R("div",null,[m("div",J,[n(E,{modelValue:a.split,"onUpdate:modelValue":e[8]||(e[8]=i=>a.split=i)},{left:s(()=>[m("div",K,[a.treePanelLoading?(y(),U(b,{key:0,size:"large",fix:""})):q("",!0),n(D,{modelValue:a.params.classification_id,"onUpdate:modelValue":e[0]||(e[0]=i=>a.params.classification_id=i),data:a.materialsTree,onOnSelectChange:r.treeNodeChange},null,8,["modelValue","data","onOnSelectChange"])])]),right:s(()=>[m("div",Q,[n(I,{ref:"card"},{default:s(()=>[n(w,{searchCondList:a.searchCondList,labelWidth:80,onOnSubmit:r.search,onOnReset:r.reset},null,8,["searchCondList","onOnSubmit","onOnReset"]),n(p,{type:"primary",class:"ivu-ml-8",disabled:a.params.classification_id=="",onClick:r.add},{default:s(()=>[n(S,{type:"md-add"}),e[9]||(e[9]=h(" 新增 "))]),_:1},8,["disabled","onClick"]),n(M,{tableBorder:!0,tableColumns:a.tableColumns.filter(i=>i.show),tableData:a.tableData,tableLoading:a.tableLoading,tableSize:a.tableSize,dataCount:a.dataCount,pageIndex:a.params.page_index,pageSize:a.params.page_size,onSwitchChange:r.switchChange,onRowEdit:t.rowEdit,onRowDelete:r.rowDelete,onOnPageChange:r.onPageChange,onOnPageSizeChange:r.onPageSizeChange},{generalSwitch:s(({row:i})=>[n(L,{modelValue:i.is_enable,"onUpdate:modelValue":c=>i.is_enable=c,size:"large","true-value":1,"false-value":0,onOnChange:c=>r.switchChange(c,i,t.index)},{default:s(()=>e[10]||(e[10]=[m("span",{type:"md-checkmark",slot:"open"},"启用",-1),m("span",{type:"md-close",slot:"close"},"停用",-1)])),_:2},1032,["modelValue","onUpdate:modelValue","onOnChange"])]),action:s(({row:i})=>[m("div",{onClick:e[1]||(e[1]=j(()=>{},["stop","prevent"]))},[m("a",{type:"text",style:{color:"#2D8cF0"},onClick:c=>r.handleEdit(i)},"编辑",8,X),n(v,{type:"vertical"}),n(k,{confirm:"",transfer:"",title:"是否确认删除?",onOnOk:c=>t.del(i)},{default:s(()=>[m("a",{type:"text",onClick:c=>t.handleDelete(i)},"删除",8,Z)]),_:2},1032,["onOnOk"])])]),_:1},8,["tableColumns","tableData","tableLoading","tableSize","dataCount","pageIndex","pageSize","onSwitchChange","onRowEdit","onRowDelete","onOnPageChange","onOnPageSizeChange"]),n(O,{ref:"ceditmodal",value:a.editModalshow,"onUpdate:value":e[2]||(e[2]=i=>a.editModalshow=i),formItem:a.formItem,loading:a.editModalLoading,formLabelWidth:100,width:800,onOnClose:e[3]||(e[3]=i=>a.editModalshow=!1),onOnSubmit:r.modalSubmit},null,8,["value","formItem","loading","onOnSubmit"]),n(x,{modelValue:a.init.category.show,"onUpdate:modelValue":e[7]||(e[7]=i=>a.init.category.show=i),title:"分类信息",width:"500","mask-closable":!1},{footer:s(()=>[n(p,{onClick:e[6]||(e[6]=i=>a.init.category.show=!1)},{default:s(()=>e[11]||(e[11]=[h("取消")])),_:1}),n(p,{type:"primary",onClick:r.handleSubmitCategory},{default:s(()=>e[12]||(e[12]=[h("确定")])),_:1},8,["onClick"])]),default:s(()=>[n(T,{ref:"categoryForm",model:a.init.category.formData,rules:a.init.category.rules,"label-width":100},{default:s(()=>[n(V,null,{default:s(()=>[n(_,{span:"24"},{default:s(()=>[n(f,{label:"父级名称",prop:"parent_id"},{default:s(()=>[n(u,{disabled:!0,modelValue:a.init.category.formData.parent_name,"onUpdate:modelValue":e[4]||(e[4]=i=>a.init.category.formData.parent_name=i),placeholder:"请输入父级名称",clearable:""},null,8,["modelValue"])]),_:1})]),_:1}),n(_,{span:"24"},{default:s(()=>[n(f,{label:"分类名称",prop:"name"},{default:s(()=>[n(u,{modelValue:a.init.category.formData.name,"onUpdate:modelValue":e[5]||(e[5]=i=>a.init.category.formData.name=i),placeholder:"请输入分类名称",clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"])]),_:1},512)])]),_:1},8,["modelValue"])])])}const se=A(H,[["render",$],["__scopeId","data-v-e6d54e3a"]]);export{se as default};
import{_ as y,a as s}from"./index-ba497f75.js";import{$ as v,O as x,r as _,c as V,a as t,w as a,o,e as d,a0 as r,f as l,a1 as i}from"./vendor-c142c249.js";const k={dis:"",style:{width:"100%",height:"100%"}},w={__name:"index",setup(E){const m=i(()=>s(()=>import("./outbound-f12b3292.js"),["./outbound-f12b3292.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./index-a3853ee9.js","../css/index-6b6653b7.css","./getApiCommonUserSelect-34bfd582.js","./getApiConsumaMeterialMaterialList-645a9c9f.js","./postApiConsumaMeterialMaterialBatchList-a39e54d0.js","./index-ca4ab011.js","./CTable-054f4421.js","../css/outbound-e32ade40.css"],import.meta.url)),p=i(()=>s(()=>import("./inventory-58996c8f.js"),["./inventory-58996c8f.js","./CTable-054f4421.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./SearchCondForm-de7d9317.js","../css/SearchCondForm-a9af9182.css","./getApiCommonUserSelect-34bfd582.js","./getApiConsumaMeterialMaterialList-645a9c9f.js","./postApiConsumaMeterialMaterialBatchList-a39e54d0.js","./index-ca4ab011.js","./index-a3853ee9.js","../css/index-6b6653b7.css","../css/inventory-63feacd6.css"],import.meta.url)),h=i(()=>s(()=>import("./collectionRecord-47782b3c.js"),["./collectionRecord-47782b3c.js","./index-ba497f75.js","./vendor-c142c249.js","../css/index-87ae257b.css","./index-a3853ee9.js","../css/index-6b6653b7.css","./postApiClassificationClassificationList-20bd57a5.js","../css/collectionRecord-62369dca.css"],import.meta.url)),e=v({tabsChange:0});function b(c){e.tabsChange=c}return x(()=>{}),(c,u)=>{const n=_("TabPane"),f=_("Tabs"),C=_("Card");return o(),V("div",k,[t(C,{class:"role-content"},{default:a(()=>[t(f,{modelValue:e.tabsChange,"onUpdate:modelValue":u[0]||(u[0]=g=>e.tabsChange=g),style:{width:"100%"},type:"card",onOnClick:b},{default:a(()=>[t(n,{label:"耗材库存",style:{width:"100%",height:"100%"}},{default:a(()=>[e.tabsChange==0?(o(),d(r(p),{key:0})):l("",!0)]),_:1}),t(n,{label:"所有申请记录",style:{height:"100%",width:"100%"}},{default:a(()=>[e.tabsChange==1?(o(),d(r(m),{key:0})):l("",!0)]),_:1}),t(n,{label:"所有领用记录",style:{height:"100%",width:"100%"}},{default:a(()=>[e.tabsChange==2?(o(),d(r(h),{key:0})):l("",!0)]),_:1})]),_:1},8,["modelValue"])]),_:1})])}}},P=y(w,[["__scopeId","data-v-4af6d3d3"]]);export{P as default};
此差异已折叠。
import{i as se}from"./index-a3853ee9.js";import{_ as re,v as n}from"./index-ba497f75.js";import{g as F}from"./getApiCommonUserSelect-34bfd582.js";import{g as le,a as ne,p as de,b as ie}from"./getApiPermissionPermissionDelete-20fceb50.js";import{p as ue,a as pe}from"./postApiPermissionPermissionUpdate-c9cba0e4.js";import{m as D}from"./index-ca4ab011.js";import{$ as L,R as w,O as me,r as m,c as h,a as l,w as s,a0 as i,F as R,o as u,h as p,l as f,e as y,k as x,t as v,a2 as z,a3 as P}from"./vendor-c142c249.js";const ce={class:"role-content"},fe={class:"role-toolbar"},ge={class:"user-avatar"},_e={class:"action-btns"},ye=["onClick"],he={class:"pagination"},Re={class:"add-user-search"},ve={class:"user-avatar"},be={class:"action-btns"},ke={class:"pagination",style:{"margin-top":"16px"}},Ce={__name:"index",setup(De){const e=L({grid:{xs:24,sm:12,md:12,lg:12},searchList:[],userRole:{flag:"add",loading:!1,total:0,data:[],columns:[{title:"#",type:"index",width:60,fixed:"left"},{title:"工号",key:"card",minWidth:120,render:(t,a)=>t("span",a.row.card||"-")},{title:"用户姓名",key:"name",minWidth:120,render:(t,a)=>t("span",a.row.name||"-")},{title:"权限",key:"role",minWidth:100,render:(t,a)=>t("span",{dept:"系部管理员",user:"普通用户",admin:"管理员"}[a.row.role]||a.row.role||"-")},{title:"所属部门",slot:"duty_dept",minWidth:180},{title:"操作",slot:"action",width:120,align:"center",fixed:"right"}],params:{query:"",role:"",page_index:1,page_size:10},show:!1,file_id_lists:[],equipment_id_lists:[],equipmentOptions:[],roles:[],duty_depts:[],formData:{recordId:"",tid:"",tids:[],role:"",duty_dept:[]},rules:{tid:[{required:!0,type:"string",message:"请选择用户",trigger:"change"}],duty_dept:[{required:!0,type:"array",message:"请选择部门",trigger:"change"}],role:[{required:!0,type:"string",message:"请选择权限",trigger:"change"}]}},downloadLoading:!1}),g=()=>{e.userRole.loading=!0,le(e.userRole.params).then(t=>{e.userRole.data=t.response.data,e.userRole.total=t.response.data_count,e.userRole.loading=!1}).finally(()=>{e.userRole.loading=!1})},I=t=>{e.userRole.params={...e.userRole.params,...t,page_index:1},g()},q=()=>{e.userRole.params={query:"",status:"",audit_status:"0",page_index:1,page_size:10},g()},M=t=>{e.userRole.params.page_index=t,g()},B=t=>{e.userRole.params.page_size=t,e.userRole.params.page_index=1,g()},T=()=>{e.userRole.flag="add",e.userRole.show=!0,e.userRole.formData={...e.userRole.formData,tid:"",role:"",duty_dept:[]},b.value.resetFields()},b=w(),W=()=>{console.log("🚀🚀🚀,",e.userRole.formData),b.value.validate(t=>{t&&{add:()=>{D(()=>ue({tid:e.userRole.formData.tid,role:e.userRole.formData.role,duty_dept:e.userRole.formData.duty_dept.join(";")}).then(d=>{if(d.code===1)return g(),e.userRole.show=!1,d}),!1,"正在提交中...")},edit:()=>{D(()=>pe({id:e.userRole.formData.recordId,role:e.userRole.formData.role,duty_dept:e.userRole.formData.duty_dept.join(";")}).then(d=>{if(d.code===1)return g(),e.userRole.show=!1,d}),!1,"正在提交中...")}}[e.userRole.flag]()})};function $(t){D(()=>ie({id:t.id}).then(a=>{if(a.code===1)return g(),a}),!1,"正在删除中...")}async function j(t){e.userRole.formData={...e.userRole.formData,recordId:t.id,tid:t.tid,role:t.role,duty_dept:t.duty_dept.map(a=>a.dept_id),tids:[{...t,card_number:t.card}]},console.log("🚀🚀🚀,",t),e.userRole.flag="edit",e.userRole.show=!0}const r=L({flag:"",pageKey:"",params:{page_index:1,page_size:100,query:""},total:0,show:!1,loading:!1,keyword:"",batchUserList:[],userList:[],dutyDepts:[],availableUserColumns:[{align:"center",type:"selection",width:60},{title:"照片",slot:"avatar",width:80},{title:"工号",key:"card_number",width:120},{title:"姓名",key:"name",minWidth:120},{title:"部门",key:"dept_name",minWidth:150},{title:"性别",key:"gender",width:80}]});w([]);const E=async()=>{k()};function G(){({选择用户:()=>{const a=e.userRole.formData.tids.map(c=>c.tid);let d=[];r.batchUserList.forEach((c,O)=>{a.includes(c.tid)||d.push(c)}),e.userRole.formData.tids=e.userRole.formData.tids.concat(d),r.show=!1}})[r.flag]()}function N(t){console.log("e",t),r.batchUserList=t}const Q=async t=>{},k=()=>{r.loading=!0;try{F({...r.params,query:r.keyword}).then(t=>{r.userList=t.response.data||[],r.total=t.response.data_count}).catch(t=>{console.error("获取角色用户列表失败:",t),n.Message.error("获取角色用户列表失败")}).finally(()=>{r.loading=!1})}catch(t){console.error("获取角色用户列表失败:",t),n.Message.error("获取角色用户列表失败"),r.loading=!1}},K=t=>{r.params.page_index=t,k()},H=t=>{r.params.page_size=t,r.params.page_index=1,k()};function J(){ne().then(t=>{e.searchList=t.response})}function X(){de().then(t=>{e.userRole.duty_depts=t.response})}function U(){return r.loading=!0,F(r.params).then(t=>(e.userRole.formData.tids=t.response.data,r.loading=!1,t))}const V=w({});function Y(t){console.log("🚀🚀🚀,",t),r.params.query=t,clearTimeout(V.value),V.value=setTimeout(()=>U(),100)}return me(()=>{U(),X(),J(),g()}),(t,a)=>{const d=m("Button"),c=m("Avatar"),O=m("Divider"),Z=m("Poptip"),A=m("Table"),ee=m("Card"),C=m("Col"),S=m("Row"),te=m("Form"),ae=m("Input");return u(),h(R,null,[l(ee,{"dis-hover":"",style:{width:"100%",height:"100%"}},{default:s(()=>[p("div",ce,[p("div",fe,[l(i(se),{ref:"searchFormRef",searchCondList:e.searchList,onOnSubmit:I,onOnReset:q},null,8,["searchCondList"]),p("div",null,[l(d,{type:"primary",icon:"md-add",onClick:T},{default:s(()=>a[8]||(a[8]=[f("分配权限")])),_:1})])]),l(A,{loading:e.userRole.loading,columns:e.userRole.columns,data:e.userRole.data,border:""},{avatar:s(({row:o})=>[p("div",ge,[o.photo?(u(),y(c,{key:0,size:"large",src:o.photo},null,8,["src"])):(u(),y(c,{key:1,icon:"ios-person",size:"large"}))])]),duty_dept:s(({row:o})=>[(u(!0),h(R,null,x(o.duty_dept,(_,oe)=>(u(),y(i(n.Tag),{key:oe,color:"blue",style:{margin:"2px"}},{default:s(()=>[f(v(_.dept_name),1)]),_:2},1024))),128))]),action:s(({row:o})=>[p("div",_e,[p("a",{href:"javascript:;",onClick:_=>j(o)},"编辑",8,ye),l(O,{type:"vertical"}),l(Z,{confirm:"",transfer:"",title:"确定要删除该设备吗?",onOnOk:_=>$(o)},{default:s(()=>a[9]||(a[9]=[p("a",{href:"javascript:;"},"删除",-1)])),_:2},1032,["onOnOk"])])]),_:1},8,["loading","columns","data"]),p("div",he,[l(i(n.Page),{transfer:!0,total:e.userRole.total,current:e.userRole.params.page_index,"page-size":e.userRole.params.page_size,"show-elevator":"","show-sizer":"","show-total":"",onOnChange:M,onOnPageSizeChange:B},null,8,["total","current","page-size"])])])]),_:1}),l(i(n.Modal),{modelValue:e.userRole.show,"onUpdate:modelValue":a[4]||(a[4]=o=>e.userRole.show=o),title:"分配权限",width:"700","mask-closable":!1},{footer:s(()=>[l(d,{onClick:a[3]||(a[3]=o=>e.userRole.show=!1)},{default:s(()=>a[10]||(a[10]=[f("取消")])),_:1}),l(d,{type:"primary",onClick:W},{default:s(()=>a[11]||(a[11]=[f("确定")])),_:1})]),default:s(()=>[l(te,{ref_key:"deviceForm",ref:b,model:e.userRole.formData,rules:e.userRole.rules,"label-width":100},{default:s(()=>[l(S,null,{default:s(()=>[l(C,z(P(e.grid)),{default:s(()=>[l(i(n.FormItem),{label:"用户",prop:"tid"},{default:s(()=>[l(i(n.Select),{disabled:e.userRole.flag=="edit",filterable:"",clearable:"",loading:r.loading,modelValue:e.userRole.formData.tid,"onUpdate:modelValue":a[0]||(a[0]=o=>e.userRole.formData.tid=o),placeholder:"请选择用户","remote-method":Y},{default:s(()=>[(u(!0),h(R,null,x(e.userRole.formData.tids,(o,_)=>(u(),y(i(n.Option),{key:_,value:o.tid},{default:s(()=>[f(v(o.name)+"("+v(o.card_number)+")",1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","loading","modelValue"])]),_:1})]),_:1},16),l(C,z(P(e.grid)),{default:s(()=>[l(i(n.FormItem),{label:"权限",prop:"role"},{default:s(()=>[l(i(n.Select),{clearable:"",modelValue:e.userRole.formData.role,"onUpdate:modelValue":a[1]||(a[1]=o=>e.userRole.formData.role=o),placeholder:"请输入申请原因"},{default:s(()=>[l(i(n.Option),{value:"admin",label:"管理员"}),l(i(n.Option),{value:"dept",label:"部门管理员"})]),_:1},8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),l(S,z(P(e.grid)),{default:s(()=>[l(C,null,{default:s(()=>[l(i(n.FormItem),{label:"部门信息",prop:"duty_dept"},{default:s(()=>[l(i(n.CheckboxGroup),{modelValue:e.userRole.formData.duty_dept,"onUpdate:modelValue":a[2]||(a[2]=o=>e.userRole.formData.duty_dept=o)},{default:s(()=>[(u(!0),h(R,null,x(e.userRole.duty_depts,(o,_)=>(u(),y(i(n.Checkbox),{style:{margin:"5px"},border:"",label:o.dept_id,key:_},{default:s(()=>[f(v(o.dept_name),1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},16)]),_:1},8,["model","rules"])]),_:1},8,["modelValue"]),l(i(n.Modal),{modelValue:r.show,"onUpdate:modelValue":a[7]||(a[7]=o=>r.show=o),title:"选择用户",width:"700","mask-closable":!1},{footer:s(()=>[l(d,{onClick:a[6]||(a[6]=o=>r.show=!1)},{default:s(()=>a[14]||(a[14]=[f("关闭")])),_:1})]),default:s(()=>[p("div",Re,[l(ae,{modelValue:r.keyword,"onUpdate:modelValue":a[5]||(a[5]=o=>r.keyword=o),placeholder:"输入用户名称搜索",search:"",clearable:"","enter-button":"",onOnSearch:E},null,8,["modelValue"]),l(d,{style:{"margin-left":"10px"},type:"primary",onClick:G},{default:s(()=>a[12]||(a[12]=[f("批量添加 ")])),_:1})]),l(A,{onOnSelectionChange:N,loading:r.loading,columns:r.availableUserColumns,data:r.userList,border:""},{avatar:s(({row:o})=>[p("div",ve,[o.photo?(u(),y(c,{key:0,size:"large",src:o.photo},null,8,["src"])):(u(),y(c,{key:1,icon:"ios-person",size:"large"}))])]),action:s(({row:o})=>[p("div",be,[l(d,{type:"primary",size:"small",onClick:_=>Q(o)},{default:s(()=>a[13]||(a[13]=[f("添加 ")])),_:2},1032,["onClick"])])]),_:1},8,["loading","columns","data"]),p("div",ke,[(u(),y(i(n.Page),{key:r.pageKey,total:r.total,current:r.params.page_index,"page-size":r.params.page_size,"show-elevator":"","show-sizer":"","show-total":"",onOnChange:K,onOnPageSizeChange:H},null,8,["total","current","page-size"]))])]),_:1},8,["modelValue"])],64)}}},Ae=re(Ce,[["__scopeId","data-v-e636bf32"]]);export{Ae as default};
import{v as e}from"./index-ba497f75.js";async function u(t,r=!1,a="正在提交中..."){e.Message.loading({duration:0,content:a});let s=await t();if(r)return e.Message.destroy();try{switch(s.code){case 1:e.Message.destroy(),e.Message.success({background:!0,content:s.msg,duration:2});break;default:e.Message.destroy(),e.Message.error({background:!0,content:s.msg_detail,duration:2})}return s}catch{e.Message.destroy(),e.Message.error({background:!0,content:s.msg_detail,duration:2})}}export{u as m};
import{_ as t}from"./index-ba497f75.js";import{r as n,c,a as r,o as a}from"./vendor-c142c249.js";const p={name:"page-error-404"};function s(e,i,l,m,d,_){const o=n("Exception");return a(),c("div",null,[r(o,{type:"404","img-color":"",desc:e.$t("page.exception.e404"),"back-text":e.$t("page.exception.btn")},null,8,["desc","back-text"])])}const u=t(p,[["render",s]]);export{u as default};
import{_ as p,a as h}from"./index-ba497f75.js";import{$ as o,R as t,L as u,O as m,r as n,o as y,c as f,h as w,a,w as s,a0 as v,a1 as g}from"./vendor-c142c249.js";const k={style:{width:"100%",height:"100%"}},x={class:"role-content"},b={__name:"index",setup(C){const i=g(()=>h(()=>import("./applyFor-0bb15d0b.js"),["./applyFor-0bb15d0b.js","./通用文件-4cba10c0.js","./index-a3853ee9.js","./vendor-c142c249.js","./index-ba497f75.js","../css/index-87ae257b.css","../css/index-6b6653b7.css","./postApiCommonUploadFile-05b67979.js","./getApiEquipmentEquipmentSelect-cb3aa0c5.js","./postApiEquipmentApplicationEquipmentApply-ad93fe8a.js","./index-ca4ab011.js","../css/applyFor-6537496d.css"],import.meta.url)),l=o({tabsChange:0});t([{role_type:0,role_name:"设备审核",count:14},{role_type:1,role_name:"耗材审核",count:4}]);function c(e){console.log("🚀🚀🚀,",e),l.tabsChange=e}t([]);const _=t({});return u(()=>{const e=[{title:"#",type:"index",width:60},{title:"照片",slot:"avatar",width:80},{title:"工号",key:"user_id",width:120},{title:"姓名",key:"name",minWidth:120}];return _.value.role_type===2&&e.push({title:"负责部门",slot:"duty_depts",minWidth:200}),e.push({title:"操作",slot:"action",width:80,align:"center"}),e}),t([{title:"照片",slot:"avatar",width:80},{title:"工号",key:"user_id",width:120},{title:"姓名",key:"name",minWidth:120},{title:"部门",key:"dept_name",minWidth:150},{title:"操作",slot:"action",width:80,align:"center"}]),t(0),t(1),t(20),t(""),t(!1),o({show:!1,loading:!1,keyword:"",userList:[],dutyDepts:[]}),t([]),m(()=>{}),(e,T)=>{const d=n("TabPane"),r=n("Tabs");return y(),f("div",k,[w("div",x,[a(r,{style:{width:"100%"},type:"card",onOnClick:c},{default:s(()=>[a(d,{label:"申请耗材",style:{width:"100%",height:"100%"}},{default:s(()=>[a(v(i))]),_:1})]),_:1})])])}}},A=p(b,[["__scopeId","data-v-cfacac29"]]);export{A as default};
import{_ as i,v as o,a as r}from"./index-ba497f75.js";import{$ as l,R as d,O as p,o as u,c as f,h,a as t,w as s,a0 as a,a1 as m}from"./vendor-c142c249.js";const v={style:{width:"100%",height:"100%"}},y={class:"role-content"},x={__name:"index",setup(g){const n=m(()=>r(()=>import("./applyFor-342d5b74.js"),["./applyFor-342d5b74.js","./通用文件-4cba10c0.js","./index-a3853ee9.js","./vendor-c142c249.js","./index-ba497f75.js","../css/index-87ae257b.css","../css/index-6b6653b7.css","./postApiCommonUploadFile-05b67979.js","./getApiEquipmentEquipmentSelect-cb3aa0c5.js","./postApiEquipmentApplicationEquipmentApply-ad93fe8a.js","./index-ca4ab011.js","../css/applyFor-1471a2aa.css"],import.meta.url)),_=l({tabsChange:0});d([{role_type:0,role_name:"设备审核",count:14},{role_type:1,role_name:"耗材审核",count:4}]);function c(e){console.log("🚀🚀🚀,",e),_.tabsChange=e}return p(()=>{}),(e,b)=>(u(),f("div",v,[h("div",y,[t(a(o.Tabs),{style:{width:"100%"},type:"card",onOnClick:c},{default:s(()=>[t(a(o.TabPane),{label:"申请设备",style:{width:"100%",height:"100%"}},{default:s(()=>[t(a(n))]),_:1})]),_:1})])]))}},E=i(x,[["__scopeId","data-v-caff23a7"]]);export{E as default};
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
import{s}from"./index-ba497f75.js";function a(i){return s.post("/api/Classification/ClassificationList",i)}export{a as p};
import{s as i}from"./index-ba497f75.js";function m(o,p){return i.post("/api/Common/UploadFile",o,p)}export{m as p};
import{s as a}from"./index-ba497f75.js";function r(t){return a.get("/api/ConsumaMeterial/MaterialBatchListInit",t)}function s(t,i){return a.post("/api/ConsumaMeterial/MaterialBatchList",t,i)}export{r as g,s as p};
import{s as t}from"./index-ba497f75.js";function e(p,i){return t.post("/api/EquipmentApplication/EquipmentApply",p,i)}export{e as p};
import{s as o}from"./index-ba497f75.js";function e(s,i){return o.post("/api/Permission/PermissionAdd",s,i)}function n(s,i){return o.post("/api/Permission/PermissionUpdate",s,i)}export{n as a,e as p};
此差异已折叠。
此差异已折叠。
此差异已折叠。
import{v as s,_ as u}from"./index-ba497f75.js";import{I as d,$ as m,o as p,c as f,a as l,w as n,l as r,a0 as a,F as i}from"./vendor-c142c249.js";const _=d({__name:"test",setup(w){const t=m({show1:!1,show2:!1});return(v,e)=>(p(),f(i,null,[l(a(s.Button),{onClick:e[0]||(e[0]=o=>t.show1=!0)},{default:n(()=>e[4]||(e[4]=[r("123123")])),_:1}),l(a(s.Modal),{modelValue:t.show1,"onUpdate:modelValue":e[3]||(e[3]=o=>t.show1=o)},{default:n(()=>[l(a(s.Button),{onClick:e[1]||(e[1]=o=>t.show2=!0)},{default:n(()=>e[5]||(e[5]=[r("123123")])),_:1}),l(a(s.Drawer),{transfer:!1,modelValue:t.show2,"onUpdate:modelValue":e[2]||(e[2]=o=>t.show2=o)},null,8,["modelValue"])]),_:1},8,["modelValue"])],64))}});const k=u(_,[["__scopeId","data-v-4863908d"]]);export{k as default};
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
tableSize: {type: String, default: 'default'}, tableSize: {type: String, default: 'default'},
dataCount: {type: Number, require: true}, dataCount: {type: Number, require: true},
pageIndex: {type: Number, require: true}, pageIndex: {type: Number, require: true},
tableHeight: { default: false, require: false}, tableHeight: { type: [Number, String], default: '', required: false },
pageSize: {type: Number, require: true}, pageSize: {type: Number, require: true},
pageSizeOpts: {type: Array, default: () => [10, 20, 50, 100]}, pageSizeOpts: {type: Array, default: () => [10, 20, 50, 100]},
}, },
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import {deviceProjectStore} from '@/store/deviceProjectStoree'
export default { export default {
name: 'iHeaderUser', name: 'iHeaderUser',
computed: { computed: {
...@@ -38,22 +38,19 @@ export default { ...@@ -38,22 +38,19 @@ export default {
}, },
methods: { methods: {
handleRoleChange(item) { handleRoleChange(item) {
console.log("🚀🚀🚀", item)
//修改当前角色,然后再保存回info
deviceProjectStore.dispatch('setUserInfo',{...deviceProjectStore.state.userInfo,currentRole:item})
this.info.currentRole = item
//修改当前角色,然后再保存回info this.$store.dispatch("admin/user/set", this.info, {root: true});
this.info.currentRole = item // window.location.reload() // 切换角色时刷新页面
this.$store.dispatch("admin/user/set", this.info, { root: true }); this.$router.push({path: '/homePage'})
// window.location.reload() // 切换角色时刷新页面
this.$router.push({ path: '/homePage' })
// //如果item.role_id为1或2,则跳转到批次管理页面
// if (item.role_id === 0 || item.role_id === 1) {
// this.$router.push({ path: '/homePage' })
// } else {
// this.$router.push({ path: '/myTask' })
// }
//通知父元素 //通知父元素
this.$emit('changeRole') this.$emit('changeRole')
}, },
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
width: 100%; width: 100%;
" "
> >
V1.0.2.250415-250529 V1.0.3.250415-250620
</span> </span>
</div> </div>
</Menu> </Menu>
......
...@@ -31,12 +31,7 @@ export default [ ...@@ -31,12 +31,7 @@ export default [
// auth: [0,1], // auth: [0,1],
// icon: 'md-search', // icon: 'md-search',
// }, // },
{
path: '/alertManagement',
title: '预警管理',
auth: [0],
icon: 'md-alert',
},
{ {
path: '/equipmentManagement', path: '/equipmentManagement',
title: '设备管理', title: '设备管理',
...@@ -49,6 +44,12 @@ export default [ ...@@ -49,6 +44,12 @@ export default [
auth: [0], auth: [0],
icon: 'md-cube', icon: 'md-cube',
}, },
{
path: '/alertManagement',
title: '预警管理',
auth: [0,2],
icon: 'md-alert',
},
{ {
path: '/categoryManagement', path: '/categoryManagement',
title: '分类管理', title: '分类管理',
...@@ -63,18 +64,19 @@ export default [ ...@@ -63,18 +64,19 @@ export default [
auth: [0], auth: [0],
icon: 'md-settings', icon: 'md-settings',
children: [ children: [
{ // {
path: '/messagePushTemplate', // path: '/messagePushTemplate',
title: '消息推送模版', // title: '消息推送模版',
auth: [0], // auth: [0],
icon: 'md-mail', // icon: 'md-mail',
}, // },
{ {
path: '/userPermission', path: '/userPermission',
title: '用户权限', title: '用户权限',
auth: [0], auth: [0],
icon: 'md-lock', icon: 'md-lock',
}, },
{ {
path: '/operationLog', path: '/operationLog',
title: '操作日志', title: '操作日志',
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@on-reset="handleReset" @on-reset="handleReset"
/> />
<div> <div>
<Button type="primary" icon="md-add" @click="showWarningTemplate">修改预警模版</Button> <Button v-show="isAdmin" type="primary" icon="md-add" @click="showWarningTemplate">修改预警模版</Button>
</div> </div>
</div> </div>
...@@ -264,6 +264,7 @@ import { ...@@ -264,6 +264,7 @@ import {
import * as api from "@/api/allApi/controller/index"; import * as api from "@/api/allApi/controller/index";
import * as hooks from "@/hook/index"; import * as hooks from "@/hook/index";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {deviceProjectStore} from '@/store/deviceProjectStoree'
const init = reactive({ const init = reactive({
warningTemplate: { warningTemplate: {
...@@ -797,6 +798,12 @@ async function showWarningTemplate() { ...@@ -797,6 +798,12 @@ async function showWarningTemplate() {
* 预警模版 * 预警模版
*/ */
//是否超管
const isAdmin = computed( () => {
return deviceProjectStore.state.userInfo.currentRole.role_id == 0
})
onMounted(() => { onMounted(() => {
getData() getData()
}) })
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
:pageIndex="params.page_index" :pageIndex="params.page_index"
:pageSize="params.page_size" :pageSize="params.page_size"
@switchChange="switchChange" @switchChange="switchChange"
@rowEdit="rowEdit"
@rowDelete="rowDelete" @rowDelete="rowDelete"
@onPageChange="onPageChange" @onPageChange="onPageChange"
@onPageSizeChange="onPageSizeChange"> @onPageSizeChange="onPageSizeChange">
......
...@@ -210,7 +210,7 @@ ...@@ -210,7 +210,7 @@
closable closable
@on-close="init.oneClickOutbound.formData.duty_person.splice(index, 1)" @on-close="init.oneClickOutbound.formData.duty_person.splice(index, 1)"
> >
{{ person.name }} {{ person.name + '(' + person.card_number + ')' }}
</Tag> </Tag>
</div> </div>
<div style="gap: 8px"> <div style="gap: 8px">
...@@ -432,6 +432,7 @@ import * as api from "@/api/allApi/controller/index"; ...@@ -432,6 +432,7 @@ import * as api from "@/api/allApi/controller/index";
import * as hooks from "@/hook/index"; import * as hooks from "@/hook/index";
import dayjs from "dayjs"; import dayjs from "dayjs";
import CTable from "@/components/CTable.vue"; import CTable from "@/components/CTable.vue";
import {deviceProjectStore} from "@/store/deviceProjectStoree";
const DrawerDetails = defineAsyncComponent(() => import('@/components/drawerDetails')) const DrawerDetails = defineAsyncComponent(() => import('@/components/drawerDetails'))
...@@ -1587,7 +1588,12 @@ const showOneClickOutbound = (row) => { ...@@ -1587,7 +1588,12 @@ const showOneClickOutbound = (row) => {
} }
] ]
init.oneClickOutbound.formData.duty_person = [] init.oneClickOutbound.formData.duty_person = [
{
card_number: deviceProjectStore.state.userInfo.card,
name: deviceProjectStore.state.userInfo.name,
tid: deviceProjectStore.state.userInfo.tid,
}]
init.oneClickOutbound.formData.remark = "" init.oneClickOutbound.formData.remark = ""
init.oneClickOutbound.formData.storage_status_shift_date = "" init.oneClickOutbound.formData.storage_status_shift_date = ""
......
...@@ -276,6 +276,7 @@ import {DatePicker, Divider, FormItem, Message, Modal, Page, Tag} from 'view-ui- ...@@ -276,6 +276,7 @@ import {DatePicker, Divider, FormItem, Message, Modal, Page, Tag} from 'view-ui-
import * as api from "@/api/allApi/controller/index"; import * as api from "@/api/allApi/controller/index";
import * as hooks from "@/hook/index"; import * as hooks from "@/hook/index";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {deviceProjectStore} from "@/store/deviceProjectStoree";
const DrawerDetails = defineAsyncComponent(()=>import('@/components/drawerDetails')) const DrawerDetails = defineAsyncComponent(()=>import('@/components/drawerDetails'))
...@@ -768,13 +769,22 @@ const showOneClickOutbound = (row) => { ...@@ -768,13 +769,22 @@ const showOneClickOutbound = (row) => {
card_number:row.lender_card, card_number:row.lender_card,
} }
] ]
//责任人
init.oneClickOutbound.out_duty_tids=[
{
card_number:deviceProjectStore.state.userInfo.card,
name:deviceProjectStore.state.userInfo.name,
tid:deviceProjectStore.state.userInfo.tid,
}
]
init.oneClickOutbound.formData.duty_tid = deviceProjectStore.state.userInfo.tid
console.log("🚀显示出库表单🚀🚀,", row) console.log("🚀显示出库表单🚀🚀,", row)
init.oneClickOutbound.show = true init.oneClickOutbound.show = true
oneClickOutboundForm.value.resetFields() oneClickOutboundForm.value.resetFields()
}; };
//出库责任人查询 //出库责任人查询
function searchOutDutyUser(e = '') { function searchOutDutyUser(e = '') {
api.getApiCommonUserSelect({ api.getApiCommonUserSelect({
......
...@@ -286,6 +286,7 @@ import {DatePicker, Divider, FormItem, Message, Modal, Page, Tag} from 'view-ui- ...@@ -286,6 +286,7 @@ import {DatePicker, Divider, FormItem, Message, Modal, Page, Tag} from 'view-ui-
import * as api from "@/api/allApi/controller/index"; import * as api from "@/api/allApi/controller/index";
import * as hooks from "@/hook/index"; import * as hooks from "@/hook/index";
import dayjs from "dayjs"; import dayjs from "dayjs";
import {deviceProjectStore} from "@/store/deviceProjectStoree";
const DrawerDetails = defineAsyncComponent(()=>import('@/components/drawerDetails')) const DrawerDetails = defineAsyncComponent(()=>import('@/components/drawerDetails'))
...@@ -764,6 +765,7 @@ const showOneClickOutbound = (row) => { ...@@ -764,6 +765,7 @@ const showOneClickOutbound = (row) => {
} }
init.oneClickOutbound.formData.equipment_lists = row.equipments init.oneClickOutbound.formData.equipment_lists = row.equipments
//借用人
init.oneClickOutbound.lender_tid_lists =[ init.oneClickOutbound.lender_tid_lists =[
{ {
tid:row.createby, tid:row.createby,
...@@ -772,6 +774,17 @@ const showOneClickOutbound = (row) => { ...@@ -772,6 +774,17 @@ const showOneClickOutbound = (row) => {
} }
] ]
//责任人
init.oneClickOutbound.out_duty_tids =[
{
card_number:deviceProjectStore.state.userInfo.card,
name:deviceProjectStore.state.userInfo.name,
tid:deviceProjectStore.state.userInfo.tid,
}
]
init.oneClickOutbound.formData.out_duty_tid = deviceProjectStore.state.userInfo.tid
console.log("🚀显示出库表单🚀🚀,", row) console.log("🚀显示出库表单🚀🚀,", row)
init.oneClickOutbound.show = true init.oneClickOutbound.show = true
oneClickOutboundForm.value.resetFields() oneClickOutboundForm.value.resetFields()
......
...@@ -119,7 +119,7 @@ const frameIn = [ ...@@ -119,7 +119,7 @@ const frameIn = [
meta: { meta: {
...meta, ...meta,
title: '预警管理', title: '预警管理',
auth: [0], auth: [0,2],
}, },
component: () => import('@/pages/alertManagement/index.vue'), component: () => import('@/pages/alertManagement/index.vue'),
}, },
...@@ -187,7 +187,6 @@ const frameOut = [ ...@@ -187,7 +187,6 @@ const frameOut = [
}, },
component: () => import('@/pages/sso') component: () => import('@/pages/sso')
}, },
]; ];
/** /**
......
Markdown 格式
0% or
您添加了 0 人 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册 或