页面完善
This commit is contained in:
parent
4504d354ad
commit
9beb2d3fca
@ -27,3 +27,11 @@ export function adminDelete(params: any) {
|
|||||||
export function adminDetail(params: any) {
|
export function adminDetail(params: any) {
|
||||||
return request.get({ url: '/auth.admin/detail', params })
|
return request.get({ url: '/auth.admin/detail', params })
|
||||||
}
|
}
|
||||||
|
// 生成合同
|
||||||
|
export function generateGontract(params: any) {
|
||||||
|
return request.get({ url: '/company/Draftingcontracts', params })
|
||||||
|
}
|
||||||
|
// 发送短信
|
||||||
|
export function sendMsgApi(params: any) {
|
||||||
|
return request.get({ url: '/company/postsms', params })
|
||||||
|
}
|
@ -1,27 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog v-model="dialogFormVisible">
|
<el-dialog v-model="showEdit" @close="closeEdit">
|
||||||
<h1>重要提醒</h1>
|
<h1>重要提醒</h1>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>
|
|
||||||
确认创建后,将会向
|
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||||
<span class="info">name</span> ,联系电话 <span class="info">name</span> ,发送
|
|
||||||
<span class="info">name</span>,请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
姓名:
|
|
||||||
<span class="info">name</span>性别: <span class="info">name</span>:身份证号
|
|
||||||
<span class="info">name</span>联系电话:
|
|
||||||
<span class="info">name</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
授权身份:
|
|
||||||
<span class="info">name</span>
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
授权角色:
|
|
||||||
<span class="info">name</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="btn_menu">
|
<p class="btn_menu">
|
||||||
<el-button type="primary" size="large">确认创建</el-button>
|
<el-button type="primary" size="large">确认创建</el-button>
|
||||||
@ -32,11 +15,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
// import { reactive, ref } from "vue";
|
import { reactive, ref } from "vue";
|
||||||
|
|
||||||
const dialogFormVisible = ref(true)
|
|
||||||
|
// const dialogFormVisible = ref(true)
|
||||||
const formLabelWidth = '140px'
|
const formLabelWidth = '140px'
|
||||||
|
defineProps({
|
||||||
|
showEdit: {
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const closeEdit=()=>{
|
||||||
|
content.emit('close')
|
||||||
|
// console.log(defineProps.showEdit)
|
||||||
|
}
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
name: '',
|
name: '',
|
||||||
region: '',
|
region: '',
|
||||||
@ -70,7 +62,7 @@ h1 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn_menu {
|
.btn_menu {
|
||||||
margin-top: 20px;
|
margin-top: 10vh;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -98,9 +98,10 @@
|
|||||||
<el-table-column label="联系方式" prop="master_phone" show-overflow-tooltip />
|
<el-table-column label="联系方式" prop="master_phone" show-overflow-tooltip />
|
||||||
<el-table-column label="片区经理" prop="area_manager" show-overflow-tooltip />
|
<el-table-column label="片区经理" prop="area_manager" show-overflow-tooltip />
|
||||||
<el-table-column label="是否签约" prop="is_contract" show-overflow-tooltip />
|
<el-table-column label="是否签约" prop="is_contract" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="140" fixed="right">
|
<el-table-column label="操作" align="center" width="300" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
v-perms="['company/edit', 'company/add']"
|
v-perms="['company/edit', 'company/add']"
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -143,6 +144,22 @@
|
|||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="showCreateConctPop(row) "
|
||||||
|
>
|
||||||
|
创建合同
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click=" showPop=true,contractId=row.id "
|
||||||
|
>
|
||||||
|
重新发送
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -152,13 +169,20 @@
|
|||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup
|
<el-dialog v-model="showPop" @close="offPop">
|
||||||
v-if="showEdit"
|
<h1>重要提醒</h1>
|
||||||
ref="editRef"
|
<div class="content" v-if="showConctactPop">
|
||||||
:dict-data="dictData"
|
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||||
@success="getLists"
|
</div>
|
||||||
@close="showEdit = false"
|
<div class="content" v-else>
|
||||||
/>
|
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||||
|
</div>
|
||||||
|
<p class="btn_menu">
|
||||||
|
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct">确认创建</el-button>
|
||||||
|
<el-button type="primary" size="large" v-else @click="sendMsg">确认</el-button>
|
||||||
|
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||||
|
</p>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -166,18 +190,41 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiCompanyLists, apiCompanyDelete } from '@/api/company'
|
import { apiCompanyLists, apiCompanyDelete } from '@/api/company'
|
||||||
|
import { generateGontract,sendMsgApi } from '@/api/perms/admin'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from '@/utils/util'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import { dictDataLists } from '@/api/setting/dict'
|
import { dictDataLists } from '@/api/setting/dict'
|
||||||
import EditPopup from './edit.vue'
|
// import EditPopup from './edit.vue'
|
||||||
import { getRoutePath } from '@/router'
|
import { getRoutePath } from '@/router'
|
||||||
|
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const company_type_show = ref(true)
|
const company_type_show = ref(true)
|
||||||
// 是否显示编辑框
|
// 创建合同与发送短信
|
||||||
const showEdit = ref(false)
|
//弹窗
|
||||||
|
const showPop = ref(false)
|
||||||
|
const showConctactPop=ref(false)
|
||||||
|
const offPop=()=>{
|
||||||
|
showPop.value=false
|
||||||
|
showConctactPop.value=false
|
||||||
|
}
|
||||||
|
// 创建合同的id
|
||||||
|
const contractId=ref('')
|
||||||
|
const showCreateConctPop=(row)=>{
|
||||||
|
showPop.value=true,
|
||||||
|
showConctactPop.value=true,
|
||||||
|
contractId.value=row.id
|
||||||
|
}
|
||||||
|
const creContct=()=>{
|
||||||
|
generateGontract({id:contractId.value})
|
||||||
|
offPop()
|
||||||
|
}
|
||||||
|
const sendMsg=()=>{
|
||||||
|
sendMsgApi({id:contractId.value})
|
||||||
|
offPop()
|
||||||
|
}
|
||||||
|
// 创建合同与发送短信结束
|
||||||
// 查询条件
|
// 查询条件
|
||||||
const queryParams = reactive({
|
const queryParams = reactive({
|
||||||
company_name: '',
|
company_name: '',
|
||||||
@ -232,4 +279,29 @@ getLists()
|
|||||||
.btn {
|
.btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30px;
|
||||||
|
color: red;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_menu {
|
||||||
|
margin-top: 10vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -87,6 +87,16 @@
|
|||||||
>
|
>
|
||||||
编辑
|
编辑
|
||||||
</el-button> -->
|
</el-button> -->
|
||||||
|
<el-button
|
||||||
|
v-perms="['contract.contract/delete']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="checkContcat(row.id)"
|
||||||
|
>
|
||||||
|
<!-- <a href="https://www.zhihu.com/signin?next=%2F">查看</a> -->
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
|
|
||||||
<el-button
|
<el-button
|
||||||
v-perms="['contract.contract/delete']"
|
v-perms="['contract.contract/delete']"
|
||||||
type="danger"
|
type="danger"
|
||||||
@ -116,10 +126,12 @@
|
|||||||
<script lang="ts" setup name="contractLists">
|
<script lang="ts" setup name="contractLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiContractLists, apiContractDelete } from '@/api/contract'
|
import { apiContractLists, apiContractDelete,apiContractDetail } from '@/api/contract'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from '@/utils/util'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
@ -152,6 +164,17 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
|||||||
fetchFun: apiContractLists,
|
fetchFun: apiContractLists,
|
||||||
params: queryParams
|
params: queryParams
|
||||||
})
|
})
|
||||||
|
// 查看合同
|
||||||
|
const checkContcat=(id)=>{
|
||||||
|
// console.log(pager)
|
||||||
|
apiContractDetail({id}).then(res=>{
|
||||||
|
res.file? window.open(res.file): ElMessage.error ("暂无合同可以查看")
|
||||||
|
// console.log(res)
|
||||||
|
// if(res.file)
|
||||||
|
})
|
||||||
|
|
||||||
|
// window.open('https://www.zhihu.com/signin?next=%2F')
|
||||||
|
}
|
||||||
|
|
||||||
// 添加
|
// 添加
|
||||||
const handleAdd = async () => {
|
const handleAdd = async () => {
|
||||||
|
93
src/views/permission/admin/dialog_index.vue
Normal file
93
src/views/permission/admin/dialog_index.vue
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-card class="!border-none" shadow="never">
|
||||||
|
<el-form class="mb-[-16px]" :model="queryParams" inline>
|
||||||
|
<el-form-item label="公司名称" prop="company_name">
|
||||||
|
<el-input
|
||||||
|
class="w-[280px]"
|
||||||
|
v-model="queryParams.company_name"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入公司名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="公司类型" prop="company_type">
|
||||||
|
<el-input
|
||||||
|
class="w-[280px]"
|
||||||
|
v-model="queryParams.company_type"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入公司类型"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
|
<el-button @click="resetParams">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
|
||||||
|
<div class="mt-4">
|
||||||
|
<el-table :data="pager.lists" @cell-click="handleCurrentChange">
|
||||||
|
<el-table-column label="签约公司" property="company_name" />
|
||||||
|
<el-table-column label="公司类型" property="company_type" />
|
||||||
|
<el-table-column label="区县" property="area" />
|
||||||
|
<el-table-column label="乡镇" property="street" />
|
||||||
|
<el-table-column label="主联系人" property="master_name" />
|
||||||
|
<el-table-column label="联系方式" property="master_phone" />
|
||||||
|
<el-table-column label="片区经理" property="area_manager" />
|
||||||
|
<el-table-column label="是否签约" property="is_contract" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="flex mt-4 justify-end">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="companyLists">
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
|
import { apiCompanyLists, apiCompanyDelete } from '@/api/company'
|
||||||
|
import { defineEmits } from 'vue'
|
||||||
|
|
||||||
|
// 查询条件
|
||||||
|
const queryParams = reactive({
|
||||||
|
level_two: '',
|
||||||
|
level_one: '',
|
||||||
|
company_name: '',
|
||||||
|
organization_code: '',
|
||||||
|
city: '',
|
||||||
|
area: '',
|
||||||
|
street: '',
|
||||||
|
company_type: '',
|
||||||
|
master_name: '',
|
||||||
|
master_position: '',
|
||||||
|
master_phone: '',
|
||||||
|
master_email: '',
|
||||||
|
other_contacts: '',
|
||||||
|
area_manager: '',
|
||||||
|
is_contract: '',
|
||||||
|
account: '',
|
||||||
|
password: '',
|
||||||
|
deposit: '',
|
||||||
|
deposit_time: '',
|
||||||
|
qualification: '',
|
||||||
|
status: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
// 选中数据
|
||||||
|
const emits = defineEmits(['customEvent'])
|
||||||
|
|
||||||
|
// 选中数据子父传递
|
||||||
|
const handleCurrentChange = (value: any) => {
|
||||||
|
emits('customEvent', value)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: apiCompanyLists,
|
||||||
|
params: queryParams
|
||||||
|
})
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
</script>
|
File diff suppressed because it is too large
Load Diff
@ -2,14 +2,6 @@
|
|||||||
<div class="admin">
|
<div class="admin">
|
||||||
<el-card class="!border-none" shadow="never">
|
<el-card class="!border-none" shadow="never">
|
||||||
<el-form class="mb-[-16px]" :model="formData" inline>
|
<el-form class="mb-[-16px]" :model="formData" inline>
|
||||||
<el-form-item label="管理员账号">
|
|
||||||
<el-input
|
|
||||||
v-model="formData.account"
|
|
||||||
class="w-[280px]"
|
|
||||||
clearable
|
|
||||||
@keyup.enter="resetPage"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="管理员名称">
|
<el-form-item label="管理员名称">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.name"
|
v-model="formData.name"
|
||||||
@ -84,8 +76,17 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="300" align="center" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
<div style="display: flex">
|
||||||
|
<el-button
|
||||||
|
v-perms="['auth.admin/edit']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="handleCheck(row)"
|
||||||
|
>
|
||||||
|
查看
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-perms="['auth.admin/edit']"
|
v-perms="['auth.admin/edit']"
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -103,6 +104,23 @@
|
|||||||
>
|
>
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="showPop=true,showConctactPop=true,contractId=row.id "
|
||||||
|
>
|
||||||
|
创建合同
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
v-perms="['company/edit', 'company/add']"
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click=" showPop=true,contractId=row.id "
|
||||||
|
>
|
||||||
|
重新发送
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -111,12 +129,26 @@
|
|||||||
<pagination v-model="pager" @change="getLists" />
|
<pagination v-model="pager" @change="getLists" />
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :isCheck="isCheck" @success="getLists" @close="showEdit = false" />
|
||||||
|
<el-dialog v-model="showPop" @close="offPop">
|
||||||
|
<h1>重要提醒</h1>
|
||||||
|
<div class="content" v-if="showConctactPop">
|
||||||
|
请确认信息是否有误,发送合同,请确认信息是否有误,发送电子合同后短时间内将不可再次发送.
|
||||||
|
</div>
|
||||||
|
<div class="content" v-else>
|
||||||
|
确认签约短信将在60秒后发送,请注意查收,并点击短信链接进行线上合同签约
|
||||||
|
</div>
|
||||||
|
<p class="btn_menu">
|
||||||
|
<el-button type="primary" size="large" v-if="showConctactPop" @click="creContct">确认创建</el-button>
|
||||||
|
<el-button type="primary" size="large" v-else @click="sendMsg">确认</el-button>
|
||||||
|
<el-button type="info" size="large" @click="offPop">返回</el-button>
|
||||||
|
</p>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="admin">
|
<script lang="ts" setup name="admin">
|
||||||
import { adminEdit, adminLists, adminDelete } from '@/api/perms/admin'
|
import { adminEdit, adminLists, adminDelete,generateGontract,sendMsgApi } from '@/api/perms/admin'
|
||||||
import { roleAll } from '@/api/perms/role'
|
import { roleAll } from '@/api/perms/role'
|
||||||
import { useDictOptions } from '@/hooks/useDictOptions'
|
import { useDictOptions } from '@/hooks/useDictOptions'
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
@ -125,10 +157,29 @@ import EditPopup from './edit.vue'
|
|||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 表单数据
|
// 表单数据
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
account: '',
|
|
||||||
name: '',
|
name: '',
|
||||||
role_id: ''
|
role_id: ''
|
||||||
})
|
})
|
||||||
|
const contractId=ref('')
|
||||||
|
// 弹窗
|
||||||
|
const showPop=ref(false)
|
||||||
|
const showConctactPop=ref(false)
|
||||||
|
const offPop=()=>{
|
||||||
|
showPop.value=false
|
||||||
|
showConctactPop.value=false
|
||||||
|
}
|
||||||
|
const creContct=()=>{
|
||||||
|
generateGontract({id:contractId.value})
|
||||||
|
offPop()
|
||||||
|
}
|
||||||
|
const sendMsg=()=>{
|
||||||
|
sendMsgApi({id:contractId.value}).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
|
||||||
|
offPop()
|
||||||
|
}
|
||||||
|
//
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
fetchFun: adminLists,
|
fetchFun: adminLists,
|
||||||
@ -147,13 +198,24 @@ const changeStatus = (data: any) => {
|
|||||||
getLists()
|
getLists()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 查看
|
||||||
|
const isCheck=ref(false)
|
||||||
|
const handleCheck = async (data: any) => {
|
||||||
|
isCheck.value=true
|
||||||
|
showEdit.value = true
|
||||||
|
await nextTick()
|
||||||
|
editRef.value?.open('edit')
|
||||||
|
editRef.value?.setFormData(data)
|
||||||
|
}
|
||||||
const handleAdd = async () => {
|
const handleAdd = async () => {
|
||||||
|
isCheck.value=false
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('add')
|
editRef.value?.open('add')
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleEdit = async (data: any) => {
|
const handleEdit = async (data: any) => {
|
||||||
|
isCheck.value=false
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('edit')
|
editRef.value?.open('edit')
|
||||||
@ -166,6 +228,7 @@ const handleDelete = async (id: number) => {
|
|||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const { optionsData } = useDictOptions<{
|
const { optionsData } = useDictOptions<{
|
||||||
role: any[]
|
role: any[]
|
||||||
}>({
|
}>({
|
||||||
@ -178,3 +241,29 @@ onMounted(() => {
|
|||||||
getLists()
|
getLists()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 30px;
|
||||||
|
color: red;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
|
color: red;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 18px;
|
||||||
|
display: inline-block;
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn_menu {
|
||||||
|
margin-top: 10vh;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
}</style>
|
Loading…
x
Reference in New Issue
Block a user