Browse Source

新增任务列表页面

新增任务表单页面
master
parent
commit
8c7027672b
  1. 149
      src/BusinessCom/ChoosePersonnel/index.vue
  2. 469
      src/views/system/dict/index.vue
  3. 118
      src/views/task/form.vue
  4. 206
      src/views/task/index.vue
  5. 19
      src/views/tool/componentview/index.vue
  6. 5
      vite.config.js

149
src/BusinessCom/ChoosePersonnel/index.vue

@ -0,0 +1,149 @@
<template>
<section>
<el-button type="primary" @click="selectPersonnal">选择人员</el-button>
<teleport to="body">
<section
class="choose-container"
v-if="showChoose"
@click.self="showChoose = false"
>
<section class="choose-wrapper">
<section class="isChoose">
<section class="none">待选区</section>
</section>
<section class="chooseOption">
<el-form inline :model="form">
<el-form-item label="用户昵称">
<el-input
v-model="form.username"
placeholder="请输入用户名称"
/>
</el-form-item>
<el-form-item label="角色">
<el-select
v-model="form.role"
style="width: 200px"
placeholder="请选择角色"
>
<el-option> </el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary">查询</el-button>
<el-button>重置</el-button>
</el-form-item>
</el-form>
</section>
<section>
<el-table v-loading="loading" :data="tableData">
<el-table-column
label="用户编号"
align="center"
key="userId"
prop="userId"
/>
<el-table-column
label="用户名称"
align="center"
key="userName"
prop="userName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="用户昵称"
align="center"
key="nickName"
prop="nickName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="部门"
align="center"
key="deptName"
prop="dept.deptName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="手机号码"
align="center"
key="phonenumber"
prop="phonenumber"
width="120"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="form.pageNum"
v-model:limit="form.pageSize"
/>
</section>
</section>
</section>
</teleport>
</section>
</template>
<script setup>
const loading = ref(false);
const tableData = ref([]);
const showChoose = ref(false);
const total = ref(0);
const form = ref({
username: undefined,
role: undefined,
pageSize: 10,
pageNum: 1,
});
function selectPersonnal() {
showChoose.value = true;
}
</script>
<style scoped lang="scss">
.choose-container {
cursor: pointer;
position: absolute;
inset: 0;
background-color: var(--el-overlay-color-lighter);
z-index: 9999;
display: flex;
justify-content: center;
align-items: center;
.choose-wrapper {
min-width: 60vw;
min-height: 60vh;
background-color: #fff;
border-radius: var(--el-border-radius-base, 4px);
display: grid;
padding: 15px;
grid-template-rows: auto 1fr;
grid-template-columns: 25% 1fr;
grid-gap: 15px;
grid-template-areas:
"ischoose chooseoption"
"ischoose waitchoose";
.isChoose {
grid-area: ischoose;
border: 1px dashed #ccc;
border-radius: var(--el-border-radius-base, 4px);
.none{
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
color: var(--el-text-color-secondary);
font-size: 14px;
}
}
.chooseOption {
grid-area: chooseoption;
}
}
}
</style>

469
src/views/system/dict/index.vue

