|
@@ -1,44 +1,19 @@
|
|
<template>
|
|
<template>
|
|
<div class="main animate__animated animate__backInRight" v-loading="loading">
|
|
<div class="main animate__animated animate__backInRight" v-loading="loading">
|
|
- <custom-search-bar
|
|
|
|
- :fields="fields.filter((f) => f.isSearch)"
|
|
|
|
- v-model="searchForm"
|
|
|
|
- @search="search"
|
|
|
|
- @reset="toReset"
|
|
|
|
- ></custom-search-bar>
|
|
|
|
|
|
+ <custom-search-bar :fields="fields.filter((f) => f.isSearch)" v-model="searchForm" @search="search" @reset="toReset"></custom-search-bar>
|
|
<custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
|
|
<custom-button-bar :fields="buttonFields" @add="toAdd"></custom-button-bar>
|
|
- <custom-table
|
|
|
|
- :data="data"
|
|
|
|
- :fields="fields"
|
|
|
|
- @query="search"
|
|
|
|
- :total="total"
|
|
|
|
- :opera="opera"
|
|
|
|
- @dict="toDict"
|
|
|
|
- @edit="toEdit"
|
|
|
|
- @delete="toDelete"
|
|
|
|
- >
|
|
|
|
|
|
+ <custom-table :data="data" :fields="fields" @query="search" :total="total" :opera="opera" @dict="toDict" @edit="toEdit" @delete="toDelete">
|
|
<template #is_use="{ row }">
|
|
<template #is_use="{ row }">
|
|
<el-tag v-if="row.is_use == '0'" type="success" @click="toUse(row, '1')">启用</el-tag>
|
|
<el-tag v-if="row.is_use == '0'" type="success" @click="toUse(row, '1')">启用</el-tag>
|
|
<el-tag v-else type="info" @click="toUse(row, '0')">禁用</el-tag>
|
|
<el-tag v-else type="info" @click="toUse(row, '0')">禁用</el-tag>
|
|
</template>
|
|
</template>
|
|
</custom-table>
|
|
</custom-table>
|
|
- <el-dialog
|
|
|
|
- v-model="dialog.show"
|
|
|
|
- :title="dialog.title"
|
|
|
|
- :destroy-on-close="false"
|
|
|
|
- @close="toClose"
|
|
|
|
- :top="dialog.top"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-dialog v-model="dialog.show" :title="dialog.title" :destroy-on-close="false" @close="toClose" :top="dialog.top">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="24" v-if="dialog.type == '1'">
|
|
<el-col :span="24" v-if="dialog.type == '1'">
|
|
<custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave">
|
|
<custom-form v-model="form" :fields="formFields" :rules="rules" @save="toSave">
|
|
<template #type>
|
|
<template #type>
|
|
- <el-option
|
|
|
|
- v-for="i in typeList"
|
|
|
|
- :key="i._id"
|
|
|
|
- :label="i.label"
|
|
|
|
- :value="i.value"
|
|
|
|
- ></el-option>
|
|
|
|
|
|
+ <el-option v-for="i in typeList" :key="i._id" :label="i.label" :value="i.value"></el-option>
|
|
</template>
|
|
</template>
|
|
<template #children>
|
|
<template #children>
|
|
<el-col :span="24" class="button">
|
|
<el-col :span="24" class="button">
|
|
@@ -63,9 +38,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</template>
|
|
</template>
|
|
<template #is_use>
|
|
<template #is_use>
|
|
- <el-radio v-for="i in isUseList" :key="i._id" :label="i.value">{{
|
|
|
|
- i.label
|
|
|
|
- }}</el-radio>
|
|
|
|
|
|
+ <el-radio v-for="i in isUseList" :key="i._id" :label="i.value">{{ i.label }}</el-radio>
|
|
</template>
|
|
</template>
|
|
</custom-form>
|
|
</custom-form>
|
|
</el-col>
|
|
</el-col>
|