@ -1,179 +1,252 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="字典名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入字典名称"
clearable
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input
v-model="queryParams.dictType"
placeholder="请输入字典类型"
clearable
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="字典状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间" style="width: 308px">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="字典名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入字典名称"
clearable
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input
v-model="queryParams.dictType"
placeholder="请输入字典类型"
clearable
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="字典状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间" style="width: 308px">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery"
>搜索</el-button
>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:dict:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:dict:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:dict:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Refresh"
@click="handleRefreshCache"
v-hasPermi="['system:dict:remove']"
>刷新缓存</el-button>
</el-col>
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
@click="handleAdd"
v-hasPermi="['system:dict:add']"
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="Edit"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:dict:edit']"
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Delete"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:dict:remove']"
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
@click="handleExport"
v-hasPermi="['system:dict:export']"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="Refresh"
@click="handleRefreshCache"
v-hasPermi="['system:dict:remove']"
>刷新缓存</el-button
>
</el-col>
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编号" align="center" prop="dictId" />
<el-table-column label="字典名称" align="center" prop="dictName" :show-overflow-tooltip="true"/>
<el-table-column label="字典类型" align="center" :show-overflow-tooltip="true">
<template #default="scope">
<router-link :to="'/system/dict-data/index/' + scope.row.dictId" class="link-type">
<span>{{ scope.row.dictType }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">
<template #default="scope">
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dict:edit']">修改</el-button>
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dict:remove']">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
<el-table
v-loading="loading"
:data="typeList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编号" align="center" prop="dictId" />
<el-table-column
label="字典名称"
align="center"
prop="dictName"
:show-overflow-tooltip="true"
/>
<el-table-column
label="字典类型"
align="center"
:show-overflow-tooltip="true"
>
<template #default="scope">
<router-link
:to="'/system/dict-data/index/' + scope.row.dictId"
class="link-type"
>
<span>{{ scope.row.dictType }}</span>
</router-link>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_normal_disable" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column
label="备注"
align="center"
prop="remark"
:show-overflow-tooltip="true"
/>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template #default="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
width="160"
class-name="small-padding fixed-width"
>
<template #default="scope">
<el-button
link
type="primary"
icon="Edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:dict:edit']"
>修改</el-button
>
<el-button
link
type="primary"
icon="Delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:dict:remove']"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="dictRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入字典名称" />
</el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input v-model="form.dictType" placeholder="请输入字典类型" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
:value="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body>
<el-form ref="dictRef" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入字典名称" />
</el-form-item>
<el-form-item label="字典类型" prop="dictType">
<el-input v-model="form.dictType" placeholder="请输入字典类型" />
</el-form-item>
<el-form-item label="状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in sys_normal_disable"
:key="dict.value"
:value="dict.value"
>{{ dict.label }}</el-radio
>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
type="textarea"
placeholder="请输入内容"
></el-input>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup name="Dict">
import useDictStore from '@/store/modules/dict'
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import useDictStore from "@/store/modules/dict";
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
} from "@/api/system/dict/type";
const { proxy } = getCurrentInstance();
const { sys_normal_disable } = proxy.useDict("sys_normal_disable");
@ -196,11 +269,15 @@ const data = reactive({
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
status: undefined,
},
rules: {
dictName: [{ required: true, message: "字典名称不能为空", trigger: "blur" }],
dictType: [{ required: true, message: "字典类型不能为空", trigger: "blur" }]
dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" },
],
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" },
],
},
});
@ -209,11 +286,13 @@ const { queryParams, form, rules } = toRefs(data);
/** 查询字典类型列表 */
function getList() {
loading.value = true;
listType(proxy.addDateRange(queryParams.value, dateRange.value)).then(response => {
typeList.value = response.rows;
total.value = response.total;
loading.value = false;
});
listType(proxy.addDateRange(queryParams.value, dateRange.value)).then(
(response) => {
typeList.value = response.rows;
total.value = response.total;
loading.value = false;
},
);
}
/** 取消按钮 */
@ -229,7 +308,7 @@ function reset() {
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
remark: undefined,
};
proxy.resetForm("dictRef");
}
@ -256,7 +335,7 @@ function handleAdd() {
/** 多选框选中数据 */
function handleSelectionChange(selection) {
ids.value = selection.map(item => item.dictId);
ids.value = selection.map((item) => item.dictId);
single.value = selection.length != 1;
multiple.value = !selection.length;
}
@ -265,7 +344,7 @@ function handleSelectionChange(selection) {
function handleUpdate(row) {
reset();
const dictId = row.dictId || ids.value;
getType(dictId).then(response => {
getType(dictId).then((response) => {
form.value = response.data;
open.value = true;
title.value = "修改字典类型";
@ -274,16 +353,16 @@ function handleUpdate(row) {
/** 提交按钮 */
function submitForm() {
proxy.$refs["dictRef"].validate(valid => {
proxy.$refs["dictRef"].validate((valid) => {
if (valid) {
if (form.value.dictId != undefined) {
updateType(form.value).then(response => {
updateType(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
addType(form.value).then(response => {
addType(form.value).then((response) => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
@ -296,19 +375,27 @@ function submitForm() {
/** 删除按钮操作 */
function handleDelete(row) {
const dictIds = row.dictId || ids.value;
proxy.$modal.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?').then(function() {
return delType(dictIds);
}).then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
proxy.$modal
.confirm('是否确认删除字典编号为"' + dictIds + '"的数据项?')
.then(function () {
return delType(dictIds);
})
.then(() => {
getList();
proxy.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}
/** 导出按钮操作 */
function handleExport() {
proxy.download("system/dict/type/export", {
...queryParams.value
}, `dict_${new Date().getTime()}.xlsx`);
proxy.download(
"system/dict/type/export",
{
...queryParams.value,
},
`dict_${new Date().getTime()}.xlsx`,
);
}
/** 刷新缓存按钮操作 */

118
src/views/task/form.vue

@ -0,0 +1,118 @@
<template>
<el-dialog :title="title" v-model="show" width="500px" append-to-body>
<el-form ref="roleRef" :model="form" :rules="rule" label-width="100px">
<el-form-item label="任务标题" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入任务标题" />
</el-form-item>
<el-form-item label="任务类型" prop="roleSort">
<el-select placeholder="请选择任务类型">
<el-option
v-for="dict in task_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="执行周期">
<el-select placeholder="请选择执行周期">
<el-option
v-for="dict in task_period_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="执行日期">
<el-date-picker
type="daterange"
range-separator="至"
start-placeholder="请选择开始日期"
end-placeholder="请选择结束日期"
/>
</el-form-item>
<el-form-item label="任务内容">
<el-input
type="textarea"
:autosize="{
minRows: 2,
}"
placeholder="请输入任务内容"
/>
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
const title = ref("");
const show = ref(false);
const form = ref({});
const rule = ref({});
const { proxy } = getCurrentInstance();
const { task_period_type, task_type } = proxy.useDict(
"task_period_type",
"task_type",
);
/** 提交按钮 */
function submitForm() {
proxy.$refs["roleRef"].validate((valid) => {
if (valid) {
if (form.value.roleId != undefined) {
form.value.menuIds = getMenuAllCheckedKeys();
updateRole(form.value).then((response) => {
proxy.$modal.msgSuccess("修改成功");
open.value = false;
getList();
});
} else {
form.value.menuIds = getMenuAllCheckedKeys();
addRole(form.value).then((response) => {
proxy.$modal.msgSuccess("新增成功");
open.value = false;
getList();
});
}
}
});
}
/** 取消按钮 */
function cancel() {
show.value = false;
reset();
}
/** 重置新增的表单以及其他数据 */
function reset() {
form.value = {
roleId: undefined,
roleName: undefined,
roleKey: undefined,
roleSort: 0,
status: "0",
menuIds: [],
deptIds: [],
menuCheckStrictly: true,
deptCheckStrictly: true,
remark: undefined,
};
proxy.resetForm("roleRef");
}
function open(param) {
title.value = param.title;
show.value = true;
}
defineExpose({ open });
</script>
<style scoped lang="scss"></style>

206
src/views/task/index.vue

@ -0,0 +1,206 @@
<template>
<section class="app-container">
<el-form
:model="queryParams"
ref="queryRef"
v-show="showSearch"
:inline="true"
label-width="auto"
>
<el-form-item label="任务标题" prop="roleName">
<el-input
v-model="queryParams.roleName"
placeholder="请输入角色名称"
clearable
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="权限字符" prop="roleKey">
<el-input
v-model="queryParams.roleKey"
placeholder="请输入权限字符"
clearable
style="width: 240px"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="任务类型" prop="status">
<el-select
v-model="queryParams.status"
placeholder="角色状态"
clearable
style="width: 240px"
>
<el-option
v-for="dict in sys_normal_disable"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="创建时间" style="width: 308px">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">
搜索
</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="create()"
>新增</el-button
>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="Download"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['system:role:export']"-->
<!-- >导出</el-button-->
<!-- >-->
<!-- </el-col>-->
<right-toolbar
v-model:showSearch="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- 表格数据 -->
<el-table v-loading="loading" :data="list">
<el-table-column label="任务标题" prop="roleId" align="center" />
<el-table-column
label="执行周期"
prop="roleName"
:show-overflow-tooltip="true"
align="center"
/>
<el-table-column
label="任务类型"
prop="roleKey"
:show-overflow-tooltip="true"
align="center"
/>
<el-table-column
label="进度"
prop="roleKey"
:show-overflow-tooltip="true"
align="center"
/>
<el-table-column label="执行范围" prop="roleSort" align="center">
<template #default>
<el-link type="primary">共200家</el-link>
</template>
</el-table-column>
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template #default="scope">
<el-tooltip content="执行日志" placement="top">
<el-button link type="primary" icon="Document"></el-button>
</el-tooltip>
<el-tooltip content="修改" placement="top">
<el-button link type="primary" icon="Edit"></el-button>
</el-tooltip>
<el-tooltip content="删除" placement="top">
<el-button link type="primary" icon="Delete"></el-button>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
<TaskForm ref="taskFormRef" />
</section>
</template>
<script setup>
import TaskForm from "./form.vue";
const { proxy } = getCurrentInstance();
const { task_period_type } = proxy.useDict("task_period_type");
const loading = ref(false);
const showSearch = ref(true);
const taskFormRef = ref();
const data = reactive({
form: {},
queryParams: {
pageNum: 1,
pageSize: 10,
roleName: undefined,
roleKey: undefined,
status: undefined,
},
rules: {
roleName: [
{ required: true, message: "角色名称不能为空", trigger: "blur" },
],
roleKey: [{ required: true, message: "权限字符不能为空", trigger: "blur" }],
roleSort: [
{ required: true, message: "角色顺序不能为空", trigger: "blur" },
],
},
});
const total = ref(0);
const { queryParams, form, rules } = toRefs(data);
const dateRange = ref([]);
const list = ref([
{
roleId: 1,
roleName: "超级管理员",
roleKey: "admin",
roleSort: 1,
roleStatus: "0",
roleRemark: "超级管理员拥有所有权限",
},
]);
/**
* 获取列表
*/
function getList() {}
/** 重置按钮操作 */
function resetQuery() {
dateRange.value = [];
proxy.resetForm("queryRef");
handleQuery();
}
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
getList();
}
/**
* 新增任务
*/
function create() {
unref(taskFormRef).open({ title: "新增任务" });
}
</script>
<style scoped lang="scss"></style>

19
src/views/tool/componentview/index.vue

@ -0,0 +1,19 @@
<template>
<section class="app-container">
<el-form>
<el-form-item label="选择人员">
<ChoosePersonnel/>
</el-form-item>
</el-form>
</section>
</template>
<script setup>
import ChoosePersonnel from '@/BusinessCom/ChoosePersonnel/index.vue'
</script>
<style scoped lang="scss">
</style>

5
vite.config.js

@ -25,13 +25,14 @@ export default defineConfig(({ mode, command }) => {
},
// vite 相关配置
server: {
port: 8080,
port: 9527,
host: true,
open: true,
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/api': {
target: 'http://localhost:8080',
// target:'http://192.168.2.101:8080',
target:'http://localhost:8888',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}

Loading…
Cancel
Save