物业主开发
This commit is contained in:
@@ -62,9 +62,10 @@ export const delBill = (id: string | number | Array<string | number>) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ! =---------------=================================== 组件
|
||||||
export interface BillHouse {
|
export interface BillHouse {
|
||||||
'buildingName': string;
|
'buildingName': string;
|
||||||
'houseId': number;
|
'houseId': string;
|
||||||
'unitNo': number;
|
'unitNo': number;
|
||||||
'houseNo': string;
|
'houseNo': string;
|
||||||
'floorNo': number;
|
'floorNo': number;
|
||||||
@@ -82,3 +83,18 @@ export const listBillHouse = (query: { pageNum: number; pageSize: number }): Axi
|
|||||||
params: query
|
params: query
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// ! =---------------
|
||||||
|
/**
|
||||||
|
* 查询业主列表
|
||||||
|
* @param data
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const queryResidentList_holder = (query: { pageNum: number; pageSize: number }) => {
|
||||||
|
return request({
|
||||||
|
url: '/bill/getResidentList',
|
||||||
|
method: 'GET',
|
||||||
|
params: query
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|||||||
53
src/api/system/SdbCashier/index.ts
Normal file
53
src/api/system/SdbCashier/index.ts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request';
|
||||||
|
import { AxiosPromise } from 'axios';
|
||||||
|
|
||||||
|
export type cashlist = {
|
||||||
|
'residentId': string;
|
||||||
|
'residentName': string;
|
||||||
|
'houseName': string;
|
||||||
|
'phone': string;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询住户列表
|
||||||
|
* @param post
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const cashQuery = (data: { residentName?: string }): AxiosPromise<cashlist[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/cash/residentList',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
export type billlistType = {
|
||||||
|
'villageId': string;
|
||||||
|
'residentId': string;
|
||||||
|
'houseId': string;
|
||||||
|
'houseName': string;
|
||||||
|
'parkingId': string;
|
||||||
|
'parkingName': string;
|
||||||
|
'billId': string;
|
||||||
|
'chargeTypeName': string;
|
||||||
|
'chargeItemName': string;
|
||||||
|
'billingType': string;
|
||||||
|
'formula': string;
|
||||||
|
'fixedPrice': string;
|
||||||
|
'startDate': string;
|
||||||
|
'endDate': string;
|
||||||
|
'money': string;
|
||||||
|
'payStatus': string;
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
* 查询账单列表
|
||||||
|
* @param post
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export const billQuery = (data: { residentId?: string; payStatus: '0' | '1' }): AxiosPromise<billlistType[]> => {
|
||||||
|
return request({
|
||||||
|
url: '/cash/billList',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -68,7 +68,7 @@ export const delElectricityDevice = (id: string | number | Array<string | number
|
|||||||
*/
|
*/
|
||||||
export const ElectricityDeviceMakerQrcode = (data: { deviceCode: string; id: string }[]) => {
|
export const ElectricityDeviceMakerQrcode = (data: { deviceCode: string; id: string }[]) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/electricityDevice/generateBarCodee',
|
url: '/electricityDevice/generateBarCode',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -70,8 +70,8 @@ export interface UserForm {
|
|||||||
sex?: string;
|
sex?: string;
|
||||||
status: string;
|
status: string;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
postIds: string[];
|
postIds?: string[];
|
||||||
roleIds: string[];
|
roleIds?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserInfoVO {
|
export interface UserInfoVO {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ html.dark svg {
|
|||||||
|
|
||||||
#app {
|
#app {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-width: 1200px; /* 最小宽度,防止太小变形 */
|
min-width: 1024px; /* 最小宽度,防止太小变形 */
|
||||||
}
|
}
|
||||||
|
|
||||||
*,
|
*,
|
||||||
@@ -255,3 +255,7 @@ aside {
|
|||||||
width: 960px;
|
width: 960px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-button {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
// Modern rounded style + soft shadows
|
// Modern rounded style + soft shadows
|
||||||
--app-radius-sm: 6px;
|
--app-radius-sm: 6px;
|
||||||
--app-radius-md: 10px;
|
--app-radius-md: 5px;
|
||||||
--app-radius-lg: 14px;
|
--app-radius-lg: 14px;
|
||||||
--app-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.08);
|
--app-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08), 0 6px 16px rgba(15, 23, 42, 0.08);
|
||||||
--app-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
|
--app-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.12);
|
||||||
|
|||||||
273
src/components/Holder/user.vue
Normal file
273
src/components/Holder/user.vue
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
<template>
|
||||||
|
<slot name="default" />
|
||||||
|
<el-dialog append-to-body v-model="dialog.dialogVisible" :title="dialog.dialogTitle" width="1050">
|
||||||
|
<el-table @row-click="handleRowClick" ref="multipleTableRef" :data="tableData" border @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="序号" align="center" width="55" type="index" />
|
||||||
|
<el-table-column label="业主" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.residentName ? scope.row.residentName : '---' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="性别" align="center">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="sys_user_sex" :value="scope.row.gender"></dict-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="手机号" align="center" prop="phone" />
|
||||||
|
<el-table-column label="房屋" align="center" prop="house_name" />
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer flex flex-items-center flex-justify-between">
|
||||||
|
<pagination
|
||||||
|
style="margin-top: 0"
|
||||||
|
layout="total, prev, pager, next, jumper"
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
v-model:page="queryParams.pageNum"
|
||||||
|
v-model:limit="queryParams.pageSize"
|
||||||
|
@pagination="getlist"
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<el-button @click="conback">退出</el-button>
|
||||||
|
<el-button type="primary" @click="confirm"> 确定 </el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { getBuildinglistAPI, getBuildingOnly, getHouselistAPI } from '@/api/system/house';
|
||||||
|
import { BillHouse, listBillHouse, queryResidentList_holder } from '@/api/system/SdbBill';
|
||||||
|
import { ref, watch, nextTick, getCurrentInstance, ComponentInternalInstance, toRefs } from 'vue';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||||
|
const { com_build_use } = toRefs<any>(proxy?.useDict('com_build_use'));
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
userid: {
|
||||||
|
type: String || Array<string>,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
returnvalue: {
|
||||||
|
type: String,
|
||||||
|
default: 'houseId'
|
||||||
|
},
|
||||||
|
titleName: {
|
||||||
|
type: String,
|
||||||
|
default: '选择房屋'
|
||||||
|
},
|
||||||
|
/** 是否多选 false 单选 */
|
||||||
|
isMultiple: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const { userid, titleName, returnvalue } = toRefs(props);
|
||||||
|
|
||||||
|
// ✅ 手动设置默认值(替代 withDefaults)
|
||||||
|
const emit = defineEmits<{
|
||||||
|
change: [value: string | number | (string | number)[] | BillHouse | BillHouse[]]; // 支持返回数组
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const dialog = ref({
|
||||||
|
dialogVisible: false,
|
||||||
|
dialogTitle: titleName.value
|
||||||
|
});
|
||||||
|
|
||||||
|
const queryParams = ref({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
buildingUse: null,
|
||||||
|
buildingId: null,
|
||||||
|
unitNo: null
|
||||||
|
});
|
||||||
|
|
||||||
|
const multipleTableRef = ref();
|
||||||
|
const tableData = ref<BillHouse[]>([]);
|
||||||
|
const total = ref(0);
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
// 存储选中项
|
||||||
|
const multipleSelection = ref<BillHouse[]>([]);
|
||||||
|
|
||||||
|
const isMultiple = computed(() => props.isMultiple ?? false);
|
||||||
|
|
||||||
|
// 优化 handleUserSelection,避免重复查找
|
||||||
|
const handleUserSelection = () => {
|
||||||
|
if (!userid.value || !tableData.value.length) return;
|
||||||
|
|
||||||
|
multipleSelection.value = [];
|
||||||
|
let arr = [];
|
||||||
|
if (userid.value && typeof userid.value === 'string' && userid.value.trim() !== '') {
|
||||||
|
arr = userid.value.split(',');
|
||||||
|
} else if (Array.isArray(userid.value)) {
|
||||||
|
arr = [...userid.value];
|
||||||
|
}
|
||||||
|
if (!arr.length) return;
|
||||||
|
arr.forEach((item) => {
|
||||||
|
const target = tableData.value.find((row) => row.userId == item);
|
||||||
|
target && multipleSelection.value.push(target);
|
||||||
|
});
|
||||||
|
nextTick(() => {
|
||||||
|
if (multipleTableRef.value) {
|
||||||
|
multipleTableRef.value.clearSelection();
|
||||||
|
multipleSelection.value.forEach((item) => {
|
||||||
|
multipleTableRef.value.toggleRowSelection(item, true);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
// ====================== 方法 ======================
|
||||||
|
|
||||||
|
// 获取列表
|
||||||
|
function getlist() {
|
||||||
|
loading.value = true;
|
||||||
|
queryResidentList_holder(queryParams.value)
|
||||||
|
.then((res) => {
|
||||||
|
tableData.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
handleUserSelection();
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
console.error('获取用户列表失败:', error);
|
||||||
|
})
|
||||||
|
.finally(() => {
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 楼栋列表 */
|
||||||
|
const buildinglist = ref([]);
|
||||||
|
/** 房屋列表 */
|
||||||
|
const unitlist = ref([]);
|
||||||
|
|
||||||
|
/** 筛选房屋类型 */
|
||||||
|
function handleChangeHouse(val: string) {
|
||||||
|
getBuildinglistAPI(val).then((res) => {
|
||||||
|
buildinglist.value = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 单元列表 */
|
||||||
|
function handleChangebuilding(val: string) {
|
||||||
|
getHouselistAPI(val).then((res) => {
|
||||||
|
unitlist.value = res.data.units;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==============================================
|
||||||
|
// ✅ 新增:处理 selection-change(多选专用)
|
||||||
|
// ==============================================
|
||||||
|
function handleSelectionChange(selection: BillHouse[]) {
|
||||||
|
if (isMultiple.value) {
|
||||||
|
multipleSelection.value = selection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ==============================================
|
||||||
|
// 最佳单选方案:点击行选中,无报错、无循环、最稳定
|
||||||
|
// ==============================================
|
||||||
|
// 优化 handleRowClick,避免重复
|
||||||
|
function handleRowClick(row: BillHouse) {
|
||||||
|
if (!multipleTableRef.value) return;
|
||||||
|
|
||||||
|
if (isMultiple.value) {
|
||||||
|
const index = multipleSelection.value.findIndex((item) => item.houseId === row.houseId);
|
||||||
|
if (index > -1) {
|
||||||
|
// 取消选中
|
||||||
|
multipleSelection.value.splice(index, 1);
|
||||||
|
multipleTableRef.value?.toggleRowSelection(row, false);
|
||||||
|
} else {
|
||||||
|
// 选中
|
||||||
|
multipleSelection.value.push(row);
|
||||||
|
multipleTableRef.value?.toggleRowSelection(row, true);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 【单选模式】先清空,再选中当前行
|
||||||
|
multipleSelection.value = [];
|
||||||
|
multipleTableRef.value.clearSelection();
|
||||||
|
multipleSelection.value = [row];
|
||||||
|
multipleTableRef.value.toggleRowSelection(row, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 重置查询
|
||||||
|
function resetQuery() {
|
||||||
|
queryParams.value = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
houseuse: null,
|
||||||
|
buildingId: null,
|
||||||
|
unitNo: null
|
||||||
|
};
|
||||||
|
getlist();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 退出
|
||||||
|
function conback() {
|
||||||
|
dialog.value.dialogVisible = false;
|
||||||
|
resetQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ==============================================
|
||||||
|
// ✅ 核心修改:根据 returnvalue 返回对应的值
|
||||||
|
// ==============================================
|
||||||
|
function confirm() {
|
||||||
|
dialog.value.dialogVisible = false;
|
||||||
|
if (isMultiple.value) {
|
||||||
|
// 多选
|
||||||
|
if (returnvalue.value === '*') {
|
||||||
|
// ✅ 返回整个对象数组
|
||||||
|
emit('change', multipleSelection.value);
|
||||||
|
} else {
|
||||||
|
// 返回指定字段数组
|
||||||
|
emit(
|
||||||
|
'change',
|
||||||
|
multipleSelection.value.map((item) => item[returnvalue.value as keyof BillHouse])
|
||||||
|
);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// 单选
|
||||||
|
if (returnvalue.value === '*') {
|
||||||
|
// ✅ 返回整个对象
|
||||||
|
emit('change', multipleSelection.value[0]);
|
||||||
|
} else {
|
||||||
|
// 返回指定字段
|
||||||
|
emit('change', multipleSelection.value[0][returnvalue.value as keyof BillHouse]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
multipleSelection.value = [];
|
||||||
|
multipleTableRef.value.clearSelection();
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open: () => {
|
||||||
|
getlist();
|
||||||
|
dialog.value.dialogVisible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.residentBox {
|
||||||
|
width: 385px;
|
||||||
|
height: 35px;
|
||||||
|
line-height: 35px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 0 10px;
|
||||||
|
.defaultbox {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
background-color: #f4f8ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,12 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="top-right-btn" :style="style">
|
<div class="top-right-btn" :style="style">
|
||||||
<el-row>
|
<div>
|
||||||
<el-tooltip v-if="search" class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
|
<!-- 添加按钮 -->
|
||||||
<el-button circle icon="Search" @click="toggleSearch()" />
|
<el-button :disabled="props.disableAdd" v-if="props.showAdd" icon="Plus" type="primary" @click="toggleSearch()"> 新建 </el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
|
<!-- 批量操作下拉框 -->
|
||||||
<el-button circle icon="Refresh" @click="refresh()" />
|
<el-dropdown v-if="props.showDelete || props.showEdit || $slots.dropdown" trigger="click" style="margin-left: 10px">
|
||||||
</el-tooltip>
|
<el-button @click.stop="refresh"> {{ props.moreTitle }} </el-button>
|
||||||
|
|
||||||
|
<!-- 👇 核心:优先使用外部插槽,没有则使用默认内容 -->
|
||||||
|
<template #dropdown>
|
||||||
|
<!-- 这里直接渲染,不嵌套插槽 -->
|
||||||
|
<el-dropdown-menu v-if="!$slots.dropdown">
|
||||||
|
<el-dropdown-item :disabled="props.disableEdit" v-if="props.showEdit" @click="emits('update:edit')"> 编辑 </el-dropdown-item>
|
||||||
|
<el-dropdown-item :disabled="props.disableDelete" v-if="props.showDelete" @click="emits('update:delete')"> 批量删除 </el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
<!-- 外部自定义内容直接渲染,不包任何多余标签 -->
|
||||||
|
<template v-else>
|
||||||
|
<slot name="dropdown" />
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-dropdown>
|
||||||
|
|
||||||
|
<!-- 显隐列(保留你原有逻辑) -->
|
||||||
<el-tooltip v-if="columns" class="item" effect="dark" content="显示/隐藏列" placement="top">
|
<el-tooltip v-if="columns" class="item" effect="dark" content="显示/隐藏列" placement="top">
|
||||||
<div class="show-btn">
|
<div class="show-btn">
|
||||||
<el-popover placement="bottom" trigger="click">
|
<el-popover placement="bottom" trigger="click">
|
||||||
@@ -16,7 +32,7 @@
|
|||||||
:data="columns"
|
:data="columns"
|
||||||
show-checkbox
|
show-checkbox
|
||||||
node-key="key"
|
node-key="key"
|
||||||
:props="{ label: 'label', children: 'children' } as any"
|
:props="{ label: 'label', children: 'children' }"
|
||||||
@check="columnChange"
|
@check="columnChange"
|
||||||
></el-tree>
|
></el-tree>
|
||||||
<template #reference>
|
<template #reference>
|
||||||
@@ -25,65 +41,77 @@
|
|||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-row>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { propTypes } from '@/utils/propTypes';
|
import { propTypes } from '@/utils/propTypes';
|
||||||
|
import { CSSProperties } from 'vue';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
showSearch: propTypes.bool.def(true),
|
|
||||||
columns: propTypes.fieldOption,
|
columns: propTypes.fieldOption,
|
||||||
search: propTypes.bool.def(true),
|
gutter: propTypes.number.def(10),
|
||||||
gutter: propTypes.number.def(10)
|
moreTitle: propTypes.string.def('批量操作'),
|
||||||
|
|
||||||
|
showAdd: propTypes.bool.def(true),
|
||||||
|
showDelete: propTypes.bool.def(true),
|
||||||
|
showEdit: propTypes.bool.def(true),
|
||||||
|
|
||||||
|
disableAdd: propTypes.bool.def(false),
|
||||||
|
disableDelete: propTypes.bool.def(false),
|
||||||
|
disableEdit: propTypes.bool.def(false)
|
||||||
});
|
});
|
||||||
|
|
||||||
const columnRef = ref<ElTreeInstance>();
|
const columnRef = ref();
|
||||||
const emits = defineEmits(['update:showSearch', 'queryTable']);
|
const emits = defineEmits(['update:add', 'update:edit', 'update:delete']);
|
||||||
|
|
||||||
const style = computed(() => {
|
const style = computed<CSSProperties>(() => {
|
||||||
const ret: any = {};
|
const ret: CSSProperties = {};
|
||||||
if (props.gutter) {
|
if (props.gutter) {
|
||||||
ret.marginRight = `${props.gutter / 2}px`;
|
ret.marginRight = `${props.gutter / 2}px`;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
});
|
});
|
||||||
|
|
||||||
// 搜索
|
// 添加
|
||||||
function toggleSearch() {
|
function toggleSearch() {
|
||||||
emits('update:showSearch', !props.showSearch);
|
emits('update:add');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 刷新
|
const isExpent = ref(false);
|
||||||
|
// 批量操作展开
|
||||||
function refresh() {
|
function refresh() {
|
||||||
emits('queryTable');
|
isExpent.value = !isExpent.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更改数据列的显示和隐藏
|
// 更改显示隐藏列
|
||||||
function columnChange(...args: any[]) {
|
function columnChange(...args) {
|
||||||
props.columns?.forEach((item) => {
|
props.columns?.forEach((item) => {
|
||||||
item.visible = args[1].checkedKeys.includes(item.key);
|
item.visible = args[1].checkedKeys.includes(item.key);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 显隐列初始默认隐藏列
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
props.columns?.forEach((item) => {
|
props.columns?.forEach((item) => {
|
||||||
if (item.visible) {
|
if (item.visible) {
|
||||||
columnRef.value?.setChecked(item.key, true, false);
|
columnRef.value?.setChecked(item.key, true, false);
|
||||||
// value.value.push(item.key);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.hiddenActions {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
:deep(.el-transfer__button) {
|
:deep(.el-transfer__button) {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: block;
|
display: block;
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-transfer__button:first-child) {
|
:deep(.el-transfer__button:first-child) {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
@@ -91,11 +119,13 @@ onMounted(() => {
|
|||||||
.my-el-transfer {
|
.my-el-transfer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tree-header {
|
.tree-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.show-btn {
|
.show-btn {
|
||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" @submit.prevent="handleQuery">
|
||||||
<el-form-item label="角色名称" prop="roleName">
|
<el-form-item label="角色名称" prop="roleName">
|
||||||
<el-input v-model="queryParams.roleName" placeholder="请输入角色名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.roleName" placeholder="请输入角色名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="用户名称" prop="userName">
|
<el-form-item label="用户名称" prop="userName">
|
||||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="() => resetQuery()">重置</el-button>
|
<el-button @click="() => resetQuery()">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="navbar" :class="'nav' + navType">
|
<div class="navbar" :class="'nav' + navType">
|
||||||
|
<hamburger
|
||||||
|
v-show="Showhamburger"
|
||||||
|
id="hamburger-container"
|
||||||
|
:is-active="appStore.sidebar.opened"
|
||||||
|
class="hamburger-container"
|
||||||
|
@toggle-click="toggleSideBar"
|
||||||
|
>
|
||||||
|
</hamburger>
|
||||||
|
<div class="flex-1 h-full"></div>
|
||||||
<div class="right-menu flex align-center">
|
<div class="right-menu flex align-center">
|
||||||
<template v-if="appStore.device !== 'mobile'">
|
<template v-if="appStore.device !== 'mobile'">
|
||||||
<el-tooltip :content="proxy.$t('navbar.message')" effect="dark" placement="bottom">
|
<el-tooltip :content="proxy.$t('navbar.message')" effect="dark" placement="bottom">
|
||||||
@@ -43,6 +52,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import hamburger from '@/components/Hamburger/index.vue';
|
||||||
import { useAppStore } from '@/store/modules/app';
|
import { useAppStore } from '@/store/modules/app';
|
||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
import { useSettingsStore } from '@/store/modules/settings';
|
import { useSettingsStore } from '@/store/modules/settings';
|
||||||
@@ -51,6 +61,14 @@ import notice from './notice/index.vue';
|
|||||||
import router from '@/router';
|
import router from '@/router';
|
||||||
import { ElMessageBoxOptions } from 'element-plus/es/components/message-box/src/message-box.type';
|
import { ElMessageBoxOptions } from 'element-plus/es/components/message-box/src/message-box.type';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
Showhamburger: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log(props.Showhamburger);
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const userStore = useUserStore();
|
const userStore = useUserStore();
|
||||||
const settingsStore = useSettingsStore();
|
const settingsStore = useSettingsStore();
|
||||||
@@ -64,9 +82,9 @@ const navType = computed(() => settingsStore.navType);
|
|||||||
// 是否切换了租户
|
// 是否切换了租户
|
||||||
const dynamic = ref(true);
|
const dynamic = ref(true);
|
||||||
|
|
||||||
// const toggleSideBar = () => {
|
const toggleSideBar = () => {
|
||||||
// appStore.toggleSideBar(false);
|
appStore.toggleSideBar(false);
|
||||||
// };
|
};
|
||||||
|
|
||||||
const logout = async () => {
|
const logout = async () => {
|
||||||
await ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
await ElMessageBox.confirm('确定注销并退出系统吗?', '提示', {
|
||||||
@@ -133,10 +151,6 @@ watch(
|
|||||||
top: 12px;
|
top: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
|
|
||||||
.align-center {
|
.align-center {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@@ -145,42 +159,31 @@ watch(
|
|||||||
height: 50px;
|
height: 50px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
// background: #1a75ff;
|
|
||||||
background: #dfedff;
|
background: #dfedff;
|
||||||
// border-bottom: 1px solid #1a75ff;
|
|
||||||
border-bottom: 1px solid #dfedff;
|
border-bottom: 1px solid #dfedff;
|
||||||
|
|
||||||
color: #fff;
|
|
||||||
color: #c0c4cc;
|
color: #c0c4cc;
|
||||||
|
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
// padding: 0 8px;
|
justify-content: space-between;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.hamburger-container {
|
.hamburger-container {
|
||||||
line-height: 46px;
|
line-height: 46px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
//float: left;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.3s;
|
transition: background 0.3s;
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--el-fill-color-lighter);
|
background: #fafafa52;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb-container {
|
|
||||||
//float: left;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.topmenu-container {
|
.topmenu-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50px;
|
left: 50px;
|
||||||
@@ -201,13 +204,10 @@ watch(
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right-menu {
|
.right-menu {
|
||||||
//float: right;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-left: auto;
|
|
||||||
|
|
||||||
&:focus {
|
&:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
@@ -225,10 +225,6 @@ watch(
|
|||||||
&.hover-effect {
|
&.hover-effect {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.3s;
|
transition: background 0.3s;
|
||||||
|
|
||||||
// &:hover {
|
|
||||||
// background: var(--el-fill-color-lighter);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@
|
|||||||
<el-divider />
|
<el-divider />
|
||||||
|
|
||||||
<el-button type="primary" plain icon="DocumentAdd" @click="saveSetting">保存配置</el-button>
|
<el-button type="primary" plain icon="DocumentAdd" @click="saveSetting">保存配置</el-button>
|
||||||
<el-button plain icon="Refresh" @click="resetSetting">重置配置</el-button>
|
<el-button plain @click="resetSetting">重置配置</el-button>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ const setLayout = () => {
|
|||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.main-container {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.drawer-bg {
|
.drawer-bg {
|
||||||
background: #000;
|
background: #000;
|
||||||
|
|||||||
@@ -89,13 +89,14 @@ export const constantRoutes: RouteRecordRaw[] = [
|
|||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
redirect: '/equipment/WaterDevice',
|
redirect: '/index',
|
||||||
|
// redirect: '/equipment/WaterDevice',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/index',
|
path: '/index',
|
||||||
component: () => import('@/views/workbench/index2.vue'),
|
component: () => import('@/views/workbench/index2.vue'),
|
||||||
name: 'Index',
|
name: 'Index',
|
||||||
hidden: true,
|
// hidden: true,
|
||||||
meta: { title: '工作台', icon: 'dashboard', affix: true }
|
meta: { title: '工作台', icon: 'dashboard', affix: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -220,14 +220,19 @@ export const getTime = (type: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Function} func
|
* 创建一个防抖函数,确保在指定的等待时间内只执行一次目标函数。
|
||||||
* @param {number} wait
|
*
|
||||||
* @param {boolean} immediate
|
* @param func - 需要被防抖处理的目标函数
|
||||||
* @return {*}
|
* @param wait - 等待时间(毫秒),在此时间内重复调用将重置计时器
|
||||||
|
* @param immediate - 是否立即执行。如果为 true,则在第一次调用时立即执行函数,并在等待期结束后才能再次触发;如果为 false,则在等待期结束后执行最后一次调用
|
||||||
|
* @returns 返回一个新的防抖函数,该函数在被调用时会应用防抖逻辑
|
||||||
*/
|
*/
|
||||||
export const debounce = (func: any, wait: number, immediate: boolean) => {
|
export const debounce = (func: any, wait: number, immediate: boolean) => {
|
||||||
let timeout: any, args: any, context: any, timestamp: any, result: any;
|
let timeout: any, args: any, context: any, timestamp: any, result: any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 延迟执行的内部函数,用于判断是否真正执行目标函数
|
||||||
|
*/
|
||||||
const later = function () {
|
const later = function () {
|
||||||
// 据上一次触发时间间隔
|
// 据上一次触发时间间隔
|
||||||
const last = +new Date() - timestamp;
|
const last = +new Date() - timestamp;
|
||||||
|
|||||||
@@ -40,8 +40,7 @@ const whiteVillageId = [
|
|||||||
'/village',
|
'/village',
|
||||||
'/village/*',
|
'/village/*',
|
||||||
'/waterDevice/generateBarCode', // 水表 条码
|
'/waterDevice/generateBarCode', // 水表 条码
|
||||||
'/electricityDevice/generateBarCodee', // 电表 条码
|
'/electricityDevice/generateBarCode', // 电表 条码
|
||||||
|
|
||||||
'/payRecordList/payRecordList/list'
|
'/payRecordList/payRecordList/list'
|
||||||
// 以后直接在这里加新地址,支持 /xxx/*、/xxx/xxx 写法
|
// 以后直接在这里加新地址,支持 /xxx/*、/xxx/xxx 写法
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="box">
|
<div class="box">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span>智慧物业后台管理系统</span>
|
<span>智慧物业后台管理系统</span>
|
||||||
<navbar ref="navbarRef" />
|
<navbar :Showhamburger="false" ref="navbarRef" />
|
||||||
</div>
|
</div>
|
||||||
<div class="container AddBuildingBox">
|
<div class="container AddBuildingBox">
|
||||||
<el-form inline class="formBody" ref="formRef" :model="form" :rules="rules" label-width="100px">
|
<el-form inline class="formBody" ref="formRef" :model="form" :rules="rules" label-width="100px">
|
||||||
@@ -185,7 +185,6 @@ function getCommunityinfo() {
|
|||||||
const id = editId.value;
|
const id = editId.value;
|
||||||
getVillageByIdAPI(id).then((res) => {
|
getVillageByIdAPI(id).then((res) => {
|
||||||
city.value = res.data.city.split('/');
|
city.value = res.data.city.split('/');
|
||||||
console.log(res.data.city.split('/'));
|
|
||||||
if (res.data.villageImageUrl) {
|
if (res.data.villageImageUrl) {
|
||||||
villageImg.value = res.data.villageImageUrl
|
villageImg.value = res.data.villageImageUrl
|
||||||
.split(',')
|
.split(',')
|
||||||
@@ -311,25 +310,25 @@ const submitForm = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function submitFormInfo() {
|
function submitFormInfo() {
|
||||||
if (form.value.managePhone.trim()) {
|
if (form.value.managePhone && form.value.managePhone.trim()) {
|
||||||
if (!reg.phone.test(form.value.managePhone)) {
|
if (!reg.phone.test(form.value.managePhone)) {
|
||||||
ElMessage.error('请输入正确的手机号码');
|
ElMessage.error('请输入正确的手机号码');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (form.value.manageVx.trim()) {
|
if (form.value.manageVx && form.value.manageVx.trim()) {
|
||||||
if (!reg.wechat.test(form.value.manageVx)) {
|
if (!reg.wechat.test(form.value.manageVx)) {
|
||||||
ElMessage.error('请输入正确的微信号');
|
ElMessage.error('请输入正确的微信号');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (form.value.manageQq.trim()) {
|
if (form.value.manageQq && form.value.manageQq.trim()) {
|
||||||
if (!reg.qq.test(form.value.manageQq)) {
|
if (!reg.qq.test(form.value.manageQq)) {
|
||||||
ElMessage.error('请输入正确的QQ号码');
|
ElMessage.error('请输入正确的QQ号码');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (form.value.manageEmail.trim()) {
|
if (form.value.manageEmail && form.value.manageEmail.trim()) {
|
||||||
if (!reg.email.test(form.value.manageEmail)) {
|
if (!reg.email.test(form.value.manageEmail)) {
|
||||||
ElMessage.error('请输入正确的邮箱号码');
|
ElMessage.error('请输入正确的邮箱号码');
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="h-full box">
|
<div class="h-full box">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="">智慧物业后台管理系统</span>
|
<span class="">智慧物业后台管理系统</span>
|
||||||
<navbar ref="navbarRef" />
|
<navbar :Showhamburger="false" ref="navbarRef" />
|
||||||
</div>
|
</div>
|
||||||
<div class="containerbox">
|
<div class="containerbox">
|
||||||
<div class="community_nav_box">
|
<div class="community_nav_box">
|
||||||
@@ -95,6 +95,7 @@ function handleEdit(item: communitylist_rows_type) {
|
|||||||
/** 管理小区 */
|
/** 管理小区 */
|
||||||
function handleclick(item: communitylist_rows_type) {
|
function handleclick(item: communitylist_rows_type) {
|
||||||
switchVillageAPI(item.villageId).then(() => {
|
switchVillageAPI(item.villageId).then(() => {
|
||||||
|
localStorage.setItem('villageInfo', JSON.stringify(item));
|
||||||
localStorage.setItem('villageid', item.villageId);
|
localStorage.setItem('villageid', item.villageId);
|
||||||
houseStore.getviliageinfo(item.villageId);
|
houseStore.getviliageinfo(item.villageId);
|
||||||
router.push({
|
router.push({
|
||||||
@@ -200,12 +201,15 @@ function handleclick(item: communitylist_rows_type) {
|
|||||||
|
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, 1fr);
|
grid-template-columns: repeat(5, 1fr);
|
||||||
@media (max-width: 1900px) {
|
@media (max-width: 2350px) {
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
}
|
}
|
||||||
@media (max-width: 1500px) {
|
@media (max-width: 1900px) {
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
}
|
}
|
||||||
|
@media (max-width: 1450px) {
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
}
|
||||||
.coummunity_card {
|
.coummunity_card {
|
||||||
min-width: 369px;
|
min-width: 369px;
|
||||||
max-width: 369px;
|
max-width: 369px;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="key键" prop="testKey">
|
<el-form-item label="key键" prop="testKey">
|
||||||
<el-input v-model="queryParams.testKey" placeholder="请输入key键" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.testKey" placeholder="请输入key键" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
<el-input v-model="queryParams.value" placeholder="请输入值" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.value" placeholder="请输入值" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<el-button v-hasPermi="['demo:demo:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
<el-button v-hasPermi="['demo:demo:add']" type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['demo:demo:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()">修改</el-button>
|
<el-button v-hasPermi="['demo:demo:edit']" type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()">编辑</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['demo:demo:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
<el-button v-hasPermi="['demo:demo:remove']" type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()"
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="树节点名" prop="treeName">
|
<el-form-item label="树节点名" prop="treeName">
|
||||||
<el-input v-model="queryParams.treeName" placeholder="请输入树节点名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.treeName" placeholder="请输入树节点名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="h-full flex flex-col p-2">
|
||||||
<pageheader></pageheader>
|
<pageheader></pageheader>
|
||||||
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="登录地址" prop="ipaddr">
|
<el-form-item label="登录地址" prop="ipaddr">
|
||||||
<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -29,15 +29,15 @@
|
|||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<el-card shadow="hover">
|
<el-card class="flex-1" shadow="hover">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -209,3 +209,9 @@ onMounted(() => {
|
|||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<div class="mb-[10px]">
|
<div class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="登录地址" prop="ipaddr">
|
<el-form-item label="登录地址" prop="ipaddr">
|
||||||
<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.ipaddr" placeholder="请输入登录地址" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="flex flex-col h-full p-2">
|
||||||
<pageheader></pageheader>
|
<pageheader></pageheader>
|
||||||
|
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="操作地址" prop="operIp">
|
<el-form-item label="操作地址" prop="operIp">
|
||||||
<el-input v-model="queryParams.operIp" placeholder="请输入操作地址" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.operIp" placeholder="请输入操作地址" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -37,15 +37,15 @@
|
|||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<el-card shadow="hover">
|
<el-card class="flex-1" shadow="hover">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -89,7 +89,6 @@
|
|||||||
sortable="custom"
|
sortable="custom"
|
||||||
:sort-orders="['descending', 'ascending']"
|
:sort-orders="['descending', 'ascending']"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="部门" align="center" prop="deptName" width="130" :show-overflow-tooltip="true" />
|
|
||||||
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
<el-table-column label="操作地址" align="center" prop="operIp" width="130" :show-overflow-tooltip="true" />
|
||||||
<el-table-column label="操作状态" align="center" prop="status">
|
<el-table-column label="操作状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
@@ -261,3 +260,9 @@ onMounted(() => {
|
|||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-table {
|
||||||
|
height: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col h-full p-2">
|
<div class="flex flex-col h-full p-2">
|
||||||
<Pageheader title="活动管理"></Pageheader>
|
<Pageheader></Pageheader>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="标题" prop="title">
|
<el-form-item label="标题" prop="title">
|
||||||
<el-input v-model="queryParams.title" placeholder="请输入标题" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.title" placeholder="请输入标题" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:activity']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['activity:activity:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['repair:edit:activity']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['repair:edit:activity']"
|
||||||
@@ -32,8 +32,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['activity:activity:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['activity:activity:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['activity:activity:add'])"
|
||||||
|
:show-edit="checkPermi(['activity:activity:edit'])"
|
||||||
|
:show-delete="checkPermi(['activity:activity:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -50,9 +59,9 @@
|
|||||||
<el-table-column label="发布人" align="center" prop="createName" />
|
<el-table-column label="发布人" align="center" prop="createName" />
|
||||||
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
<el-table-column label="操作" align="center" width="300px" fixed="right">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<!-- TODO 发布按钮 -->
|
<!-- TODO 发布按钮!!! -->
|
||||||
<el-button v-if="scope.row.status === '0'" link type="primary" @click="handleSend(scope.row)">发布</el-button>
|
<el-button v-if="scope.row.status === '0'" link type="primary" @click="handleSend(scope.row)">发布</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:activity']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['activity:activity:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['activity:activity:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['activity:activity:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -83,6 +92,7 @@
|
|||||||
<script setup name="Activity" lang="ts">
|
<script setup name="Activity" lang="ts">
|
||||||
import { listActivity, delActivity, updateActivity } from '@/api/system/Activity/index';
|
import { listActivity, delActivity, updateActivity } from '@/api/system/Activity/index';
|
||||||
import { ActivityVO, ActivityQuery, ActivityForm } from '@/api/system/Activity/type';
|
import { ActivityVO, ActivityQuery, ActivityForm } from '@/api/system/Activity/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_publish_status } = toRefs<any>(proxy?.useDict('com_publish_status'));
|
const { com_publish_status } = toRefs<any>(proxy?.useDict('com_publish_status'));
|
||||||
@@ -189,10 +199,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ActivityVO) => {
|
const handleUpdate = async (row?: ActivityVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/editActivity',
|
path: '/repair/editActivity',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="名称" prop="name">
|
<el-form-item label="名称" prop="name">
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.name" placeholder="请输入名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['banner:banner:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['banner:banner:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -32,8 +32,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['banner:banner:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['banner:banner:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['banner:banner:add'])"
|
||||||
|
:show-edit="checkPermi(['banner:banner:edit'])"
|
||||||
|
:show-delete="checkPermi(['banner:banner:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -53,21 +62,17 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="名称" align="center" prop="name" />
|
<el-table-column label="名称" align="center" prop="name" />
|
||||||
<el-table-column label="状态 0启用 1停用" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch inactive-text="启用" active-text="停用" inactive-value="0" active-value="1" v-model="scope.row.status"></el-switch>
|
<el-switch inactive-value="0" active-value="1" v-model="scope.row.status"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="排序" align="center" prop="order" />
|
<el-table-column label="排序" align="center" prop="order" />
|
||||||
<el-table-column label="添加时间" align="center" prop="order" />
|
<el-table-column label="添加时间" align="center" prop="order" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['banner:banner:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['banner:banner:edit']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['banner:banner:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['banner:banner:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -100,6 +105,7 @@
|
|||||||
<script setup name="Banner" lang="ts">
|
<script setup name="Banner" lang="ts">
|
||||||
import { listBanner, getBanner, delBanner, addBanner, updateBanner } from '@/api/system/Banner';
|
import { listBanner, getBanner, delBanner, addBanner, updateBanner } from '@/api/system/Banner';
|
||||||
import { BannerVO, BannerQuery, BannerForm } from '@/api/system/Banner/type';
|
import { BannerVO, BannerQuery, BannerForm } from '@/api/system/Banner/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -192,10 +198,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: BannerVO) => {
|
const handleUpdate = async (row?: BannerVO) => {
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/system/addBanner',
|
path: '/system/editBanner',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -220,7 +227,7 @@ const submitForm = () => {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: BannerVO) => {
|
const handleDelete = async (row?: BannerVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除Banner图管理编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
await proxy?.$modal.confirm('是否确认删除该Banner图?').finally(() => (loading.value = false));
|
||||||
await delBanner(_ids);
|
await delBanner(_ids);
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
await getList();
|
await getList();
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
<el-input v-model="queryParams.complaintName" placeholder="请输入投诉人姓名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.complaintName" placeholder="请输入投诉人姓名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:main:complaint']">查看详情</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['complaint:complaint:query']">查看详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<el-input v-model="queryParams.name" placeholder="请输入投诉类型名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.name" placeholder="请输入投诉类型名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['complaintType:complaintType:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['complaintType:complaintType:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -38,8 +38,17 @@
|
|||||||
v-hasPermi="['complaintType:complaintType:remove']"
|
v-hasPermi="['complaintType:complaintType:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['complaintType:complaintType:add'])"
|
||||||
|
:show-edit="checkPermi(['complaintType:complaintType:edit'])"
|
||||||
|
:show-delete="checkPermi(['complaintType:complaintType:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -58,7 +67,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['complaintType:complaintType:edit']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['complaintType:complaintType:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['complaintType:complaintType:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['complaintType:complaintType:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -72,6 +81,7 @@
|
|||||||
<script setup name="ComplaintType" lang="ts">
|
<script setup name="ComplaintType" lang="ts">
|
||||||
import { listComplaintType, getComplaintType, delComplaintType, addComplaintType, updateComplaintType } from '@/api/system/ComplainType/index';
|
import { listComplaintType, getComplaintType, delComplaintType, addComplaintType, updateComplaintType } from '@/api/system/ComplainType/index';
|
||||||
import { ComplaintTypeVO, ComplaintTypeQuery, ComplaintTypeForm } from '@/api/system/ComplainType/type';
|
import { ComplaintTypeVO, ComplaintTypeQuery, ComplaintTypeForm } from '@/api/system/ComplainType/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
||||||
@@ -150,10 +160,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ComplaintTypeVO) => {
|
const handleUpdate = async (row?: ComplaintTypeVO) => {
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/system/addComplantType',
|
path: '/system/addComplantType',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:decoration']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:decoration']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -37,9 +37,18 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['decoration:decoration:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['decoration:decoration:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['decoration:decoration:add'])"
|
||||||
|
:show-edit="checkPermi(['decoration:decoration:edit'])"
|
||||||
|
:show-delete="checkPermi(['decoration:decoration:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -69,8 +78,8 @@
|
|||||||
v-hasPermi="['repair:edit:decoration']"
|
v-hasPermi="['repair:edit:decoration']"
|
||||||
>验收</el-button
|
>验收</el-button
|
||||||
>
|
>
|
||||||
<el-button link type="primary" v-else @click="handleInspection(scope.row)" v-hasPermi="['repair:edit:decoration']">详情</el-button>
|
<el-button link type="primary" v-else @click="handleInspection(scope.row)" v-hasPermi="['decoration:decoration:query']">详情</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:decoration']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['decoration:decoration:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['decoration:decoration:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['decoration:decoration:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -111,6 +120,7 @@
|
|||||||
<script setup name="Decoration" lang="ts">
|
<script setup name="Decoration" lang="ts">
|
||||||
import { listDecoration, delDecoration, updateDecoration } from '@/api/system/Decoration/index';
|
import { listDecoration, delDecoration, updateDecoration } from '@/api/system/Decoration/index';
|
||||||
import { DecorationVO, DecorationQuery, DecorationForm } from '@/api/system/Decoration/type';
|
import { DecorationVO, DecorationQuery, DecorationForm } from '@/api/system/Decoration/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_decoration_status } = toRefs<any>(proxy?.useDict('com_decoration_status'));
|
const { com_decoration_status } = toRefs<any>(proxy?.useDict('com_decoration_status'));
|
||||||
@@ -214,10 +224,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: DecorationVO) => {
|
const handleUpdate = async (row?: DecorationVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/editDecoration',
|
path: '/repair/editDecoration',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="ResidentMainBox p-2 w-full">
|
<div class="ResidentMainBox p-2 w-full">
|
||||||
<PageHeader title="办事编辑"></PageHeader>
|
<PageHeader></PageHeader>
|
||||||
<div class="ResidentMainBody">
|
<div class="ResidentMainBody">
|
||||||
<el-card>
|
<el-card>
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="求助人" prop="seekName">
|
<el-form-item label="求助人" prop="seekName">
|
||||||
<el-input v-model="queryParams.seekName" placeholder="请输入求助人" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.seekName" placeholder="请输入求助人" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:handlelog']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:handlelog']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -32,8 +32,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['handleLog:handleLog:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['handleLog:handleLog:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['handleLog:handleLog:add'])"
|
||||||
|
:show-edit="checkPermi(['handleLog:handleLog:edit'])"
|
||||||
|
:show-delete="checkPermi(['handleLog:handleLog:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -54,7 +63,7 @@
|
|||||||
<el-table-column label="办事地点" align="center" prop="handlePosition" />
|
<el-table-column label="办事地点" align="center" prop="handlePosition" />
|
||||||
<el-table-column label="操作" width="200" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="200" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:handlelog']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['handleLog:handleLog:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['handleLog:handleLog:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['handleLog:handleLog:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -68,6 +77,7 @@
|
|||||||
<script setup name="HandleLog" lang="ts">
|
<script setup name="HandleLog" lang="ts">
|
||||||
import { listHandleLog, getHandleLog, delHandleLog, addHandleLog, updateHandleLog } from '@/api/system/HandleLog/index';
|
import { listHandleLog, getHandleLog, delHandleLog, addHandleLog, updateHandleLog } from '@/api/system/HandleLog/index';
|
||||||
import { HandleLogVO, HandleLogQuery, HandleLogForm } from '@/api/system/HandleLog/type';
|
import { HandleLogVO, HandleLogQuery, HandleLogForm } from '@/api/system/HandleLog/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -148,10 +158,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: HandleLogVO) => {
|
const handleUpdate = async (row?: HandleLogVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/editHandleLog',
|
path: '/repair/editHandleLog',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="设施名称" prop="name">
|
<el-form-item label="设施名称" prop="name">
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入设施名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.name" placeholder="请输入设施名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['houseFacilities:houseFacilities:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['houseFacilities:houseFacilities:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -44,8 +44,17 @@
|
|||||||
v-hasPermi="['houseFacilities:houseFacilities:remove']"
|
v-hasPermi="['houseFacilities:houseFacilities:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['houseFacilities:houseFacilities:add'])"
|
||||||
|
:show-edit="checkPermi(['houseFacilities:houseFacilities:edit'])"
|
||||||
|
:show-delete="checkPermi(['houseFacilities:houseFacilities:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -59,7 +68,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseFacilities:houseFacilities:edit']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseFacilities:houseFacilities:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['houseFacilities:houseFacilities:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['houseFacilities:houseFacilities:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -79,6 +88,7 @@ import {
|
|||||||
updateHouseFacilities
|
updateHouseFacilities
|
||||||
} from '@/api/system/HouseFacilities/index';
|
} from '@/api/system/HouseFacilities/index';
|
||||||
import { HouseFacilitiesVO, HouseFacilitiesQuery, HouseFacilitiesForm } from '@/api/system/HouseFacilities/type';
|
import { HouseFacilitiesVO, HouseFacilitiesQuery, HouseFacilitiesForm } from '@/api/system/HouseFacilities/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
const { com_repair_project_status } = toRefs<any>(proxy?.useDict('com_repair_project_status'));
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<!-- <el-form-item label="月卡状态" prop="payMethod">
|
<!-- <el-form-item label="月卡状态" prop="payMethod">
|
||||||
<el-select v-model="queryParams.parkingStatus" placeholder="请选择" clearable>
|
<el-select v-model="queryParams.parkingStatus" placeholder="请选择" clearable>
|
||||||
<el-option v-for="dict in com_month_card_status" :key="dict.value" :label="dict.label" :value="Number(dict.value)" />
|
<el-option v-for="dict in com_month_card_status" :key="dict.value" :label="dict.label" :value="Number(dict.value)" />
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
<el-input v-model="queryParams.cardCode" placeholder="请输入月卡编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.cardCode" placeholder="请输入月卡编号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:monthcard']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:monthcard']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -37,8 +37,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['monthCard:monthCard:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['monthCard:monthCard:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['monthCard:monthCard:add'])"
|
||||||
|
:show-edit="checkPermi(['monthCard:monthCard:edit'])"
|
||||||
|
:show-delete="checkPermi(['monthCard:monthCard:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -70,12 +79,8 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark"></el-table-column>
|
<el-table-column label="备注" align="center" prop="remark"></el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['monthCard:monthCard:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['carArea:edit:monthcard']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['monthCard:monthCard:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['monthCard:monthCard:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -135,6 +140,7 @@
|
|||||||
<script setup name="MonthCard" lang="ts">
|
<script setup name="MonthCard" lang="ts">
|
||||||
import { listMonthCard, getMonthCard, delMonthCard, addMonthCard, updateMonthCard } from '@/api/system/MonthCard/index';
|
import { listMonthCard, getMonthCard, delMonthCard, addMonthCard, updateMonthCard } from '@/api/system/MonthCard/index';
|
||||||
import { MonthCardVO, MonthCardQuery, MonthCardForm } from '@/api/system/MonthCard/type';
|
import { MonthCardVO, MonthCardQuery, MonthCardForm } from '@/api/system/MonthCard/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
import { diffDays } from '@/utils/time';
|
import { diffDays } from '@/utils/time';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@@ -246,8 +252,8 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: MonthCardVO) => {
|
const handleUpdate = async (row?: MonthCardVO) => {
|
||||||
reset();
|
|
||||||
const _id = row?.id || ids.value[0];
|
const _id = row?.id || ids.value[0];
|
||||||
|
// reset();
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/editMonthCard',
|
path: '/carArea/editMonthCard',
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="公告标题" prop="noticeTitle">
|
<el-form-item label="公告标题" prop="noticeTitle">
|
||||||
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:noticepc']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:noticepc']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -32,8 +32,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['notice:notice:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['notice:notice:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['notice:notice:add'])"
|
||||||
|
:show-edit="checkPermi(['notice:notice:edit'])"
|
||||||
|
:show-delete="checkPermi(['notice:notice:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -61,7 +70,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="220" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="220" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:noticepc']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['notice:notice:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['notice:notice:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['notice:notice:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -75,6 +84,7 @@
|
|||||||
<script setup name="Notice" lang="ts">
|
<script setup name="Notice" lang="ts">
|
||||||
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from '@/api/system/NoticePc/index';
|
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from '@/api/system/NoticePc/index';
|
||||||
import { NoticeVO, NoticeQuery, NoticeForm } from '@/api/system/NoticePc/type';
|
import { NoticeVO, NoticeQuery, NoticeForm } from '@/api/system/NoticePc/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_noticepc_level } = toRefs<any>(proxy?.useDict('com_noticepc_level'));
|
const { com_noticepc_level } = toRefs<any>(proxy?.useDict('com_noticepc_level'));
|
||||||
@@ -167,10 +177,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: NoticeVO) => {
|
const handleUpdate = async (row?: NoticeVO) => {
|
||||||
|
const _id = row.noticeId || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/editNoticePc',
|
path: '/repair/editNoticePc',
|
||||||
query: {
|
query: {
|
||||||
id: row.noticeId
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="缴费人" prop="payerName">
|
<el-form-item label="缴费人" prop="payerName">
|
||||||
<el-input v-model="queryParams.payerName" placeholder="请输入缴费人" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.payerName" placeholder="请输入缴费人" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
<el-input v-model="queryParams.carNum" placeholder="请输入车牌号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.carNum" placeholder="请输入车牌号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:parkingcost']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:parkingcost']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -35,8 +35,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['parkingCost:parkingCost:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['parkingCost:parkingCost:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['parkingCost:parkingCost:add'])"
|
||||||
|
:show-edit="checkPermi(['parkingCost:parkingCost:edit'])"
|
||||||
|
:show-delete="checkPermi(['parkingCost:parkingCost:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -73,18 +82,8 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['parkingCost:parkingCost:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['carArea:edit:parkingcost']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['parkingCost:parkingCost:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Delete"
|
|
||||||
@click="handleDelete(scope.row)"
|
|
||||||
v-hasPermi="['parkingCost:parkingCost:remove']"
|
|
||||||
></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -99,6 +98,7 @@ import { listArea } from '@/api/system/carArea';
|
|||||||
import { listParking } from '@/api/system/parking';
|
import { listParking } from '@/api/system/parking';
|
||||||
import { listParkingCost, getParkingCost, delParkingCost, addParkingCost, updateParkingCost } from '@/api/system/ParkingCost';
|
import { listParkingCost, getParkingCost, delParkingCost, addParkingCost, updateParkingCost } from '@/api/system/ParkingCost';
|
||||||
import { ParkingCostVO, ParkingCostQuery, ParkingCostForm } from '@/api/system/ParkingCost/type';
|
import { ParkingCostVO, ParkingCostQuery, ParkingCostForm } from '@/api/system/ParkingCost/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
import { formatTimeDiff } from '@/utils/time';
|
import { formatTimeDiff } from '@/utils/time';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@@ -199,10 +199,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ParkingCostVO) => {
|
const handleUpdate = async (row?: ParkingCostVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/editParkingCost',
|
path: '/carArea/editParkingCost',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="问卷标题" prop="title">
|
<el-form-item label="问卷标题" prop="title">
|
||||||
<el-input v-model="queryParams.title" placeholder="请输入问卷标题" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.title" placeholder="请输入问卷标题" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
<el-input v-model="queryParams.scope" placeholder="请输入参与范围 0全体业主 1部分业主" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.scope" placeholder="请输入参与范围 0全体业主 1部分业主" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:questionnaire']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:questionnaire']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -41,8 +41,17 @@
|
|||||||
v-hasPermi="['questionnaire:questionnaire:remove']"
|
v-hasPermi="['questionnaire:questionnaire:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['questionnaire:questionnaire:add'])"
|
||||||
|
:show-edit="checkPermi(['questionnaire:questionnaire:edit'])"
|
||||||
|
:show-delete="checkPermi(['questionnaire:questionnaire:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -63,8 +72,8 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" width="200">
|
<el-table-column label="操作" align="center" fixed="right" width="200">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['repair:main:questionnaire']">查看</el-button>
|
<el-button link type="primary" @click="handleView(scope.row)" v-hasPermi="['questionnaire:questionnaire:query']">查看</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:questionnaire']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['questionnaire:questionnaire:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['questionnaire:questionnaire:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['questionnaire:questionnaire:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -78,6 +87,7 @@
|
|||||||
<script setup name="Questionnaire" lang="ts">
|
<script setup name="Questionnaire" lang="ts">
|
||||||
import { listQuestionnaire, getQuestionnaire, delQuestionnaire, addQuestionnaire, updateQuestionnaire } from '@/api/system/Questionnaire/index';
|
import { listQuestionnaire, getQuestionnaire, delQuestionnaire, addQuestionnaire, updateQuestionnaire } from '@/api/system/Questionnaire/index';
|
||||||
import { QuestionnaireVO, QuestionnaireQuery, QuestionnaireForm } from '@/api/system/Questionnaire/type';
|
import { QuestionnaireVO, QuestionnaireQuery, QuestionnaireForm } from '@/api/system/Questionnaire/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -185,10 +195,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: QuestionnaireVO) => {
|
const handleUpdate = async (row?: QuestionnaireVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/editQuestionnaire',
|
path: '/repair/editQuestionnaire',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -222,7 +233,7 @@ const submitForm = () => {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
const handleDelete = async (row?: QuestionnaireVO) => {
|
const handleDelete = async (row?: QuestionnaireVO) => {
|
||||||
const _ids = row?.id || ids.value;
|
const _ids = row?.id || ids.value;
|
||||||
await proxy?.$modal.confirm('是否确认删除问卷调查编号为"' + _ids + '"的数据项?').finally(() => (loading.value = false));
|
await proxy?.$modal.confirm('是否确认删除问卷调查?').finally(() => (loading.value = false));
|
||||||
await delQuestionnaire(_ids);
|
await delQuestionnaire(_ids);
|
||||||
proxy?.$modal.msgSuccess('删除成功');
|
proxy?.$modal.msgSuccess('删除成功');
|
||||||
await getList();
|
await getList();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="报修状态" prop="problemStatus">
|
<el-form-item label="报修状态" prop="problemStatus">
|
||||||
<el-select v-model="queryParams.problemStatus" placeholder="请选择" clearable>
|
<el-select v-model="queryParams.problemStatus" placeholder="请选择" clearable>
|
||||||
<el-option v-for="dict in com_repair_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in com_repair_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button style="width: 120px" type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:repair']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repair:add:repair']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['repair:edit:repair']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['repair:edit:repair']"
|
||||||
@@ -44,8 +44,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['repair:repair:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['repair:repair:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['repair:repair:add'])"
|
||||||
|
:show-edit="checkPermi(['repair:repair:edit'])"
|
||||||
|
:show-delete="checkPermi(['repair:repair:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -68,10 +77,10 @@
|
|||||||
|
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleShare(scope.row)" v-hasPermi="['repair:main:repair']">{{
|
<el-button link type="primary" @click="handleShare(scope.row)" v-hasPermi="['repair:repair:query']">{{
|
||||||
scope.row.problemStatus === '0' ? '分配' : '详情'
|
scope.row.problemStatus === '0' ? '分配' : '详情'
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:edit:repair']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repair:repair:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['repair:repair:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['repair:repair:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -87,6 +96,7 @@ import { listRepair, delRepair } from '@/api/system/Repair/index';
|
|||||||
import { RepairVO, RepairQuery, RepairForm } from '@/api/system/Repair/type';
|
import { RepairVO, RepairQuery, RepairForm } from '@/api/system/Repair/type';
|
||||||
import { listRepairProject } from '@/api/system/RepairProject';
|
import { listRepairProject } from '@/api/system/RepairProject';
|
||||||
import { listResident } from '@/api/system/resident';
|
import { listResident } from '@/api/system/resident';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_repair_status } = toRefs<any>(proxy?.useDict('com_repair_status'));
|
const { com_repair_status } = toRefs<any>(proxy?.useDict('com_repair_status'));
|
||||||
@@ -188,19 +198,21 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: RepairVO) => {
|
const handleUpdate = async (row?: RepairVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/editRepair',
|
path: '/repair/editRepair',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
/** 分配人员 */
|
/** 分配人员 */
|
||||||
const handleShare = (row) => {
|
const handleShare = (row) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/repair/repairMain',
|
path: '/repair/repairMain',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<el-input v-model="queryParams.projectName" placeholder="请输入维修项目名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.projectName" placeholder="请输入维修项目名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-button style="width: 100px" type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repairProject:repairProject:add']"
|
<!-- <el-button style="width: 100px" type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['repairProject:repairProject:add']"
|
||||||
>新增维修类</el-button
|
>新增维修类</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@@ -31,8 +31,17 @@
|
|||||||
@click="handleDelete()"
|
@click="handleDelete()"
|
||||||
v-hasPermi="['repairProject:repairProject:remove']"
|
v-hasPermi="['repairProject:repairProject:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['repairProject:repairProject:add'])"
|
||||||
|
:show-edit="checkPermi(['repairProject:repairProject:edit'])"
|
||||||
|
:show-delete="checkPermi(['repairProject:repairProject:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -67,7 +76,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改</el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)">编辑</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -88,7 +97,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="350" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="350" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repairProject:repairProject:edit']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['repairProject:repairProject:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['repairProject:repairProject:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['repairProject:repairProject:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -146,6 +155,7 @@ import {
|
|||||||
gettreelistRepairProject
|
gettreelistRepairProject
|
||||||
} from '@/api/system/RepairProject/index';
|
} from '@/api/system/RepairProject/index';
|
||||||
import { RepairProjectVO, RepairProjectQuery, RepairProjectForm } from '@/api/system/RepairProject/type';
|
import { RepairProjectVO, RepairProjectQuery, RepairProjectForm } from '@/api/system/RepairProject/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -264,10 +274,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: RepairProjectVO) => {
|
const handleUpdate = async (row?: RepairProjectVO) => {
|
||||||
|
const _id = row?.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/system/editRepairProjectList',
|
path: '/system/editRepairProjectList',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" :inline="true" @submit.prevent="handleQuery">
|
||||||
<el-form-item label="项目名称" prop="itemName">
|
<el-form-item label="项目名称" prop="itemName">
|
||||||
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter.prevent="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,20 +20,16 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<right-toolbar
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['sdb:add:chargeitem']">新增</el-button>
|
:disable-delete="multiple"
|
||||||
</el-col>
|
:disable-edit="single"
|
||||||
<el-col :span="1.5">
|
:show-edit="checkPermi(['chargeItem:chargeItem:edit'])"
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['sdb:edit:chargeitem']"
|
:show-add="checkPermi(['chargeItem:chargeItem:add'])"
|
||||||
>修改</el-button
|
:show-delete="checkPermi(['chargeItem:chargeItem:remove'])"
|
||||||
>
|
@update:add="handleAdd"
|
||||||
</el-col>
|
@update:edit="handleUpdate()"
|
||||||
<el-col :span="1.5">
|
@update:delete="handleDelete()"
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['chargeItem:chargeItem:remove']"
|
></right-toolbar>
|
||||||
>删除</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -75,8 +71,6 @@
|
|||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch
|
||||||
@change="(val: string) => handleSwitch(val, scope.row)"
|
@change="(val: string) => handleSwitch(val, scope.row)"
|
||||||
inactive-text="停用"
|
|
||||||
active-text="启用"
|
|
||||||
inactive-value="1"
|
inactive-value="1"
|
||||||
active-value="0"
|
active-value="0"
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
@@ -85,7 +79,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['sdb:edit:chargeitem']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['chargeItem:chargeItem:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['chargeItem:chargeItem:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['chargeItem:chargeItem:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -99,6 +93,7 @@
|
|||||||
<script setup name="ChargeItem" lang="ts">
|
<script setup name="ChargeItem" lang="ts">
|
||||||
import { listChargeItem, getChargeItem, delChargeItem, addChargeItem, updateChargeItem, changChargeItem } from '@/api/system/SdbChargeItem';
|
import { listChargeItem, getChargeItem, delChargeItem, addChargeItem, updateChargeItem, changChargeItem } from '@/api/system/SdbChargeItem';
|
||||||
import { ChargeItemVO, ChargeItemQuery, ChargeItemForm } from '@/api/system/SdbChargeItem/type';
|
import { ChargeItemVO, ChargeItemQuery, ChargeItemForm } from '@/api/system/SdbChargeItem/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_charge_item_method } = toRefs<any>(proxy?.useDict('com_charge_item_method'));
|
const { com_charge_item_method } = toRefs<any>(proxy?.useDict('com_charge_item_method'));
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" label-width="120" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" label-width="120" :inline="true">
|
||||||
<el-form-item label="收费类型名称" prop="name">
|
<el-form-item label="收费类型名称" prop="name">
|
||||||
<el-input v-model="queryParams.name" placeholder="请输入收费类型名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.name" placeholder="请输入收费类型名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['chargeType:chargeType:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['chargeType:chargeType:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -32,8 +32,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['chargeType:chargeType:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['chargeType:chargeType:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['chargeType:chargeType:add'])"
|
||||||
|
:show-edit="checkPermi(['chargeType:chargeType:edit'])"
|
||||||
|
:show-delete="checkPermi(['chargeType:chargeType:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -45,21 +54,15 @@
|
|||||||
<el-switch
|
<el-switch
|
||||||
@change="(val: string) => handleChange(val, scope.row)"
|
@change="(val: string) => handleChange(val, scope.row)"
|
||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
active-text="启用"
|
|
||||||
active-value="0"
|
active-value="0"
|
||||||
inactive-text="停用"
|
|
||||||
inactive-value="1"
|
inactive-value="1"
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['chargeType:chargeType:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['chargeType:chargeType:edit']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['chargeType:chargeType:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['chargeType:chargeType:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -86,6 +89,7 @@
|
|||||||
<script setup name="ChargeType" lang="ts">
|
<script setup name="ChargeType" lang="ts">
|
||||||
import { listChargeType, getChargeType, delChargeType, addChargeType, updateChargeType } from '@/api/system/ChargeType';
|
import { listChargeType, getChargeType, delChargeType, addChargeType, updateChargeType } from '@/api/system/ChargeType';
|
||||||
import { ChargeTypeVO, ChargeTypeQuery, ChargeTypeForm, ChargeType2Query } from '@/api/system/ChargeType/type';
|
import { ChargeTypeVO, ChargeTypeQuery, ChargeTypeForm, ChargeType2Query } from '@/api/system/ChargeType/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="用户ID" prop="deviceCode">
|
<el-form-item label="用户ID" prop="deviceCode">
|
||||||
<el-input v-model="queryParams.deviceCode" placeholder="请输入用户ID" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.deviceCode" placeholder="请输入用户ID" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
<el-input v-model="queryParams.rangeFee" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.rangeFee" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
>导出</el-button
|
>导出</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="仪表名称" prop="houseId">
|
<el-form-item label="仪表名称" prop="houseId">
|
||||||
<el-input v-model="queryParams.houseId" placeholder="请输入仪表名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.houseId" placeholder="请输入仪表名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,15 +20,28 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['sdb:add:payrecord']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['payRecordList:payRecordList:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['payRecord:payRecord:remove']"
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete()"
|
||||||
|
v-hasPermi="['payRecordList:payRecordList:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:show-edit="false"
|
||||||
|
:show-add="checkPermi(['payRecordList:payRecordList:add'])"
|
||||||
|
:show-delete="checkPermi(['payRecordList:payRecordList:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -80,6 +93,7 @@
|
|||||||
<script setup name="PayRecord" lang="ts">
|
<script setup name="PayRecord" lang="ts">
|
||||||
import { listPayRecord, getPayRecord, delPayRecord, addPayRecord, updatePayRecord } from '@/api/system/SdbPayRecord';
|
import { listPayRecord, getPayRecord, delPayRecord, addPayRecord, updatePayRecord } from '@/api/system/SdbPayRecord';
|
||||||
import { PayRecordVO, PayRecordQuery, PayRecordForm } from '@/api/system/SdbPayRecord/type';
|
import { PayRecordVO, PayRecordQuery, PayRecordForm } from '@/api/system/SdbPayRecord/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_waterelectricity_topup_type } = toRefs<any>(proxy?.useDict('com_waterelectricity_topup_type'));
|
const { com_waterelectricity_topup_type } = toRefs<any>(proxy?.useDict('com_waterelectricity_topup_type'));
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<div class="flex flex-items-center justify-between">
|
<div class="flex flex-items-center justify-between">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="精准查询">
|
<el-form-item label="精准查询">
|
||||||
<el-select v-model="queryParamsType" style="width: 160px; margin-right: 20px">
|
<el-select v-model="queryParamsType" style="width: 160px; margin-right: 20px">
|
||||||
<el-option v-for="item in deviceCodeList" :key="item.value" :label="item.name" :value="item.value"></el-option>
|
<el-option v-for="item in deviceCodeList" :key="item.value" :label="item.name" :value="item.value"></el-option>
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
<el-input v-model="queryParamsValue" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParamsValue" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-button @click="confimu">返回</el-button>
|
<el-button @click="confimu">返回</el-button>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -13,27 +13,35 @@
|
|||||||
<el-option v-for="(item, index) in chargeitemlist" :key="index" :value="item.id" :label="item.itemName"></el-option>
|
<el-option v-for="(item, index) in chargeitemlist" :key="index" :value="item.id" :label="item.itemName"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="收费范围" prop="chargeScope">
|
<!-- 水费,电费, 收费范围为 房屋 -->
|
||||||
|
<el-form-item label="收费范围" prop="chargeScope" v-if="typeNamelist.includes(typeName)">
|
||||||
<el-radio-group v-model="form.chargeScope">
|
<el-radio-group v-model="form.chargeScope">
|
||||||
<el-radio v-for="(item, index) in com_bill_charge_scope_house" :key="index" :value="item.value" :label="item.label"></el-radio>
|
<el-radio v-for="(item, index) in com_bill_charge_scope_house" :key="index" :value="item.value" :label="item.label"></el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<div @click="handleClearCheckout" v-if="form.chargeScope === '1'" class="ml-10px cursor-pointer color-red">清空</div>
|
<div @click="handleClearCheckout" v-if="form.chargeScope === '1'" class="ml-10px cursor-pointer color-red">清空</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.chargeScope === '1'">
|
<!-- 其他费用, 收费范围为 业主 -->
|
||||||
|
<el-form-item label="收费范围" prop="chargeScope" v-else>
|
||||||
|
<el-radio-group v-model="form.chargeScope">
|
||||||
|
<el-radio v-for="(item, index) in com_questionnaire_scope" :key="index" :value="item.value" :label="item.label"></el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
<div @click="handleClearCheckout" v-if="form.chargeScope === '1'" class="ml-10px cursor-pointer color-red">清空</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.chargeScope === '1' && typeNamelist.includes(typeName)">
|
||||||
<div class="residentBox">
|
<div class="residentBox">
|
||||||
<ul class="checkoutSideUsesbox">
|
<ul class="checkoutSideUsesbox">
|
||||||
<li v-for="(item, index) in checkoutUses" :key="index">
|
<li v-for="(item, index) in checkoutHouses" :key="index">
|
||||||
<span>{{ item.buildingName }}/</span>
|
<span>{{ item.buildingName }}/</span>
|
||||||
<span>{{ item.unitNo }}单元/</span>
|
<span>{{ item.unitNo }}单元/</span>
|
||||||
<span>{{ item.floorNo }}楼/</span>
|
<span>{{ item.floorNo }}楼/</span>
|
||||||
<span>{{ item.houseNo }}室</span>
|
<span>{{ item.houseNo }}室</span>
|
||||||
<el-icon @click="delteUse(item.houseId)">
|
<el-icon @click="deleteHouse(item.houseId)">
|
||||||
<Delete></Delete>
|
<Delete></Delete>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</li>
|
</li>
|
||||||
<House returnvalue="*" ref="HolderRef" :isMultiple="true" :userid="form.houseIds.join(',')" @change="handleSelect">
|
<House returnvalue="*" ref="HolderRef" :isMultiple="true" :userid="form.houseIds.join(',')" @change="handleSelect">
|
||||||
<template #default>
|
<template #default>
|
||||||
<li @click="OpenUseTablesfun" class="add justify-center">
|
<li @click="OpenUseTablesfun('house')" class="add justify-center">
|
||||||
<el-icon>
|
<el-icon>
|
||||||
<DocumentAdd></DocumentAdd>
|
<DocumentAdd></DocumentAdd>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
@@ -44,6 +52,28 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="form.chargeScope === '1' && !typeNamelist.includes(typeName)">
|
||||||
|
<div class="residentBox">
|
||||||
|
<ul class="checkoutSideUsesbox">
|
||||||
|
<li v-for="(item, index) in checkoutUser" :key="index">
|
||||||
|
<span>{{ item.house_name }} / {{ item.residentName }} / {{ item.phone }}</span>
|
||||||
|
<el-icon @click="delteUser(item.residentId)">
|
||||||
|
<Delete></Delete>
|
||||||
|
</el-icon>
|
||||||
|
</li>
|
||||||
|
<UserHolder returnvalue="*" ref="userRef" :isMultiple="true" :userid="form.residentIds" @change="handleCheckUser">
|
||||||
|
<template #default>
|
||||||
|
<li @click="OpenUseTablesfun('user')" class="add justify-center">
|
||||||
|
<el-icon>
|
||||||
|
<DocumentAdd></DocumentAdd>
|
||||||
|
</el-icon>
|
||||||
|
<span>添加业主</span>
|
||||||
|
</li>
|
||||||
|
</template>
|
||||||
|
</UserHolder>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="费用周期" prop="chargePeriod">
|
<el-form-item label="费用周期" prop="chargePeriod">
|
||||||
<el-select v-model="form.chargePeriod">
|
<el-select v-model="form.chargePeriod">
|
||||||
<el-option v-for="(item, index) in com_bill_charge_period" :key="index" :value="item.value" :label="item.label"></el-option>
|
<el-option v-for="(item, index) in com_bill_charge_period" :key="index" :value="item.value" :label="item.label"></el-option>
|
||||||
@@ -78,14 +108,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import House from '@/components/Holder/house.vue';
|
import House from '@/components/Holder/house.vue';
|
||||||
|
import UserHolder from '@/components/Holder/user.vue';
|
||||||
import PageHeader from '@/components/Pageheader/index.vue';
|
import PageHeader from '@/components/Pageheader/index.vue';
|
||||||
import { listChargeItem } from '@/api/system/SdbChargeItem';
|
import { listChargeItem } from '@/api/system/SdbChargeItem';
|
||||||
import { getBill, updateBill, addBill, BillHouse, listBillHouse } from '@/api/system/SdbBill';
|
import { getBill, updateBill, addBill, BillHouse, listBillHouse, queryResidentList_holder } from '@/api/system/SdbBill';
|
||||||
import type { DatePickerType } from 'element-plus';
|
import type { DatePickerType } from 'element-plus';
|
||||||
import { formatDate, formatDate2 } from '@/utils';
|
import { formatDate, formatDate2 } from '@/utils';
|
||||||
import { Delete } from '@element-plus/icons-vue';
|
import { Delete } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
|
||||||
const { com_bill_charge_scope_house } = toRefs<any>(proxy?.useDict('com_bill_charge_scope_house'));
|
const { com_bill_charge_scope_house } = toRefs<any>(proxy?.useDict('com_bill_charge_scope_house'));
|
||||||
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
|
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
|
||||||
|
|
||||||
@@ -108,7 +140,8 @@ const form = ref({
|
|||||||
'chargeItemId': '', // 收费项目
|
'chargeItemId': '', // 收费项目
|
||||||
'chargeScope': '0', // 业主范围
|
'chargeScope': '0', // 业主范围
|
||||||
'chargePeriod': '2', // 费用周期
|
'chargePeriod': '2', // 费用周期
|
||||||
houseIds: [], // 部分业主
|
houseIds: [], // 部分房屋
|
||||||
|
residentIds: [], // 部分业主
|
||||||
charegeTypeId: '', // typeid
|
charegeTypeId: '', // typeid
|
||||||
'startDate': '', // 开始
|
'startDate': '', // 开始
|
||||||
'endDate': '', // 结束
|
'endDate': '', // 结束
|
||||||
@@ -135,6 +168,8 @@ const chargeitemlist = ref([]);
|
|||||||
|
|
||||||
// 房屋列表
|
// 房屋列表
|
||||||
const houselist = ref([]);
|
const houselist = ref([]);
|
||||||
|
// 住户列表
|
||||||
|
const userlist = ref([]);
|
||||||
async function init() {
|
async function init() {
|
||||||
listChargeItem().then((res) => {
|
listChargeItem().then((res) => {
|
||||||
chargeitemlist.value = res.rows;
|
chargeitemlist.value = res.rows;
|
||||||
@@ -142,10 +177,13 @@ async function init() {
|
|||||||
|
|
||||||
const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
|
const res = await listBillHouse({ pageNum: 1, pageSize: 999999 });
|
||||||
houselist.value = res.rows;
|
houselist.value = res.rows;
|
||||||
|
const res2 = await queryResidentList_holder({ pageNum: 1, pageSize: 999999 });
|
||||||
|
userlist.value = res2.rows;
|
||||||
|
|
||||||
if (route.query.id) {
|
if (route.query.id) {
|
||||||
userid.value = route.query.id;
|
userid.value = route.query.id;
|
||||||
getBill(userid.value).then((res) => {
|
getBill(userid.value).then((res) => {
|
||||||
|
if (!res.data) return;
|
||||||
form.value = {
|
form.value = {
|
||||||
...form.value,
|
...form.value,
|
||||||
...res.data
|
...res.data
|
||||||
@@ -154,8 +192,9 @@ async function init() {
|
|||||||
form.value.startDate = formatDate2(form.value.startDate);
|
form.value.startDate = formatDate2(form.value.startDate);
|
||||||
form.value.endDate = formatDate2(form.value.endDate);
|
form.value.endDate = formatDate2(form.value.endDate);
|
||||||
StartEndDate.value = [form.value.startDate, form.value.endDate];
|
StartEndDate.value = [form.value.startDate, form.value.endDate];
|
||||||
|
// TODO houseid 有默认值, 需要处理
|
||||||
checkoutUses.value = form.value.houseIds
|
// TODO residentids 添加,
|
||||||
|
checkoutHouses.value = form.value.houseIds
|
||||||
.map((item) => {
|
.map((item) => {
|
||||||
if (item) {
|
if (item) {
|
||||||
const find = houselist.value.find((it) => it.houseId === item);
|
const find = houselist.value.find((it) => it.houseId === item);
|
||||||
@@ -175,35 +214,57 @@ onMounted(() => {
|
|||||||
init();
|
init();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const typeNamelist = ref(['2049026484272791553', '2049026503017136129']);
|
||||||
|
const typeName = ref('');
|
||||||
// 获取收费类型id
|
// 获取收费类型id
|
||||||
function handleChange(val) {
|
function handleChange(val: string) {
|
||||||
const find = chargeitemlist.value.find((item) => item.id === val);
|
const find = chargeitemlist.value.find((item) => item.id === val);
|
||||||
if (find) {
|
if (find) {
|
||||||
form.value.charegeTypeId = find.typeId;
|
form.value.charegeTypeId = find.typeId;
|
||||||
|
typeName.value = find.typeId;
|
||||||
|
handleClearCheckout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// !== 业主 =============================================================================
|
// !== 业主 =============================================================================
|
||||||
|
|
||||||
// 打开
|
// 打开
|
||||||
const HolderRef = ref<InstanceType<typeof House>>();
|
const HolderRef = ref<InstanceType<typeof House>>();
|
||||||
function OpenUseTablesfun() {
|
const userRef = ref<InstanceType<typeof UserHolder>>();
|
||||||
HolderRef.value.open();
|
function OpenUseTablesfun(val: string) {
|
||||||
|
if (val === 'house') {
|
||||||
|
HolderRef.value.open();
|
||||||
|
} else if (val === 'user') {
|
||||||
|
userRef.value.open();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 多选
|
// 多选
|
||||||
const checkoutUses = ref<BillHouse[]>([]);
|
const checkoutHouses = ref<BillHouse[]>([]);
|
||||||
function handleSelect(val: BillHouse[]) {
|
function handleSelect(val: BillHouse[]) {
|
||||||
checkoutUses.value = val;
|
checkoutHouses.value = val;
|
||||||
form.value.houseIds = checkoutUses.value.map((item) => item.houseId);
|
form.value.houseIds = checkoutHouses.value.map((item) => item.houseId);
|
||||||
|
}
|
||||||
|
// 多选
|
||||||
|
const checkoutUser = ref([]);
|
||||||
|
/** 添加 业主 */
|
||||||
|
function handleCheckUser(val) {
|
||||||
|
checkoutUser.value = val;
|
||||||
|
form.value.residentIds = checkoutUser.value.map((item) => item.residentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 删除房屋 */
|
/** 删除房屋 */
|
||||||
function delteUse(id: string | number) {
|
function deleteHouse(id: string) {
|
||||||
checkoutUses.value = checkoutUses.value.filter((item) => item.houseId !== id);
|
checkoutHouses.value = checkoutHouses.value.filter((item) => item.houseId !== id);
|
||||||
|
}
|
||||||
|
/** 删除业主 */
|
||||||
|
function delteUser(id: string) {
|
||||||
|
checkoutUser.value = checkoutUser.value.filter((item) => item.residentId !== id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 清空 */
|
/** 清空 */
|
||||||
function handleClearCheckout() {
|
function handleClearCheckout() {
|
||||||
checkoutUses.value = [];
|
checkoutHouses.value = [];
|
||||||
|
checkoutUser.value = [];
|
||||||
|
form.value.residentIds = [];
|
||||||
form.value.houseIds = [];
|
form.value.houseIds = [];
|
||||||
}
|
}
|
||||||
// !== 业主 =============================================================================
|
// !== 业主 =============================================================================
|
||||||
@@ -213,12 +274,12 @@ const submitForm = () => {
|
|||||||
formRef.value?.validate(async (valid: boolean) => {
|
formRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (userid.value) {
|
if (userid.value) {
|
||||||
updateBill(form.value).then((res) => {
|
updateBill(form.value).then(() => {
|
||||||
ElMessage.success('编辑成功');
|
ElMessage.success('编辑成功');
|
||||||
cancelForm();
|
cancelForm();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addBill(form.value).then((res) => {
|
addBill(form.value).then(() => {
|
||||||
ElMessage.success('添加成功');
|
ElMessage.success('添加成功');
|
||||||
cancelForm();
|
cancelForm();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="收费项目" prop="chargeItemId">
|
<el-form-item label="收费项目" prop="chargeItemId">
|
||||||
<el-select v-model="queryParams.chargeItemId" placeholder="请选择收费项目">
|
<el-select v-model="queryParams.chargeItemId" placeholder="请选择收费项目">
|
||||||
<el-option v-for="(item, index) in chargeItems" :key="index" :value="item.id" :label="item.itemName"></el-option>
|
<el-option v-for="(item, index) in chargeItems" :key="index" :value="item.id" :label="item.itemName"></el-option>
|
||||||
@@ -17,29 +17,28 @@
|
|||||||
<el-input v-model="queryParams.billCode" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.billCode" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['bill:bill:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['bill:bill:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['bill:bill:edit']">修改</el-button>
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['bill:bill:edit']">编辑</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:bill:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:bill:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :show-add="checkPermi(['bill:bill:add'])" :show-edit="false" :show-delete="false" @update:add="handleAdd"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -49,35 +48,35 @@
|
|||||||
<el-table-column label="账单名称" align="center" prop="billName" />
|
<el-table-column label="账单名称" align="center" prop="billName" />
|
||||||
<el-table-column label="收费范围" align="center" prop="chargeScope" width="100">
|
<el-table-column label="收费范围" align="center" prop="chargeScope" width="100">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<!-- TODO 收费类型来判断收费范围 -->
|
||||||
<dict-tag :options="com_bill_charge_scope_house" :value="scope.row.chargeScope"></dict-tag>
|
<dict-tag :options="com_bill_charge_scope_house" :value="scope.row.chargeScope"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="收费项目" align="center" prop="chargeItemName" />
|
<el-table-column label="收费项目" align="center" prop="chargeItemName" />
|
||||||
<el-table-column label="收费周期" align="center" prop="chargePeriod" width="80">
|
<!-- <el-table-column label="收费周期" align="center" prop="chargePeriod" width="80">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
|
<dict-tag :options="com_bill_charge_period" :value="scope.row.chargePeriod"></dict-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="开始日期" align="center" prop="startDate" width="180">
|
<el-table-column label="起止时间" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.startDate, '{y}/{m}/{d}') }}</span> -
|
||||||
|
<span>{{ parseTime(scope.row.endDate, '{y}/{m}/{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="结束日期" align="center" prop="endDate" width="180">
|
<el-table-column label="单价" align="center" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.endDate, '{y}-{m}-{d}') }}</span>
|
<div class="flex justify-center">
|
||||||
</template>
|
<span>{{ scope.row.fixedPrice }}</span> /
|
||||||
</el-table-column>
|
<dict-tag :options="com_charge_item_unit" value="0"></dict-tag>
|
||||||
<el-table-column label="单价" align="center" prop="endDate" width="180">
|
</div>
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ scope.row.fixedPrice }}</span>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="数量" align="center" prop="chargePeriod" />
|
<!-- <el-table-column label="数量" align="center" prop="chargePeriod" />
|
||||||
<el-table-column label="费用合计" align="center" prop="chargePeriod" /> -->
|
<el-table-column label="费用合计" align="center" prop="chargePeriod" /> -->
|
||||||
<el-table-column label="操作" width="120" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="120" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['bill:bill:edit']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['bill:bill:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['bill:bill:query']">详情</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['bill:bill:query']">详情</el-button>
|
||||||
<!-- <el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:bill:remove']">删除</el-button> -->
|
<!-- <el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:bill:remove']">删除</el-button> -->
|
||||||
</template>
|
</template>
|
||||||
@@ -93,12 +92,14 @@
|
|||||||
import { listBill, getBill, delBill, addBill, updateBill } from '@/api/system/SdbBill/index';
|
import { listBill, getBill, delBill, addBill, updateBill } from '@/api/system/SdbBill/index';
|
||||||
import { BillVO, BillQuery, BillForm } from '@/api/system/SdbBill/type';
|
import { BillVO, BillQuery, BillForm } from '@/api/system/SdbBill/type';
|
||||||
import { listChargeItem } from '@/api/system/SdbChargeItem';
|
import { listChargeItem } from '@/api/system/SdbChargeItem';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_bill_search_filter } = toRefs<any>(proxy?.useDict('com_bill_search_filter'));
|
const { com_bill_search_filter } = toRefs<any>(proxy?.useDict('com_bill_search_filter'));
|
||||||
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
|
const { com_questionnaire_scope } = toRefs<any>(proxy?.useDict('com_questionnaire_scope'));
|
||||||
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
|
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
|
||||||
const { com_bill_charge_scope_house } = toRefs<any>(proxy?.useDict('com_bill_charge_scope_house'));
|
const { com_bill_charge_scope_house } = toRefs<any>(proxy?.useDict('com_bill_charge_scope_house'));
|
||||||
|
const { com_charge_item_unit } = toRefs<any>(proxy?.useDict('com_charge_item_unit'));
|
||||||
|
|
||||||
const billList = ref<BillVO[]>([]);
|
const billList = ref<BillVO[]>([]);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
@@ -133,7 +134,7 @@ const data = reactive<PageData<BillForm, BillQuery>>({
|
|||||||
form: { ...initFormData },
|
form: { ...initFormData },
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 20,
|
||||||
billCode: '',
|
billCode: '',
|
||||||
type: '',
|
type: '',
|
||||||
value: ''
|
value: ''
|
||||||
|
|||||||
@@ -2,85 +2,220 @@
|
|||||||
<el-card style="margin-top: 20px; height: 100%">
|
<el-card style="margin-top: 20px; height: 100%">
|
||||||
<div class="p-2 flex flex-col cashierbox h-full">
|
<div class="p-2 flex flex-col cashierbox h-full">
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div>小区: 北境碧桂园小区</div>
|
<div>小区:{{ villageinfo.villageName ?? '---' }}</div>
|
||||||
<div style="margin: 0 80px">小区: 北境碧桂园小区</div>
|
<div style="margin: 0 80px">住户姓名: {{ props.query.residentName }}</div>
|
||||||
<div>小区: 北境碧桂园小区</div>
|
<div>手机号: {{ props.query.phone }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="actionsbox">
|
<div class="actionsbox">
|
||||||
<el-button type="primary">收款</el-button>
|
<el-button type="primary" @click="openDiage">收款</el-button>
|
||||||
<el-button>添加临时收费</el-button>
|
<!-- <el-button>添加临时收费</el-button> -->
|
||||||
<el-button>预存</el-button>
|
<!-- <el-button>预存</el-button> -->
|
||||||
<el-button>打印</el-button>
|
<!-- <el-button>打印</el-button> -->
|
||||||
<el-button @click="emit('Back')">返回</el-button>
|
<el-button @click="emit('Back')">返回</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="tablebox">
|
<div class="tablebox">
|
||||||
<el-table>
|
<el-table :data="tabledata" @selection-change="handleSelectionChange">
|
||||||
<el-table-column align="center" label="序号" width="80">
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column align="center" label="房屋/车位">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<div v-if="scope.row.chargeTypeName === '停车费'">{{ scope.row.parkingName }}</div>
|
||||||
</template>
|
<div v-else-if="scope.row.chargeTypeName === '电费' || scope.row.chargeTypeName === '水费'">{{ scope.row.houseName }}</div>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="房屋/车位/车辆">
|
|
||||||
<template #default="scope">
|
|
||||||
<div>{{ scope.$index }}</div>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="收费项目">
|
<el-table-column align="center" label="收费项目">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<div>{{ scope.row.chargeItemName }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="收费周期">
|
<el-table-column align="center" label="收费周期">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="单价">
|
<el-table-column align="center" label="单价">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<div>{{ scope.row.fixedPrice }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="数量">
|
<!-- <el-table-column align="center" label="数量">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<div>{{ scope.row.formula }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column align="center" label="应收金额">
|
|
||||||
<template #default="scope">
|
|
||||||
<div>{{ scope.$index }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="缴费状态">
|
<el-table-column align="center" label="缴费状态">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<dict-tag v-if="!inglelist.includes(scope.row.chargeItemName)" :options="com_pay_status" :value="scope.row.payStatus"></dict-tag>
|
||||||
|
<div v-else>--</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column align="center" label="应缴金额">
|
<el-table-column align="center" label="应缴金额">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<div v-if="!inglelist.includes(scope.row.chargeItemName)">{{ scope.row.money ?? '--' }}</div>
|
||||||
|
<div v-else>--</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 添加或修改电 设备对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
|
<div class="payinfo">
|
||||||
|
<div>
|
||||||
|
<span>缴费人:{{ villageinfo.villageName ?? '---' }}-{{ props.query.houseName }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>账单名称: </span>
|
||||||
|
<span style="text-wrap: wrap; text-indent: 2rem">{{ from.billResidentId.join('、 ') }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>应收合计:¥{{ from.allCost }}</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>应缴合计:¥{{ from.allCost }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form ref="formRef" :model="from" label-width="100px">
|
||||||
|
<el-form-item label="费用合计" prop="allCost">
|
||||||
|
<el-input v-model="from.allCost">
|
||||||
|
<template #suffix>
|
||||||
|
<span>元</span>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="缴纳状态" prop="payStatus">
|
||||||
|
<el-radio-group v-model="from.payStatus">
|
||||||
|
<el-radio v-for="dict in com_pay_status" :key="dict.value" :label="dict.label" :value="dict.value"></el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="支付方式" prop="payType">
|
||||||
|
<el-select v-model="from.payType" placeholder="请选择">
|
||||||
|
<el-option v-for="dict in com_pay_method" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input type="textarea" :rows="5" v-model="from.remark"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<el-button @click="closepay">取消</el-button>
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { billlistType, billQuery } from '@/api/system/SdbCashier';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { com_pay_method, com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_method', 'com_pay_status'));
|
||||||
|
|
||||||
|
const villageinfo = JSON.parse(localStorage.getItem('villageInfo') || '{}');
|
||||||
|
|
||||||
|
// 隐藏收费金额的 类型列表
|
||||||
|
const inglelist = ['电费', '水费'];
|
||||||
|
|
||||||
|
type querytype = {
|
||||||
|
residentId: string;
|
||||||
|
residentName: string;
|
||||||
|
houseName: string;
|
||||||
|
phone: string;
|
||||||
|
};
|
||||||
|
const props = defineProps({
|
||||||
|
query: {
|
||||||
|
type: Object as PropType<querytype>,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
'residentId': '',
|
||||||
|
'residentName': '',
|
||||||
|
'houseName': '',
|
||||||
|
'phone': ''
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const ids = ref<Array<billlistType>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
const total = ref(100);
|
const total = ref(100);
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
});
|
});
|
||||||
|
const tabledata = ref([]);
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
console.log('getList');
|
billQuery({
|
||||||
|
residentId: props.query.residentId,
|
||||||
|
payStatus: '0'
|
||||||
|
}).then((res) => {
|
||||||
|
tabledata.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: billlistType[]) => {
|
||||||
|
// TODO: 获取选中的id
|
||||||
|
ids.value = [];
|
||||||
|
ids.value = selection;
|
||||||
|
console.log(ids.value);
|
||||||
|
console.log(selection);
|
||||||
|
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['Back']);
|
const emit = defineEmits(['Back']);
|
||||||
|
|
||||||
|
const formRef = ref();
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '收款'
|
||||||
|
});
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
|
||||||
|
const from = ref({
|
||||||
|
allCost: null, // 金额
|
||||||
|
billResidentId: [], // 账单id
|
||||||
|
payStatus: '0', // 0:未缴 1:已缴
|
||||||
|
payType: '0', // 0:微信 1:支付宝 2 线下
|
||||||
|
remark: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const openDiage = () => {
|
||||||
|
from.value = {
|
||||||
|
allCost: 0,
|
||||||
|
payStatus: '0',
|
||||||
|
billResidentId: ['202505电费', '202505水费'],
|
||||||
|
payType: '0',
|
||||||
|
remark: ''
|
||||||
|
};
|
||||||
|
// 计算金额
|
||||||
|
ids.value.forEach((item) => {
|
||||||
|
from.value.allCost += Number(item.money);
|
||||||
|
});
|
||||||
|
dialog.visible = true;
|
||||||
|
};
|
||||||
|
const closepay = () => {
|
||||||
|
dialog.visible = false;
|
||||||
|
dialog.title = '';
|
||||||
|
};
|
||||||
|
const submitForm = () => {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
if (from.value.payStatus === '0') {
|
||||||
|
setTimeout(() => {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
closepay();
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@@ -103,4 +238,14 @@ const emit = defineEmits(['Back']);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.payinfo {
|
||||||
|
color: rgba(0, 0, 0, 1);
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
border-bottom: 1px solid #d2d2d2;
|
||||||
|
& > div {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,74 +1,194 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2 flex flex-col cashierbox h-full">
|
<el-card style="margin-top: 20px; height: 100%">
|
||||||
<div class="flex">
|
<div class="p-2 flex flex-col cashierbox h-full">
|
||||||
<div>小区: 北境碧桂园小区</div>
|
<div class="tablebox">
|
||||||
<div style="margin: 0 80px">小区: 北境碧桂园小区</div>
|
<el-table :data="tabledata">
|
||||||
<div>小区: 北境碧桂园小区</div>
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
</div>
|
<el-table-column align="center" label="序号" width="80">
|
||||||
<div class="tablebox">
|
<template #default="scope">
|
||||||
<el-table>
|
<div>{{ scope.$index }}</div>
|
||||||
<el-table-column align="center" label="序号" width="80">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<div>{{ scope.$index }}</div>
|
<el-table-column align="center" label="房屋/车位/车辆">
|
||||||
</template>
|
<template #default="scope">
|
||||||
</el-table-column>
|
<div v-if="scope.row.houseName">{{ scope.row.parkingName }}</div>
|
||||||
<el-table-column align="center" label="房屋/车位/车辆">
|
<div v-else-if="scope.row.parkingName">{{ scope.row.parkingName }}</div>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<div>{{ scope.$index }}</div>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column align="center" label="收费项目">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column align="center" label="收费项目">
|
<div>{{ scope.row.chargeItemName }}</div>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<div>{{ scope.$index }}</div>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column align="center" label="收费周期">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column align="center" label="收费周期">
|
<div>{{ scope.row.startDate }} -- {{ scope.row.endDate }}</div>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<div>{{ scope.$index }}</div>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column align="center" label="单价">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column align="center" label="单价">
|
<div>{{ scope.row.fixedPrice }}</div>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<div>{{ scope.$index }}</div>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column align="center" label="数量">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column align="center" label="数量">
|
<div>{{ scope.row.formula }}</div>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<div>{{ scope.$index }}</div>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column align="center" label="缴费状态">
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column align="center" label="应收金额">
|
<dict-tag :options="com_pay_status" :value="scope.row.payStatus"></dict-tag>
|
||||||
<template #default="scope">
|
</template>
|
||||||
<div>{{ scope.$index }}</div>
|
</el-table-column>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" label="缴费状态">
|
|
||||||
<template #default="scope">
|
|
||||||
<div>{{ scope.$index }}</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column align="center" label="应缴金额">
|
<el-table-column align="center" label="应缴金额">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div>{{ scope.$index }}</div>
|
<div>{{ scope.row.money }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<!-- 添加或修改电 设备对话框 -->
|
||||||
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
|
<div class="payinfo">
|
||||||
|
<div>
|
||||||
|
<span>缴费人:北境碧桂园小区-A栋1单元102-张姗</span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>账单名称:2025年车位费、2025年上半年物业费 </span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>应收合计:¥1600.00 </span>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span>应缴合计:¥1600.00 </span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-form ref="formRef" :model="from" label-width="100px">
|
||||||
|
<el-form-item label="费用合计" prop="allCost">
|
||||||
|
<el-input v-model="from.allCost">
|
||||||
|
<template #suffix>
|
||||||
|
<span>元</span>
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="缴纳状态" prop="startTime">
|
||||||
|
<el-radio-group v-model="from.deviceType">
|
||||||
|
<el-radio v-for="dict in com_pay_status" :key="dict.value" :label="dict.label"></el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="支付方式" prop="endTime">
|
||||||
|
<el-select v-model="from.deviceType" placeholder="请选择">
|
||||||
|
<el-option v-for="dict in com_pay_method" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input type="textarea" :rows="5" v-model="from.remark"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<el-button @click="closepay">取消</el-button>
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</el-dialog>
|
||||||
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { billlistType, billQuery } from '@/api/system/SdbCashier';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { com_pay_method, com_pay_status } = toRefs<any>(proxy?.useDict('com_pay_method', 'com_pay_status'));
|
||||||
|
|
||||||
|
type querytype = {
|
||||||
|
residentId: string;
|
||||||
|
residentName: string;
|
||||||
|
houseName: string;
|
||||||
|
phone: string;
|
||||||
|
};
|
||||||
|
const props = defineProps({
|
||||||
|
query: {
|
||||||
|
type: Object as PropType<querytype>,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
'residentId': '',
|
||||||
|
'residentName': '',
|
||||||
|
'houseName': '',
|
||||||
|
'phone': ''
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
const ids = ref<Array<string | number>>([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
const total = ref(100);
|
const total = ref(100);
|
||||||
const queryParams = ref({
|
const queryParams = ref({
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10
|
pageSize: 10
|
||||||
});
|
});
|
||||||
|
const tabledata = ref([]);
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
console.log('getList');
|
billQuery({
|
||||||
|
residentId: props.query.residentId,
|
||||||
|
'payStatus': '1'
|
||||||
|
}).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
tabledata.value = res.rows;
|
||||||
|
total.value = res.total;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
const handleSelectionChange = (selection: billlistType[]) => {
|
||||||
|
// TODO: 获取选中的id
|
||||||
|
ids.value = selection.map((item) => item.residentId);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
|
||||||
|
const emit = defineEmits(['Back']);
|
||||||
|
|
||||||
|
const formRef = ref();
|
||||||
|
const dialog = reactive<DialogOption>({
|
||||||
|
visible: false,
|
||||||
|
title: '收款'
|
||||||
|
});
|
||||||
|
const buttonLoading = ref(false);
|
||||||
|
|
||||||
|
const from = ref({
|
||||||
|
allCost: null,
|
||||||
|
sex: null,
|
||||||
|
deviceType: null,
|
||||||
|
remark: ''
|
||||||
|
});
|
||||||
|
|
||||||
|
const openDiage = () => {
|
||||||
|
from.value = {
|
||||||
|
allCost: null,
|
||||||
|
sex: null,
|
||||||
|
deviceType: null,
|
||||||
|
remark: ''
|
||||||
|
};
|
||||||
|
dialog.visible = true;
|
||||||
|
};
|
||||||
|
const closepay = () => {
|
||||||
|
dialog.visible = false;
|
||||||
|
dialog.title = '';
|
||||||
|
};
|
||||||
|
const submitForm = () => {
|
||||||
|
buttonLoading.value = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
buttonLoading.value = false;
|
||||||
|
closepay();
|
||||||
|
}, 1000);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -92,4 +212,14 @@ const getList = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.payinfo {
|
||||||
|
color: rgba(0, 0, 0, 1);
|
||||||
|
margin-top: 20px;
|
||||||
|
padding-bottom: 10px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
border-bottom: 1px solid #d2d2d2;
|
||||||
|
& > div {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -3,31 +3,34 @@
|
|||||||
<Pageheader title="收银台管理"></Pageheader>
|
<Pageheader title="收银台管理"></Pageheader>
|
||||||
<div class="" v-if="isSearch">
|
<div class="" v-if="isSearch">
|
||||||
<p class="actionsmain">
|
<p class="actionsmain">
|
||||||
功能说明:可根据住户姓名、住户手机号、房屋号、车位号、车牌号,快速搜索对应的未缴费用,修改未缴费用的优惠及滞纳金金额,完成对未缴费用的收取。
|
功能说明:可根据住户姓名、房屋号、手机号,快速搜索对应的未缴费用,修改未缴费用的优惠及滞纳金金额,完成对未缴费用的收取。
|
||||||
</p>
|
</p>
|
||||||
<div class="contanier flex-center">
|
<div class="contanier flex-center">
|
||||||
<div class="h-full flex-1 flex flex-items-start">
|
<div class="h-full flex-1 flex flex-items-start">
|
||||||
<div class="typebox">
|
<div class="typebox">
|
||||||
<el-select v-model="searchform.type">
|
<el-select v-model="searchType" @change="handleChangeSearchType">
|
||||||
<el-option v-for="(item, index) in com_cashier_type" :key="index" :label="item.label" :value="item.value"></el-option>
|
<el-option v-for="(item, index) in com_cashier_type" :key="index" :label="item.label" :value="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="searchBox">
|
<div class="searchBox">
|
||||||
<el-input>
|
<el-input v-model="searchValue" @keyup.enter="getlist">
|
||||||
<template #suffix>
|
<template #suffix>
|
||||||
<el-icon>
|
<el-icon @click="getlist" class="cursor-pointer">
|
||||||
<Search></Search>
|
<Search></Search>
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
||||||
<div class="listbox" v-show="Boolean(list.length > 0)">
|
<div class="listbox" v-if="list.length">
|
||||||
<div class="list_item">
|
<div class="list_item">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<DictTag :options="com_cashier_type" :value="searchform.type"></DictTag>
|
<DictTag :options="com_cashier_type" :value="searchType"></DictTag>
|
||||||
|
</div>
|
||||||
|
<div class="list_body">
|
||||||
|
<div class="list_value" @click="searchclick(item)" v-for="(item, index) in list" :key="index">
|
||||||
|
{{ item.houseName }}-{{ item.residentName }}-{{ item.phone }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list_value" v-for="(item, index) in list" :key="index">北境碧桂园小区A栋1单元101-张姗-13899999999</div>
|
|
||||||
<div class="list_value">北境碧桂园小区A栋1单元101-张姗-13899999999</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,17 +39,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else style="margin-top: 20px; height: calc(100% - 210px)">
|
<div v-else style="margin-top: 20px; height: calc(100% - 210px)">
|
||||||
<div class="tabsbox">
|
<div class="tabsbox">
|
||||||
<div @click="handleChecout(index)" v-for="(item, index) in tabs" :key="index" class="tabs_item" :class="{ active: checkouttabs === index }">
|
<div
|
||||||
|
@click="handleChecout(item.value)"
|
||||||
|
v-for="(item, index) in tabs"
|
||||||
|
:key="index"
|
||||||
|
class="tabs_item"
|
||||||
|
:class="{ active: checkouttabs === item.value }"
|
||||||
|
>
|
||||||
{{ item.name }}
|
{{ item.name }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="h-full">
|
<div class="h-full">
|
||||||
<el-card style="height: 100%; margin-top: 20px" v-if="checkouttabs === 0">
|
<cashier :query="checkeditem" @Back="handleBack" v-if="checkouttabs === 'cashier'"></cashier>
|
||||||
<cashier @Back="handleBack"></cashier>
|
<history :query="checkeditem" v-if="checkouttabs === 'history'"></history>
|
||||||
</el-card>
|
|
||||||
<el-card style="height: 100%; margin-top: 20px" shadow="never" v-if="checkouttabs === 1">
|
|
||||||
<history></history>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -59,46 +64,77 @@
|
|||||||
// TODO 预存
|
// TODO 预存
|
||||||
// TODO 缴费
|
// TODO 缴费
|
||||||
import { Search } from '@element-plus/icons-vue';
|
import { Search } from '@element-plus/icons-vue';
|
||||||
import { ref } from 'vue';
|
import { Component, DefineComponent, ref } from 'vue';
|
||||||
|
|
||||||
import cashier from './cashier.vue';
|
import cashier from './cashier.vue';
|
||||||
import history from './history.vue';
|
import history from './history.vue';
|
||||||
|
import { debounce } from '@/utils';
|
||||||
|
import { cashQuery } from '@/api/system/SdbCashier';
|
||||||
|
|
||||||
const isSearch = ref(true);
|
const isSearch = ref(true);
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_cashier_type } = toRefs<any>(proxy?.useDict('com_cashier_type'));
|
const { com_cashier_type } = toRefs<any>(proxy?.useDict('com_cashier_type'));
|
||||||
const searchform = ref({
|
const searchform = ref();
|
||||||
type: '0'
|
const searchValue = ref('');
|
||||||
});
|
const searchType = ref('residentName');
|
||||||
const list = ref([]);
|
function handleChangeSearchType() {
|
||||||
|
list.value = [];
|
||||||
|
searchValue.value = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
const list = ref<querytype[]>([]);
|
||||||
// ! ===================================================================================
|
// ! ===================================================================================
|
||||||
const checkouttabs = ref(0);
|
// 先定义 Tab 项类型
|
||||||
const tabs = [
|
type TabValue = 'cashier' | 'history';
|
||||||
|
interface TabItem {
|
||||||
|
name: string;
|
||||||
|
value: TabValue;
|
||||||
|
component: Component;
|
||||||
|
}
|
||||||
|
const checkouttabs = ref<TabValue>('cashier');
|
||||||
|
const tabs: TabItem[] = [
|
||||||
{
|
{
|
||||||
name: '收银台',
|
name: '收银台',
|
||||||
|
value: 'cashier',
|
||||||
component: cashier
|
component: cashier
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '历史缴费',
|
name: '历史缴费',
|
||||||
|
value: 'history',
|
||||||
component: history
|
component: history
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
function handleChecout(index: number) {
|
type querytype = {
|
||||||
|
residentId: string;
|
||||||
|
residentName: string;
|
||||||
|
houseName: string;
|
||||||
|
phone: string;
|
||||||
|
};
|
||||||
|
const checkeditem = ref<querytype>({
|
||||||
|
'residentId': '',
|
||||||
|
'residentName': '',
|
||||||
|
'houseName': '',
|
||||||
|
'phone': ''
|
||||||
|
});
|
||||||
|
const searchclick = (row: querytype) => {
|
||||||
|
checkeditem.value = row;
|
||||||
|
isSearch.value = false;
|
||||||
|
handleChecout('cashier');
|
||||||
|
};
|
||||||
|
function handleChecout(index: TabValue) {
|
||||||
checkouttabs.value = index;
|
checkouttabs.value = index;
|
||||||
}
|
}
|
||||||
// ! ===================================================================================
|
|
||||||
|
|
||||||
// ! ===================================================================================
|
// ! ===================================================================================
|
||||||
const total = ref(100);
|
function getlist() {
|
||||||
const queryParams = ref({
|
console.log('search2');
|
||||||
pageNum: 1,
|
searchform.value = {};
|
||||||
pageSize: 10
|
searchform.value[searchType.value] = searchValue.value;
|
||||||
});
|
cashQuery(searchform.value).then((res) => {
|
||||||
const tableData1 = ref([]);
|
list.value = res.data;
|
||||||
const getList = () => {
|
});
|
||||||
console.log('getList');
|
}
|
||||||
};
|
// ! ===================================================================================
|
||||||
|
|
||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
isSearch.value = true;
|
isSearch.value = true;
|
||||||
};
|
};
|
||||||
@@ -133,7 +169,7 @@ const handleBack = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.actionsmain {
|
.actionsmain {
|
||||||
font-size: 0.7rem;
|
font-size: 0.9rem;
|
||||||
color: #000;
|
color: #000;
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
}
|
}
|
||||||
@@ -173,24 +209,35 @@ const handleBack = () => {
|
|||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
.title {
|
|
||||||
color: rgba(48, 49, 51, 1);
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 450;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
border-bottom: 1px solid rgba(204, 204, 204, 1);
|
|
||||||
}
|
|
||||||
.list_item {
|
.list_item {
|
||||||
padding-bottom: 30px;
|
padding-bottom: 30px;
|
||||||
}
|
height: 400px;
|
||||||
.list_value {
|
display: flex;
|
||||||
height: 40px;
|
overflow: hidden;
|
||||||
line-height: 40px;
|
|
||||||
border-bottom: 1px solid rgba(204, 204, 204, 1);
|
flex-direction: column;
|
||||||
cursor: pointer;
|
.title {
|
||||||
&:hover {
|
color: rgba(48, 49, 51, 1);
|
||||||
background-color: #cccccc33;
|
font-size: 1rem;
|
||||||
|
font-weight: 450;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-bottom: 1px solid rgba(204, 204, 204, 1);
|
||||||
|
}
|
||||||
|
.list_body {
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
.list_value {
|
||||||
|
min-height: 40px;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
border-bottom: 1px solid rgba(204, 204, 204, 1);
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
background-color: #cccccc33;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<!-- <el-form-item label="设备状态" prop="eleStatus">
|
<!-- <el-form-item label="设备状态" prop="eleStatus">
|
||||||
<el-select v-model="queryParams.eleStatus">
|
<el-select v-model="queryParams.eleStatus">
|
||||||
<el-option v-for="(item, index) in com_waterdevice_on_status" :key="index" :label="item.label" :value="item.value"></el-option>
|
<el-option v-for="(item, index) in com_waterdevice_on_status" :key="index" :label="item.label" :value="item.value"></el-option>
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="房间号" prop="houseName">
|
<el-form-item label="房屋号" prop="houseName">
|
||||||
<el-input v-model="queryParams.houseName" placeholder="请输入房间号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.houseName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -35,24 +35,41 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleMarkqrcode" v-hasPermi="['equipment:addqrcode:electricitydevice']"
|
<el-button type="primary" plain icon="Plus" @click="handleMarkqrcode" v-hasPermi="['equipment:addqrcode:electricitydevice']"
|
||||||
>批量生成条形码</el-button
|
>批量生成条形码</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<!-- <el-button type="success" plain icon="Upload">批量更新固件</el-button> -->
|
<el-button type="success" plain icon="Upload">批量更新固件</el-button>
|
||||||
|
</el-col> -->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<div style="font-size: 0.8rem">电表列表</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :show-add="false" :show-edit="false" :show-delete="false">
|
||||||
|
<template #dropdown>
|
||||||
|
<!-- <el-dropdown-menu> -->
|
||||||
|
<el-dropdown-item @click="handleMarkqrcode" v-if="checkPermi(['equipment:addqrcode:electricitydevice'])">
|
||||||
|
<span>批量生成条形码</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<!-- </el-dropdown-menu> -->
|
||||||
|
<!-- <el-dropdown-item v-hasPermi="['equipment:addqrcode:electricitydevice']">
|
||||||
|
<div @click="handleMarkqrcode">批量更新固件</div>
|
||||||
|
</el-dropdown-item> -->
|
||||||
|
</template>
|
||||||
|
</right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" border :data="ElectricityDeviceList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="ElectricityDeviceList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="电表设备编码" width="250" align="center" prop="deviceCode" />
|
<el-table-column label="设备编码" width="250" align="center" prop="deviceCode" />
|
||||||
<el-table-column label="设备状态" width="100" align="center" prop="status">
|
<el-table-column label="设备状态" width="100" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="com_waterdevice_on_status" :value="scope.row.status"></dict-tag>
|
<div class="readRecord" v-if="scope.row.status">
|
||||||
|
<DictTag :options="com_waterdevice_on_status" :value="scope.row.status"></DictTag>
|
||||||
|
</div>
|
||||||
|
<span v-else>---</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="分合状态" width="100" align="center">
|
<el-table-column label="分合状态" width="100" align="center">
|
||||||
@@ -60,23 +77,23 @@
|
|||||||
<div class="readRecord" v-if="scope.row.waterRecord">
|
<div class="readRecord" v-if="scope.row.waterRecord">
|
||||||
<DictTag :options="com_electricity_readrecord_status" :value="scope.row.waterRecord.status"></DictTag>
|
<DictTag :options="com_electricity_readrecord_status" :value="scope.row.waterRecord.status"></DictTag>
|
||||||
</div>
|
</div>
|
||||||
<span v-else>-----</span>
|
<span v-else>---</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="房屋" align="center" prop="houseName" />
|
<el-table-column label="房屋号" align="center" prop="houseName" />
|
||||||
<el-table-column label="余额" width="100" align="center" prop="elePrice">
|
<el-table-column label="余额" width="100" align="center" prop="elePrice">
|
||||||
<template #defaul="scope">
|
<template #defaul="scope">
|
||||||
<span v-if="scope.row.electricityRecord">{{ scope.row.electricityRecord.balance }}</span>
|
<span v-if="scope.row.electricityRecord">{{ scope.row.electricityRecord.balance }}</span>
|
||||||
<span v-else>-----</span>
|
<span v-else>---</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="条形码" width="250" align="center" prop="deleted">
|
<el-table-column label="条码" width="250" align="center" prop="deleted">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="scope.row.url && scope.row.url.includes('http')"
|
v-if="scope.row.url && scope.row.url.includes('http')"
|
||||||
:src="scope.row.url"
|
:src="scope.row.url"
|
||||||
:preview-src-list="[scope.row.url]"
|
:preview-src-list="[scope.row.url]"
|
||||||
style="width: 90px; height: 30px; border-radius: 4px; margin-right: 5px"
|
style="width: 90%; height: 100%"
|
||||||
fit="cover"
|
fit="cover"
|
||||||
preview-teleported
|
preview-teleported
|
||||||
>
|
>
|
||||||
@@ -107,7 +124,7 @@
|
|||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="flex flex-items-center">
|
<el-col :span="24" class="flex flex-items-center actions">
|
||||||
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:electricitydevice']">充值记录</el-button>
|
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:electricitydevice']">充值记录</el-button>
|
||||||
<el-button link type="primary" @click="handleQrCode(scope.row)" v-hasPermi="['equipment:addqrcode:electricitydevice']"
|
<el-button link type="primary" @click="handleQrCode(scope.row)" v-hasPermi="['equipment:addqrcode:electricitydevice']"
|
||||||
>生成条码</el-button
|
>生成条码</el-button
|
||||||
@@ -127,7 +144,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
@click="handleOpenDialog('UpdateHouse', scope.row)"
|
@click="handleOpenDialog('UpdateHouse', scope.row)"
|
||||||
v-hasPermi="['equipment:edithouse:electricitydevice']"
|
v-hasPermi="['equipment:edithouse:electricitydevice']"
|
||||||
>修改</el-button
|
>绑定房屋</el-button
|
||||||
>
|
>
|
||||||
<!-- <el-dropdown style="vertical-align: text-top">
|
<!-- <el-dropdown style="vertical-align: text-top">
|
||||||
<el-button link type="primary">
|
<el-button link type="primary">
|
||||||
@@ -159,7 +176,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<!-- 添加或修改电 设备对话框 -->
|
<!-- 添加或修改电 设备对话框 -->
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
<el-form v-if="dialogType === 'usedWater'" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
|
<el-form v-if="dialogType === 'usedWater'" :rules="rules" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
|
||||||
<el-form-item label="设备编号" prop="deviceCode"> {{ UsedWaterform.deviceCode }} </el-form-item>
|
<el-form-item label="设备编号" prop="deviceCode"> {{ UsedWaterform.deviceCode }} </el-form-item>
|
||||||
<el-form-item label="开始时间" prop="startTime">
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -245,6 +262,7 @@ import {
|
|||||||
import { ElectricityDeviceVO } from '@/api/system/SdbElectricityDevice/type';
|
import { ElectricityDeviceVO } from '@/api/system/SdbElectricityDevice/type';
|
||||||
import { useHouseStore } from '@/store/modules/house';
|
import { useHouseStore } from '@/store/modules/house';
|
||||||
import { useUserStore } from '@/store/modules/user';
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
import { Upload } from '@element-plus/icons-vue';
|
import { Upload } from '@element-plus/icons-vue';
|
||||||
import { CascaderValue, tourEmits, UploadProps, UploadRawFile } from 'element-plus';
|
import { CascaderValue, tourEmits, UploadProps, UploadRawFile } from 'element-plus';
|
||||||
|
|
||||||
@@ -275,9 +293,9 @@ const data = reactive({
|
|||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
deviceCode: undefined,
|
deviceCode: '',
|
||||||
houseName: undefined,
|
houseName: '',
|
||||||
status: undefined
|
status: ''
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -304,6 +322,10 @@ const UsedWaterInfo = ref({
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: ''
|
endTime: ''
|
||||||
});
|
});
|
||||||
|
const rules = {
|
||||||
|
startTime: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
|
||||||
|
endTime: [{ required: true, message: '请选择结束时间', trigger: 'blur' }]
|
||||||
|
};
|
||||||
// ! =======================================================================================
|
// ! =======================================================================================
|
||||||
|
|
||||||
// ? 上传固件 ==============================================================================================
|
// ? 上传固件 ==============================================================================================
|
||||||
@@ -418,8 +440,8 @@ const handleOpenDialog = (type: 'usedWater' | 'Upload' | 'UpdateHouse', row: Ele
|
|||||||
|
|
||||||
if (type === 'usedWater') {
|
if (type === 'usedWater') {
|
||||||
UsedWaterform.value.deviceCode = row.deviceCode;
|
UsedWaterform.value.deviceCode = row.deviceCode;
|
||||||
UsedWaterform.value.startTime = new Date().toLocaleString();
|
UsedWaterform.value.startTime = '';
|
||||||
UsedWaterform.value.endTime = new Date().toLocaleString();
|
UsedWaterform.value.endTime = '';
|
||||||
usedWaterInfo.value = true;
|
usedWaterInfo.value = true;
|
||||||
} else if (type === 'Upload') {
|
} else if (type === 'Upload') {
|
||||||
UploadFileform.value.file = '';
|
UploadFileform.value.file = '';
|
||||||
@@ -447,6 +469,10 @@ const handleChangeWater = (val: string, row: ElectricityDeviceVO) => {};
|
|||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
if (dialogType.value === 'usedWater') {
|
if (dialogType.value === 'usedWater') {
|
||||||
|
if (UsedWaterform.value.startTime === '' || UsedWaterform.value.endTime === '') {
|
||||||
|
ElMessage.warning('请选择时间');
|
||||||
|
return;
|
||||||
|
}
|
||||||
UsedWaterformRef.value?.validate(async (valid: boolean) => {
|
UsedWaterformRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
@@ -552,6 +578,21 @@ const download = (url: string) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.actions {
|
||||||
|
:deep(.el-button > span) {
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:deep(.waterDevice_online) {
|
||||||
|
color: #3dd4a7;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
:deep(.waterDevice_offline) {
|
||||||
|
color: #ee1c25;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
.el-table {
|
.el-table {
|
||||||
height: calc(100% - 80px);
|
height: calc(100% - 80px);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<pageheader></pageheader>
|
<pageheader></pageheader>
|
||||||
<el-card class="flex-1 mt-10px" shadow="never">
|
<el-card class="flex-1 mt-10px" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" style="font-size: 0.8rem">
|
<el-row :gutter="10" style="font-size: 0.8rem; font-weight: 450">
|
||||||
<el-col :span="4"> 设备号: {{ routeid }} </el-col>
|
<el-col :span="4"> 设备号: {{ routeid }} </el-col>
|
||||||
<el-col :span="4"> 房间号: {{ housename }} </el-col>
|
<el-col :span="4"> 房屋号: {{ housename }} </el-col>
|
||||||
<el-col :span="14"></el-col>
|
<el-col :span="14"></el-col>
|
||||||
<el-col :span="2">
|
<el-col :span="2">
|
||||||
<el-button @click="confinem">返回</el-button>
|
<el-button @click="confinem">返回</el-button>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<!-- <el-form-item label="设备状态" prop="eleStatus">
|
<!-- <el-form-item label="设备状态" prop="eleStatus">
|
||||||
<el-select v-model="queryParams.eleStatus">
|
<el-select v-model="queryParams.eleStatus">
|
||||||
<el-option v-for="(item, index) in com_waterdevice_on_status" :key="index" :label="item.label" :value="item.value"></el-option>
|
<el-option v-for="(item, index) in com_waterdevice_on_status" :key="index" :label="item.label" :value="item.value"></el-option>
|
||||||
@@ -15,12 +15,12 @@
|
|||||||
<el-option v-for="(item, index) in com_water_readrecord_status" :key="index" :label="item.label" :value="item.value"></el-option>
|
<el-option v-for="(item, index) in com_water_readrecord_status" :key="index" :label="item.label" :value="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="房间号" prop="houseName">
|
<el-form-item label="房屋" prop="houseName">
|
||||||
<el-input v-model="queryParams.houseName" placeholder="请输入房间号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.houseName" placeholder="请输入" clearable />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -29,42 +29,46 @@
|
|||||||
|
|
||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8 flex-items-center">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleMarkqrcode" v-hasPermi="['equipment:addqrcode:waterdevice']"
|
<div style="font-size: 0.8rem">水表列表</div>
|
||||||
>批量生成条形码</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<right-toolbar :show-add="false" :show-edit="false" :show-delete="false">
|
||||||
<!-- <el-button type="success" plain icon="Upload">批量更新固件</el-button> -->
|
<template #dropdown>
|
||||||
</el-col>
|
<el-dropdown-item @click="handleMarkqrcode" v-if="checkPermi(['equipment:addqrcode:waterdevice'])">
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<span>批量生成条形码</span>
|
||||||
|
</el-dropdown-item>
|
||||||
|
<!-- <el-dropdown-item v-hasPermi="['equipment:addqrcode:electricitydevice']">
|
||||||
|
<div @click="handleMarkqrcode">批量更新固件</div>
|
||||||
|
</el-dropdown-item> -->
|
||||||
|
</template>
|
||||||
|
</right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" border :data="waterDeviceList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="waterDeviceList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="水表设备编码" width="250" align="center" prop="deviceCode" />
|
<el-table-column label="设备编码" width="250" align="center" prop="deviceCode" />
|
||||||
<el-table-column label="设备状态" width="100" align="center" prop="eleStatus">
|
<el-table-column label="设备状态" width="100" align="center" prop="eleStatus">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag v-if="scope.row.waterRecord" :options="com_waterdevice_on_status" :value="scope.row.waterRecord.eleStatus"></dict-tag>
|
<dict-tag v-if="scope.row.waterRecord" :options="com_waterdevice_on_status" :value="scope.row.waterRecord.eleStatus"></dict-tag>
|
||||||
<span v-else>-------</span>
|
<span v-else>---</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="分合状态" width="100" align="center">
|
<el-table-column label="分合状态" width="100" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag v-if="scope.row.status" :options="com_electricity_readrecord_status" :value="scope.row.waterRecord.status"></dict-tag>
|
<dict-tag v-if="scope.row.status" :options="com_water_readrecord_status" :value="scope.row.waterRecord.status"></dict-tag>
|
||||||
<span v-else>-------</span>
|
<span v-else>---</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="房屋" align="center" prop="houseName" />
|
<el-table-column label="房屋" align="center" prop="houseName" />
|
||||||
<el-table-column label="余额" width="120" align="center" prop="deviceCode">
|
<el-table-column label="余额" width="120" align="center" prop="deviceCode">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.waterRecord">{{ scope.row.waterRecord.balance }}</span>
|
<span v-if="scope.row.waterRecord">{{ scope.row.waterRecord.balance }}</span>
|
||||||
<span v-else>------</span>
|
<span v-else>---</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="条形码" width="250" align="center">
|
<el-table-column label="条码" width="250" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image
|
<el-image
|
||||||
v-if="scope.row.url && scope.row.url.includes('http')"
|
v-if="scope.row.url && scope.row.url.includes('http')"
|
||||||
@@ -83,7 +87,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="抄表时间" align="center">
|
<el-table-column label="抄表时间" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ scope.row.waterRecord ? scope.row.waterRecord.readTime : '--' }}</span>
|
<span>{{ scope.row.waterRecord ? scope.row.waterRecord.readTime : '---' }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column width="150" label="启停" align="center" prop="deleted" v-hasPermi="['equipment:isUse:waterdevice']">
|
<!-- <el-table-column width="150" label="启停" align="center" prop="deleted" v-hasPermi="['equipment:isUse:waterdevice']">
|
||||||
@@ -101,9 +105,16 @@
|
|||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="flex flex-items-center">
|
<el-col :span="24" class="flex flex-items-center actions">
|
||||||
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:waterdevice']">充值记录</el-button>
|
<el-button link type="primary" @click="handleRecode(scope.row)" v-hasPermi="['equipment:view:waterdevice']">充值记录</el-button>
|
||||||
<el-button link type="primary" @click="handleQrCode(scope.row)" v-hasPermi="['equipment:addqrcode:waterdevice']">生成条码</el-button>
|
<el-button
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
:loading="loadingQRCode.includes(scope.row.id)"
|
||||||
|
@click="handleQrCode(scope.row)"
|
||||||
|
v-hasPermi="['equipment:addqrcode:waterdevice']"
|
||||||
|
>生成条码</el-button
|
||||||
|
>
|
||||||
<el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)" v-hasPermi="['equipment:useWater:waterdevice']"
|
<el-button link type="primary" @click="handleOpenDialog('usedWater', scope.row)" v-hasPermi="['equipment:useWater:waterdevice']"
|
||||||
>用水量</el-button
|
>用水量</el-button
|
||||||
>
|
>
|
||||||
@@ -144,7 +155,7 @@
|
|||||||
<!-- 添加或修改水 设备对话框 -->
|
<!-- 添加或修改水 设备对话框 -->
|
||||||
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
<el-dialog :title="dialog.title" v-model="dialog.visible" width="500px" append-to-body>
|
||||||
<!-- water -->
|
<!-- water -->
|
||||||
<el-form v-if="dialogType === 'usedWater'" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
|
<el-form v-if="dialogType === 'usedWater'" :rules="rules" ref="UsedWaterformRef" :model="UsedWaterform" label-width="100px">
|
||||||
<el-form-item label="设备编号" prop="deviceCode"> {{ UsedWaterform.deviceCode }} </el-form-item>
|
<el-form-item label="设备编号" prop="deviceCode"> {{ UsedWaterform.deviceCode }} </el-form-item>
|
||||||
<el-form-item label="开始时间" prop="startTime">
|
<el-form-item label="开始时间" prop="startTime">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@@ -260,6 +271,7 @@ import { getHousePathById } from '@/utils/house';
|
|||||||
import { Upload } from '@element-plus/icons-vue';
|
import { Upload } from '@element-plus/icons-vue';
|
||||||
import { CascaderValue, tourEmits, UploadProps, UploadRawFile } from 'element-plus';
|
import { CascaderValue, tourEmits, UploadProps, UploadRawFile } from 'element-plus';
|
||||||
import { formatDate } from '@/utils/time';
|
import { formatDate } from '@/utils/time';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const huhao = 3096371295;
|
const huhao = 3096371295;
|
||||||
const uploadAUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadA';
|
const uploadAUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadA';
|
||||||
@@ -267,7 +279,7 @@ const uploadBUrl = import.meta.env.VITE_APP_BASE_API + '/waterDevice/uploadB';
|
|||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_waterdevice_on_status } = toRefs<any>(proxy?.useDict('com_waterdevice_on_status'));
|
const { com_waterdevice_on_status } = toRefs<any>(proxy?.useDict('com_waterdevice_on_status'));
|
||||||
const { com_electricity_readrecord_status } = toRefs<any>(proxy?.useDict('com_electricity_readrecord_status'));
|
const { com_water_readrecord_status } = toRefs<any>(proxy?.useDict('com_water_readrecord_status'));
|
||||||
|
|
||||||
const waterDeviceList = ref<WaterDeviceVO[]>([]);
|
const waterDeviceList = ref<WaterDeviceVO[]>([]);
|
||||||
const buttonLoading = ref(false);
|
const buttonLoading = ref(false);
|
||||||
@@ -318,6 +330,10 @@ const UsedWaterInfo = ref({
|
|||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: ''
|
endTime: ''
|
||||||
});
|
});
|
||||||
|
const rules = {
|
||||||
|
startTime: [{ required: true, message: '请选择开始时间', trigger: 'blur' }],
|
||||||
|
endTime: [{ required: true, message: '请选择结束时间', trigger: 'blur' }]
|
||||||
|
};
|
||||||
// ! =======================================================================================
|
// ! =======================================================================================
|
||||||
|
|
||||||
// ? 上传固件 ==============================================================================================
|
// ? 上传固件 ==============================================================================================
|
||||||
@@ -383,7 +399,7 @@ const EditHouseform = ref({
|
|||||||
/** 批量生成 条形码 */
|
/** 批量生成 条形码 */
|
||||||
function handleMarkqrcode() {
|
function handleMarkqrcode() {
|
||||||
if (ids.value.length > 0) {
|
if (ids.value.length > 0) {
|
||||||
WaterDeviceMakerQrcode(ids.value).then((res) => {
|
WaterDeviceMakerQrcode(ids.value).then(() => {
|
||||||
ElMessage.success('批量生成成功');
|
ElMessage.success('批量生成成功');
|
||||||
getList();
|
getList();
|
||||||
});
|
});
|
||||||
@@ -403,18 +419,23 @@ const handleSelectionChange = (selection: WaterDeviceVO[]) => {
|
|||||||
multiple.value = !selection.length;
|
multiple.value = !selection.length;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const loadingQRCode = ref([]);
|
||||||
/** 生成二维码 */
|
/** 生成二维码 */
|
||||||
const handleQrCode = (row: WaterDeviceVO) => {
|
const handleQrCode = (row: WaterDeviceVO) => {
|
||||||
// 1.电表 2.水表
|
loadingQRCode.value.push(row.id);
|
||||||
WaterDeviceMakerQrcode([
|
setTimeout(() => {
|
||||||
{
|
// 1.电表 2.水表
|
||||||
id: row.id,
|
WaterDeviceMakerQrcode([
|
||||||
deviceCode: row.deviceCode
|
{
|
||||||
}
|
id: row.id,
|
||||||
]).then(() => {
|
deviceCode: row.deviceCode
|
||||||
ElMessage.success('生成成功');
|
}
|
||||||
getList();
|
]).then(() => {
|
||||||
});
|
ElMessage.success('生成成功');
|
||||||
|
loadingQRCode.value = loadingQRCode.value.filter((item) => item !== row.id);
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
};
|
};
|
||||||
// * house
|
// * house
|
||||||
const treedata = ref([]);
|
const treedata = ref([]);
|
||||||
@@ -444,7 +465,7 @@ const handleOpenDialog = (type: 'usedWater' | 'Upload' | 'UpdateHouse', row: Wat
|
|||||||
}
|
}
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialogType.value = type;
|
dialogType.value = type;
|
||||||
dialog.title = type === 'usedWater' ? '用水量' : type === 'UpdateHouse' ? '编辑户号' : '更新固件';
|
dialog.title = type === 'usedWater' ? '用水量查询' : type === 'UpdateHouse' ? '编辑户号' : '更新固件';
|
||||||
};
|
};
|
||||||
|
|
||||||
function getTree() {
|
function getTree() {
|
||||||
@@ -461,6 +482,10 @@ const handleChangeWater = (val: string, row: WaterDeviceVO) => {};
|
|||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
if (dialogType.value === 'usedWater') {
|
if (dialogType.value === 'usedWater') {
|
||||||
|
if (UsedWaterform.value.startTime === '' || UsedWaterform.value.endTime === '') {
|
||||||
|
ElMessage.warning('请选择时间');
|
||||||
|
return;
|
||||||
|
}
|
||||||
UsedWaterformRef.value?.validate(async (valid: boolean) => {
|
UsedWaterformRef.value?.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
buttonLoading.value = true;
|
buttonLoading.value = true;
|
||||||
@@ -570,6 +595,12 @@ const download = (url: string) => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.actions {
|
||||||
|
:deep(.el-button > span) {
|
||||||
|
font-weight: 650;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.example-showcase .el-dropdown + .el-dropdown {
|
.example-showcase .el-dropdown + .el-dropdown {
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
}
|
}
|
||||||
@@ -581,6 +612,16 @@ const download = (url: string) => {
|
|||||||
}
|
}
|
||||||
.el-table {
|
.el-table {
|
||||||
height: calc(100% - 80px);
|
height: calc(100% - 80px);
|
||||||
|
:deep(.waterDevice_online) {
|
||||||
|
color: #3dd4a7;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
:deep(.waterDevice_offline) {
|
||||||
|
color: #ee1c25;
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.usedWaterbox {
|
.usedWaterbox {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="总用电量" prop="totalEnergy">
|
<el-form-item label="总用电量" prop="totalEnergy">
|
||||||
<el-input v-model="queryParams.totalEnergy" placeholder="请输入总用电量" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.totalEnergy" placeholder="请输入总用电量" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
<el-input v-model="queryParams.balance" placeholder="请输入当前余额" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.balance" placeholder="请输入当前余额" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['waterRecord:waterRecord:export']">导出</el-button>
|
<el-button type="warning" plain icon="Download" @click="handleExport" v-hasPermi="['waterRecord:waterRecord:export']">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="访客状态" prop="status">
|
<el-form-item label="访客状态" prop="status">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择访客状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="请选择访客状态" clearable>
|
||||||
<el-option v-for="dict in com_visitor_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in com_visitor_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
<el-input v-model="queryParams.visitorName" placeholder="请输入访客姓名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.visitorName" placeholder="请输入访客姓名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['repair:main:visitor']">访客详情</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['visitor:visitor:query']">访客详情</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="区域名称" prop="areaName">
|
<el-form-item label="区域名称" prop="areaName">
|
||||||
<el-input v-model="queryParams.areaName" placeholder="请输入区域名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.areaName" placeholder="请输入区域名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -12,8 +12,8 @@
|
|||||||
<el-input v-model="queryParams.areaCode" placeholder="请输入区域编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.areaCode" placeholder="请输入区域编号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
<el-card shadow="never" class="flex-1">
|
<el-card shadow="never" class="flex-1">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:carArea']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['area:area:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['carArea:edit:carArea']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['carArea:edit:carArea']"
|
||||||
@@ -35,8 +35,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['area:area:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['area:area:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['area:area:add'])"
|
||||||
|
:show-edit="checkPermi(['area:area:edit'])"
|
||||||
|
:show-delete="checkPermi(['area:area:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -49,12 +58,8 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['area:area:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['area:area:edit']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['area:area:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['area:area:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -68,6 +73,7 @@
|
|||||||
import Pageheader from '@/components/Pageheader/index.vue';
|
import Pageheader from '@/components/Pageheader/index.vue';
|
||||||
import { listArea, getArea, delArea, addArea, updateArea } from '@/api/system/carArea/index';
|
import { listArea, getArea, delArea, addArea, updateArea } from '@/api/system/carArea/index';
|
||||||
import { AreaVO, AreaQuery, AreaForm } from '@/api/system/carArea/type';
|
import { AreaVO, AreaQuery, AreaForm } from '@/api/system/carArea/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -150,10 +156,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: AreaVO) => {
|
const handleUpdate = async (row?: AreaVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/editCarArea',
|
path: '/carArea/editCarArea',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="车牌号" prop="carNum">
|
<el-form-item label="车牌号" prop="carNum">
|
||||||
<el-input v-model.trim="queryParams.carNum" placeholder="请输入车牌号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model.trim="queryParams.carNum" placeholder="请输入车牌号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
<el-input v-model.trim="queryParams.carColor" placeholder="请输入车身颜色" clearable @keyup.enter="handleQuery" />
|
<el-input v-model.trim="queryParams.carColor" placeholder="请输入车身颜色" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -26,16 +26,25 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:cars']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:cars']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['carArea:edit:car']">修改</el-button>
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['carArea:edit:car']">编辑</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['car:car:remove']">删除</el-button>
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['car:car:remove']">删除</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['car:car:add'])"
|
||||||
|
:show-edit="checkPermi(['car:car:edit'])"
|
||||||
|
:show-delete="checkPermi(['car:car:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -71,6 +80,7 @@ import Pageheader from '@/components/Pageheader/index.vue';
|
|||||||
import { listCar, getCar, delCar, addCar, updateCar } from '@/api/system/cars/index';
|
import { listCar, getCar, delCar, addCar, updateCar } from '@/api/system/cars/index';
|
||||||
import { CarVO, CarQuery, CarForm } from '@/api/system/cars/type';
|
import { CarVO, CarQuery, CarForm } from '@/api/system/cars/type';
|
||||||
import { listResident } from '@/api/system/resident';
|
import { listResident } from '@/api/system/resident';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -172,10 +182,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: CarVO) => {
|
const handleUpdate = async (row?: CarVO) => {
|
||||||
|
const id = row?.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/editCars',
|
path: '/carArea/editCars',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<pageheader></pageheader>
|
<pageheader></pageheader>
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="search">
|
<div v-show="showSearch" class="search">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true" label-width="85px">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true" label-width="85px">
|
||||||
<el-form-item label="客户端key" prop="clientKey">
|
<el-form-item label="客户端key" prop="clientKey">
|
||||||
<el-input v-model="queryParams.clientKey" placeholder="请输入客户端key" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.clientKey" placeholder="请输入客户端key" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="参数名称" prop="configName">
|
<el-form-item label="参数名称" prop="configName">
|
||||||
<el-input v-model="queryParams.configName" placeholder="请输入参数名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.configName" placeholder="请输入参数名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<el-button v-hasPermi="['system:config:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
<el-button v-hasPermi="['system:config:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:config:remove']" type="danger" plain icon="Refresh" @click="handleRefreshCache">刷新缓存</el-button>
|
<el-button v-hasPermi="['system:config:remove']" type="danger" plain @click="handleRefreshCache">刷新缓存</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
|
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="部门名称" prop="deptName">
|
<el-form-item label="部门名称" prop="deptName">
|
||||||
<el-input v-model="queryParams.deptName" placeholder="请输入部门名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.deptName" placeholder="请输入部门名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleTypeQuery">搜索</el-button>
|
<el-button type="primary" @click="handleTypeQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="handleTypeResetQuery">重置</el-button>
|
<el-button @click="handleTypeResetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -122,8 +122,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" :disabled="!hasCurrentDict" @click="handleDataQuery">搜索</el-button>
|
<el-button type="primary" :disabled="!hasCurrentDict" @click="handleDataQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" :disabled="!hasCurrentDict" @click="handleDataResetQuery">重置</el-button>
|
<el-button :disabled="!hasCurrentDict" @click="handleDataResetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="设备名称" prop="deviceName">
|
<el-form-item label="设备名称" prop="deviceName">
|
||||||
<el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.deviceName" placeholder="请输入设备名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:archive']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:archive']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -36,8 +36,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:device:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:device:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:device:add'])"
|
||||||
|
:show-edit="checkPermi(['system:device:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:device:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
<el-table v-loading="loading" border :data="deviceList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="deviceList" @selection-change="handleSelectionChange">
|
||||||
@@ -56,8 +65,8 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
<el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['equipment:main:archive']">查看详情</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:device:query']">查看详情</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['equipment:edit:archive']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:device:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:device:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:device:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -71,6 +80,7 @@
|
|||||||
<script setup name="Device" lang="ts">
|
<script setup name="Device" lang="ts">
|
||||||
import { listDevice, getDevice, delDevice, addDevice, updateDevice } from '@/api/system/equipment/archive';
|
import { listDevice, getDevice, delDevice, addDevice, updateDevice } from '@/api/system/equipment/archive';
|
||||||
import { DeviceVO, DeviceQuery, DeviceForm } from '@/api/system/equipment/archive/type';
|
import { DeviceVO, DeviceQuery, DeviceForm } from '@/api/system/equipment/archive/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_equipment_archive_status } = toRefs<any>(proxy?.useDict('com_equipment_archive_status'));
|
const { com_equipment_archive_status } = toRefs<any>(proxy?.useDict('com_equipment_archive_status'));
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleMain(scope.row)">详情</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)">详情</el-button>
|
||||||
<el-button link type="primary" @click="handleEdit(scope.row)">修改</el-button>
|
<el-button link type="primary" @click="handleEdit(scope.row)">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<el-input v-model="queryParams.categoryName" placeholder="请输入设备分类名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.categoryName" placeholder="请输入设备分类名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,20 +20,29 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:deviceCategory']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:deviceCategory:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['equipment:edit:deviceCategory']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:deviceCategory:edit']"
|
||||||
>修改</el-button
|
>修改</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['equipment:delete:deviceCategory']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:deviceCategory:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:deviceCategory:add'])"
|
||||||
|
:show-edit="checkPermi(['system:deviceCategory:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:deviceCategory:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -42,15 +51,15 @@
|
|||||||
<el-table-column label="设备分类名称" align="center" prop="categoryName" />
|
<el-table-column label="设备分类名称" align="center" prop="categoryName" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch inactive-text="停用" :inactive-value="1" :active-value="0" active-text="启用" v-model="scope.row.status"></el-switch>
|
<el-switch :inactive-value="1" :active-value="0" v-model="scope.row.status"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="添加时间" align="center" prop="createTime" />
|
<el-table-column label="添加时间" align="center" prop="createTime" />
|
||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['equipment:edit:deviceCategory']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:deviceCategory:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['equipment:delete:deviceCategory']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:deviceCategory:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -85,6 +94,7 @@
|
|||||||
<script setup name="DeviceCategory" lang="ts">
|
<script setup name="DeviceCategory" lang="ts">
|
||||||
import { listDeviceCategory, getDeviceCategory, delDeviceCategory, addDeviceCategory, updateDeviceCategory } from '@/api/system/equipment/Category';
|
import { listDeviceCategory, getDeviceCategory, delDeviceCategory, addDeviceCategory, updateDeviceCategory } from '@/api/system/equipment/Category';
|
||||||
import { DeviceCategoryVO, DeviceCategoryQuery, DeviceCategoryForm } from '@/api/system/equipment/Category/type';
|
import { DeviceCategoryVO, DeviceCategoryQuery, DeviceCategoryForm } from '@/api/system/equipment/Category/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_equipment_device_category } = toRefs<any>(proxy?.useDict('com_equipment_device_category'));
|
const { com_equipment_device_category } = toRefs<any>(proxy?.useDict('com_equipment_device_category'));
|
||||||
|
|||||||
@@ -12,8 +12,8 @@
|
|||||||
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.deviceCode" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:repair']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['equipment:add:repair']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -35,8 +35,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:deviceRepair:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:deviceRepair:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:deviceRepair:add'])"
|
||||||
|
:show-edit="checkPermi(['system:deviceRepair:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:deviceRepair:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -61,8 +70,8 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="160" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['equipment:main:repair']">详情</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['system:deviceRepair:query']">详情</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['equipment:edit:repair']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:deviceRepair:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:deviceRepair:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:deviceRepair:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -76,6 +85,7 @@
|
|||||||
<script setup name="DeviceRepair" lang="ts">
|
<script setup name="DeviceRepair" lang="ts">
|
||||||
import { listDeviceRepair, getDeviceRepair, delDeviceRepair, addDeviceRepair, updateDeviceRepair } from '@/api/system/equipment/Repair';
|
import { listDeviceRepair, getDeviceRepair, delDeviceRepair, addDeviceRepair, updateDeviceRepair } from '@/api/system/equipment/Repair';
|
||||||
import { DeviceRepairVO, DeviceRepairQuery, DeviceRepairForm } from '@/api/system/equipment/Repair/type';
|
import { DeviceRepairVO, DeviceRepairQuery, DeviceRepairForm } from '@/api/system/equipment/Repair/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_equipment_repair_status } = toRefs<any>(proxy?.useDict('com_equipment_repair_status'));
|
const { com_equipment_repair_status } = toRefs<any>(proxy?.useDict('com_equipment_repair_status'));
|
||||||
@@ -134,15 +144,18 @@ const data = reactive<PageData<DeviceRepairForm, DeviceRepairQuery>>({
|
|||||||
const { queryParams, form } = toRefs(data);
|
const { queryParams, form } = toRefs(data);
|
||||||
|
|
||||||
/** 查询维修工单列表 */
|
/** 查询维修工单列表 */
|
||||||
|
// TODO 设备维修记录 用户id有,用户信息没有
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
const res = await listDeviceRepair(queryParams.value);
|
const res = await listDeviceRepair(queryParams.value);
|
||||||
deviceRepairList.value = res.rows;
|
deviceRepairList.value = res.rows;
|
||||||
deviceRepairList.value.forEach((item) => {
|
deviceRepairList.value.forEach((item) => {
|
||||||
item.maintainUserNames = item.maintainUserList
|
if (item.maintainUserList && item.maintainUserList.length > 0) {
|
||||||
.map((i) => i.nickName)
|
item.maintainUserNames = item.maintainUserList
|
||||||
.filter((i) => i)
|
.map((i) => i.nickName)
|
||||||
.join(',');
|
.filter((i) => i)
|
||||||
|
.join(',');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
total.value = res.total;
|
total.value = res.total;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="buildingheader flex align-center justify-between">
|
<div class="buildingheader flex align-center justify-between">
|
||||||
<div>楼栋</div>
|
<div>楼栋</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="pointer" @click="handleAddBuilding" v-hasPermi="['house:add:building']">+增加楼栋</span>
|
<span class="pointer" @click="handleAddBuilding" v-hasPermi="['building:building:add']">+增加楼栋</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
>
|
>
|
||||||
<div class="buildingname" @click="switchBuilding(item.id ?? null)">{{ item.buildingName ?? '' }}</div>
|
<div class="buildingname" @click="switchBuilding(item.id ?? null)">{{ item.buildingName ?? '' }}</div>
|
||||||
<div class="buildactions flex align-center justify-around">
|
<div class="buildactions flex align-center justify-around">
|
||||||
<el-icon class="pointer hover-color-blue" @click="editBuilding(item.id)" v-hasPermi="['house:edit:building']"><Setting /></el-icon>
|
<el-icon class="pointer hover-color-blue" @click="editBuilding(item.id)" v-hasPermi="['building:building:edit']"><Setting /></el-icon>
|
||||||
<el-icon class="pointer hover-color-red" @click="deleteBuilding(item.id)" v-hasPermi="['house:delete:building']"><Delete /></el-icon>
|
<el-icon class="pointer hover-color-red" @click="deleteBuilding(item.id)" v-hasPermi="['building:building:remove']"><Delete /></el-icon>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -34,14 +34,20 @@ const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const menutlist = [
|
const menutlist = [
|
||||||
{ label: '编辑', value: 'edit' },
|
// { label: '编辑', value: 'edit' },
|
||||||
// { label: '收费标准', value: 'money' },
|
// { label: '收费标准', value: 'money' },
|
||||||
{ label: '详情', value: 'main' }
|
// { label: '详情', value: 'main' }
|
||||||
];
|
];
|
||||||
|
|
||||||
if (checkPermi(['house:delete:house'])) {
|
if (checkPermi(['system:house:remove'])) {
|
||||||
menutlist.push({ label: '删除', value: 'delete' });
|
menutlist.push({ label: '删除', value: 'delete' });
|
||||||
}
|
}
|
||||||
|
if (checkPermi(['system:house:edit'])) {
|
||||||
|
menutlist.push({ label: '编辑', value: 'edit' });
|
||||||
|
}
|
||||||
|
if (checkPermi(['system:house:query'])) {
|
||||||
|
menutlist.push({ label: '详情', value: 'main' });
|
||||||
|
}
|
||||||
function handleChangeCheckhouses(val: string[]) {
|
function handleChangeCheckhouses(val: string[]) {
|
||||||
houseStore.checkoutHousesFun([]);
|
houseStore.checkoutHousesFun([]);
|
||||||
houseStore.checkoutHousesFun(val);
|
houseStore.checkoutHousesFun(val);
|
||||||
|
|||||||
@@ -10,9 +10,9 @@
|
|||||||
<span class="mr-30px">楼栋结构:{{ houseStore.currentBuildingInfo?.buildStructure }} </span>
|
<span class="mr-30px">楼栋结构:{{ houseStore.currentBuildingInfo?.buildStructure }} </span>
|
||||||
</div>
|
</div>
|
||||||
<div class="rightActions">
|
<div class="rightActions">
|
||||||
<span class="mr-20px" @click="handleAddHouse" v-hasPermi="['house:add:house']">+增加房屋</span>
|
<span class="mr-20px" @click="handleAddHouse" v-hasPermi="['system:house:add']">+增加房屋</span>
|
||||||
<!-- <span class="mr-20px">收费标准设置</span> -->
|
<!-- <span class="mr-20px">收费标准设置</span> -->
|
||||||
<span @click="deleteAllhouse" v-hasPermi="['house:delete:house']">删除</span>
|
<span @click="deleteAllhouse" v-hasPermi="['system:house:remove']">删除</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="UnitBody">
|
<div class="UnitBody">
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
<el-input v-model="queryParams.rentalName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.rentalName" placeholder="请输入" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['houseRental:houseRental:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['houseRental:houseRental:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -39,8 +39,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['houseRental:houseRental:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['houseRental:houseRental:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['houseRental:houseRental:add'])"
|
||||||
|
:show-edit="checkPermi(['houseRental:houseRental:edit'])"
|
||||||
|
:show-delete="checkPermi(['houseRental:houseRental:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -68,7 +77,7 @@
|
|||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['houseRental:houseRental:edit']">详情</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['houseRental:houseRental:edit']">详情</el-button>
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseRental:houseRental:edit']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['houseRental:houseRental:query']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['houseRental:houseRental:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['houseRental:houseRental:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -83,6 +92,7 @@
|
|||||||
import Pageheader from '@/components/Pageheader/index.vue';
|
import Pageheader from '@/components/Pageheader/index.vue';
|
||||||
import { listHouseRental, delHouseRental } from '@/api/system/houseRental/index';
|
import { listHouseRental, delHouseRental } from '@/api/system/houseRental/index';
|
||||||
import { HouseRentalVO, HouseRentalQuery, HouseRentalForm } from '@/api/system/houseRental/type';
|
import { HouseRentalVO, HouseRentalQuery, HouseRentalForm } from '@/api/system/houseRental/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_house_use } = toRefs<any>(proxy?.useDict('com_house_use'));
|
const { com_house_use } = toRefs<any>(proxy?.useDict('com_house_use'));
|
||||||
@@ -199,10 +209,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: HouseRentalVO) => {
|
const handleUpdate = async (row?: HouseRentalVO) => {
|
||||||
|
const id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/edithouseRental',
|
path: '/house/edithouseRental',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="选择日期" prop="statDate">
|
<el-form-item label="选择日期" prop="statDate">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="starDate"
|
v-model="starDate"
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<span style="font-size: 1.2rem">日报列表</span>
|
<span style="font-size: 1.2rem">日报列表</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="项目名称" prop="itemName">
|
<el-form-item label="项目名称" prop="itemName">
|
||||||
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.itemName" placeholder="请输入项目名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -21,19 +21,26 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['inspection:add:item']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:item:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:item']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:item:edit']">编辑</el-button>
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:item:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:item:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:item:add'])"
|
||||||
|
:show-edit="checkPermi(['system:item:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:item:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -48,19 +55,13 @@
|
|||||||
v-model="scope.row.status"
|
v-model="scope.row.status"
|
||||||
active-value="1"
|
active-value="1"
|
||||||
inactive-value="0"
|
inactive-value="0"
|
||||||
active-text="关闭"
|
|
||||||
inactive-text="开启"
|
|
||||||
></el-switch>
|
></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="300" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="300" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:item:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:item']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:item:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:item:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
<script setup name="Item" lang="ts">
|
<script setup name="Item" lang="ts">
|
||||||
import { listItem, getItem, delItem, addItem, updateItem, updateItemStatus } from '@/api/system/InspectionItem/index';
|
import { listItem, getItem, delItem, addItem, updateItem, updateItemStatus } from '@/api/system/InspectionItem/index';
|
||||||
import { ItemVO, ItemQuery, ItemForm } from '@/api/system/InspectionItem/type';
|
import { ItemVO, ItemQuery, ItemForm } from '@/api/system/InspectionItem/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="选择日期" prop="itemName">
|
<el-form-item label="选择日期" prop="itemName">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="starDate"
|
v-model="starDate"
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -32,7 +32,6 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<span style="font-size: 1.2rem">月报列表</span>
|
<span style="font-size: 1.2rem">月报列表</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ import { Delete } from '@element-plus/icons-vue';
|
|||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
import { addPlan, getPlan, updatePlan } from '@/api/system/InspectionPlan';
|
import { addPlan, getPlan, updatePlan } from '@/api/system/InspectionPlan';
|
||||||
|
import { getVillageByIdAPI } from '@/api/system/community';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
|
const { com_inspection_remind_tiime } = toRefs<any>(proxy?.useDict('com_inspection_remind_tiime'));
|
||||||
@@ -204,7 +205,6 @@ function handlChangeMap(val) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await nextTick();
|
await nextTick();
|
||||||
window._AMapSecurityConfig = { securityJsCode: '09534b3534d8da53968529a9ce164118' };
|
window._AMapSecurityConfig = { securityJsCode: '09534b3534d8da53968529a9ce164118' };
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="巡检计划名称" prop="planName">
|
<el-form-item label="巡检计划名称" prop="planName">
|
||||||
<el-input v-model="queryParams.planName" placeholder="请输入巡检计划名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.planName" placeholder="请输入巡检计划名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,20 +20,27 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['inspection:add:plan']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:plan:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:plan']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:plan:edit']">编辑</el-button>
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:plan:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:plan:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:plan:add'])"
|
||||||
|
:show-edit="checkPermi(['system:plan:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:plan:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -50,12 +57,12 @@
|
|||||||
<el-table-column label="计划路线" align="center" prop="routeNames" />
|
<el-table-column label="计划路线" align="center" prop="routeNames" />
|
||||||
<el-table-column label="状态" width="150" align="center" prop="status">
|
<el-table-column label="状态" width="150" align="center" prop="status">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" active-text="关闭" inactive-text="开启"></el-switch>
|
<el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" width="110" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:plan']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:plan:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:plan:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:plan:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -69,6 +76,7 @@
|
|||||||
<script setup name="Plan" lang="ts">
|
<script setup name="Plan" lang="ts">
|
||||||
import { listPlan, getPlan, delPlan, addPlan, updatePlan } from '@/api/system/InspectionPlan/index';
|
import { listPlan, getPlan, delPlan, addPlan, updatePlan } from '@/api/system/InspectionPlan/index';
|
||||||
import { PlanVO, PlanQuery, PlanForm } from '@/api/system/InspectionPlan/type';
|
import { PlanVO, PlanQuery, PlanForm } from '@/api/system/InspectionPlan/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
import { numToWeek } from '@/utils/time';
|
import { numToWeek } from '@/utils/time';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ const submitForm = () => {
|
|||||||
// 返回
|
// 返回
|
||||||
const cancelForm = () => {
|
const cancelForm = () => {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/inspection/point'
|
path: '/Inspection/point'
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -170,6 +170,23 @@ onMounted(async () => {
|
|||||||
plugins: ['AMap.Scale', 'AMap.Marker']
|
plugins: ['AMap.Scale', 'AMap.Marker']
|
||||||
}).then(async (AMap) => {
|
}).then(async (AMap) => {
|
||||||
const villageinfo = await getVillageByIdAPI(villageid);
|
const villageinfo = await getVillageByIdAPI(villageid);
|
||||||
|
|
||||||
|
AMap.plugin('AMap.Geocoder', function () {
|
||||||
|
const city = villageinfo.data.city.replaceAll('/', '');
|
||||||
|
const geocoder = new AMap.Geocoder({
|
||||||
|
city: city // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
|
||||||
|
});
|
||||||
|
|
||||||
|
const address = villageinfo.data.address;
|
||||||
|
|
||||||
|
geocoder.getLocation(address, function (status, result) {
|
||||||
|
if (status === 'complete' && result.info === 'OK') {
|
||||||
|
// result中对应详细地理坐标信息
|
||||||
|
map.value.setCenter(result.geocodes[0].location.toArray());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
map.value = new AMap.Map('containerMap', {
|
map.value = new AMap.Map('containerMap', {
|
||||||
viewMode: '3D',
|
viewMode: '3D',
|
||||||
zoom: 11,
|
zoom: 11,
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form label-width="100px" ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form label-width="100px" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="巡检点名称" prop="pointName">
|
<el-form-item label="巡检点名称" prop="pointName">
|
||||||
<el-input v-model="queryParams.pointName" placeholder="请输入巡检点名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.pointName" placeholder="请输入巡检点名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,20 +20,27 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['inspection:add:point']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:point:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:point']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:point:edit']">编辑</el-button>
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:point:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:point:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:point:add'])"
|
||||||
|
:show-edit="checkPermi(['system:point:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:point:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -54,12 +61,8 @@
|
|||||||
<el-table-column label="添加时间" align="center" prop="createTime" />
|
<el-table-column label="添加时间" align="center" prop="createTime" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:point:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:point']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:point:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:point:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -73,6 +76,7 @@
|
|||||||
import PageHeader from '@/components/Pageheader/index.vue';
|
import PageHeader from '@/components/Pageheader/index.vue';
|
||||||
import { listPoint, getPoint, delPoint, addPoint, updatePoint } from '@/api/system/InspectionPoint/index';
|
import { listPoint, getPoint, delPoint, addPoint, updatePoint } from '@/api/system/InspectionPoint/index';
|
||||||
import { PointVO, PointQuery, PointForm } from '@/api/system/InspectionPoint/type';
|
import { PointVO, PointQuery, PointForm } from '@/api/system/InspectionPoint/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_inspection_point_status } = toRefs<any>(proxy?.useDict('com_inspection_point_status'));
|
const { com_inspection_point_status } = toRefs<any>(proxy?.useDict('com_inspection_point_status'));
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="执行状态" prop="status">
|
<el-form-item label="执行状态" prop="status">
|
||||||
<el-select v-model="queryParams.status">
|
<el-select v-model="queryParams.status">
|
||||||
<el-option v-for="item in com_inspection_task_status" :key="item.value" :value="item.value" :label="item.label"></el-option>
|
<el-option v-for="item in com_inspection_task_status" :key="item.value" :value="item.value" :label="item.label"></el-option>
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
<el-input v-model="queryParams.taskName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.taskName" placeholder="请输入任务名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -33,11 +33,11 @@
|
|||||||
</transition>
|
</transition>
|
||||||
|
|
||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<!-- <template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar ></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template> -->
|
||||||
|
|
||||||
<el-table v-loading="loading" border :data="recordList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" border :data="recordList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ import { addPoint, getPoint, listPoint, updatePoint } from '@/api/system/Inspect
|
|||||||
import { onMounted, onUnmounted } from 'vue';
|
import { onMounted, onUnmounted } from 'vue';
|
||||||
import AMapLoader from '@amap/amap-jsapi-loader';
|
import AMapLoader from '@amap/amap-jsapi-loader';
|
||||||
import { addRoute, getRoute, updateRoute } from '@/api/system/InspectionRoute';
|
import { addRoute, getRoute, updateRoute } from '@/api/system/InspectionRoute';
|
||||||
|
import { getVillageByIdAPI } from '@/api/system/community';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));
|
const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));
|
||||||
@@ -201,7 +202,7 @@ const markers = ref<Record<string, any>>({});
|
|||||||
|
|
||||||
const mouseTool = ref(null);
|
const mouseTool = ref(null);
|
||||||
const drawnPolylines = ref([]); // 存所有线条
|
const drawnPolylines = ref([]); // 存所有线条
|
||||||
|
const villageid = localStorage.getItem('villageid');
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
// 获取巡检点列表
|
// 获取巡检点列表
|
||||||
if (!routeid.value) {
|
if (!routeid.value) {
|
||||||
@@ -225,7 +226,26 @@ onMounted(async () => {
|
|||||||
zoom: 11,
|
zoom: 11,
|
||||||
center: [116.397428, 39.90923]
|
center: [116.397428, 39.90923]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const villageinfo = await getVillageByIdAPI(villageid);
|
||||||
|
AMap.plugin('AMap.Geocoder', function () {
|
||||||
|
const city = villageinfo.data.city.replaceAll('/', '');
|
||||||
|
const geocoder = new AMap.Geocoder({
|
||||||
|
city: city // city 指定进行编码查询的城市,支持传入城市名、adcode 和 citycode
|
||||||
|
});
|
||||||
|
|
||||||
|
const address = villageinfo.data.address;
|
||||||
|
|
||||||
|
geocoder.getLocation(address, function (status, result) {
|
||||||
|
if (status === 'complete' && result.info === 'OK') {
|
||||||
|
// result中对应详细地理坐标信息
|
||||||
|
map.value.setCenter(result.geocodes[0].location.toArray());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
mapReady.value = true;
|
mapReady.value = true;
|
||||||
|
|
||||||
// 初始化绘图插件 MouseTool
|
// 初始化绘图插件 MouseTool
|
||||||
AMap.plugin(['AMap.MouseTool'], () => {
|
AMap.plugin(['AMap.MouseTool'], () => {
|
||||||
mouseTool.value = new AMap.MouseTool(map.value);
|
mouseTool.value = new AMap.MouseTool(map.value);
|
||||||
@@ -419,7 +439,7 @@ onUnmounted(() => {
|
|||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-right: 20px;
|
margin-right: 15px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" label-width="120px" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" label-width="120px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="巡检路线名称" prop="routeName">
|
<el-form-item label="巡检路线名称" prop="routeName">
|
||||||
<el-input v-model="queryParams.routeName" placeholder="请输入巡检路线名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.routeName" placeholder="请输入巡检路线名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,20 +20,27 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['inspection:add:route']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:route:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:route']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:route:edit']">编辑</el-button>
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:route:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:route:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:route:add'])"
|
||||||
|
:show-edit="checkPermi(['system:route:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:route:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -56,7 +63,7 @@
|
|||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-tooltip content="修改" placement="top">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:route']"></el-button>
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:route:edit']"></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip content="删除" placement="top">
|
<el-tooltip content="删除" placement="top">
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:route:remove']"></el-button>
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:route:remove']"></el-button>
|
||||||
@@ -111,6 +118,7 @@
|
|||||||
<script setup name="Route" lang="ts">
|
<script setup name="Route" lang="ts">
|
||||||
import { listRoute, getRoute, delRoute, addRoute, updateRoute } from '@/api/system/InspectionRoute/index';
|
import { listRoute, getRoute, delRoute, addRoute, updateRoute } from '@/api/system/InspectionRoute/index';
|
||||||
import { RouteVO, RouteQuery, RouteForm } from '@/api/system/InspectionRoute/type';
|
import { RouteVO, RouteQuery, RouteForm } from '@/api/system/InspectionRoute/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));
|
const { com_inspection_route_status } = toRefs<any>(proxy?.useDict('com_inspection_route_status'));
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -29,7 +29,9 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<el-col :span="1.5">
|
||||||
|
<span style="font-size: 1.2rem">统计列表</span>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" label-width="100px" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" label-width="100px" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="执行状态" prop="taskName">
|
<el-form-item label="执行状态" prop="taskName">
|
||||||
<el-select v-model="queryParams.status" placeholder="请选择执行状态" clearable>
|
<el-select v-model="queryParams.status" placeholder="请选择执行状态" clearable>
|
||||||
<el-option v-for="(item, index) in com_inspection_task_status" :key="index" :value="item.value" :label="item.label"></el-option>
|
<el-option v-for="(item, index) in com_inspection_task_status" :key="index" :value="item.value" :label="item.label"></el-option>
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -34,20 +34,27 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['inspection:add:task']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['system:task:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['inspection:edit:task']"
|
<el-button type="success" plain icon="Edit" :disabled="single" @click="handleUpdate()" v-hasPermi="['system:task:edit']">编辑</el-button>
|
||||||
>修改</el-button
|
|
||||||
>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:task:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['system:task:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:task:add'])"
|
||||||
|
:show-edit="checkPermi(['system:task:edit'])"
|
||||||
|
:show-delete="checkPermi(['system:task:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -70,12 +77,8 @@
|
|||||||
<el-table-column label="关联巡检计划" align="center" prop="planId" />
|
<el-table-column label="关联巡检计划" align="center" prop="planId" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['system:task:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['inspection:edit:task']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:task:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:task:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -88,6 +91,7 @@
|
|||||||
<script setup name="Task" lang="ts">
|
<script setup name="Task" lang="ts">
|
||||||
import { listTask, getTask, delTask, addTask, updateTask } from '@/api/system/InspectionTask/index';
|
import { listTask, getTask, delTask, addTask, updateTask } from '@/api/system/InspectionTask/index';
|
||||||
import { TaskVO, TaskQuery, TaskForm } from '@/api/system/InspectionTask/type';
|
import { TaskVO, TaskQuery, TaskForm } from '@/api/system/InspectionTask/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_inspection_task_status } = toRefs<any>(proxy?.useDict('com_inspection_task_status'));
|
const { com_inspection_task_status } = toRefs<any>(proxy?.useDict('com_inspection_task_status'));
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="选择日期" prop="itemName">
|
<el-form-item label="选择日期" prop="itemName">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="starDate"
|
v-model="starDate"
|
||||||
@@ -18,8 +18,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -30,14 +30,13 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<span style="font-size: 1.2rem">月报列表</span>
|
<span style="font-size: 1.2rem">周报列表</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<el-table v-loading="loading" border :data="itemList">
|
<el-table v-loading="loading" border :data="itemList">
|
||||||
<el-table-column label="日期" width="100" align="center" prop="statDate" />
|
<el-table-column label="日期" width="120" align="center" prop="statDate" />
|
||||||
<el-table-column label="计划巡检任务" width="120" align="center" prop="totalPlans" />
|
<el-table-column label="计划巡检任务" width="120" align="center" prop="totalPlans" />
|
||||||
<el-table-column label="按时完成" align="center" prop="completedTasks" />
|
<el-table-column label="按时完成" align="center" prop="completedTasks" />
|
||||||
<el-table-column label="超时完成" align="center" prop="outCompletedTasks" />
|
<el-table-column label="超时完成" align="center" prop="outCompletedTasks" />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="菜单名称" prop="menuName">
|
<el-form-item label="菜单名称" prop="menuName">
|
||||||
<el-input v-model="queryParams.menuName" placeholder="请输入菜单名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.menuName" placeholder="请输入菜单名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -14,8 +14,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="公告标题" prop="noticeTitle">
|
<el-form-item label="公告标题" prop="noticeTitle">
|
||||||
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.noticeTitle" placeholder="请输入公告标题" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="配置key" prop="configKey">
|
<el-form-item label="配置key" prop="configKey">
|
||||||
<el-input v-model="queryParams.configKey" placeholder="配置key" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.configKey" placeholder="配置key" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="文件名" prop="fileName">
|
<el-form-item label="文件名" prop="fileName">
|
||||||
<el-input v-model="queryParams.fileName" placeholder="请输入文件名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.fileName" placeholder="请输入文件名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="search" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="车位状态" prop="parkingStatus">
|
<el-form-item label="车位状态" prop="parkingStatus">
|
||||||
<el-select v-model="queryParams.parkingStatus" placeholder="请选择" clearable>
|
<el-select v-model="queryParams.parkingStatus" placeholder="请选择" clearable>
|
||||||
<el-option v-for="dict in com_parking_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
<el-option v-for="dict in com_parking_status" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
<el-input v-model="queryParams.parkingCode" placeholder="请输入车位编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.parkingCode" placeholder="请输入车位编号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:parking']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['carArea:add:parking']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -42,8 +42,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['parking:parking:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['parking:parking:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['parking:parking:add'])"
|
||||||
|
:show-edit="checkPermi(['parking:parking:edit'])"
|
||||||
|
:show-delete="checkPermi(['parking:parking:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -74,9 +83,9 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" icon="Edit" @click="handleMain(scope.row)" v-hasPermi="['carArea:main:parking']">审核</el-button>
|
<el-button link type="primary" @click="handleMain(scope.row)" v-hasPermi="['parking:parking:query']">审核</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['carArea:edit:parking']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['parking:parking:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['parking:parking:remove']">删除</el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['parking:parking:remove']">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -90,6 +99,7 @@
|
|||||||
import Pageheader from '@/components/Pageheader/index.vue';
|
import Pageheader from '@/components/Pageheader/index.vue';
|
||||||
import { listParking, getParking, delParking, addParking, updateParking } from '@/api/system/parking/index';
|
import { listParking, getParking, delParking, addParking, updateParking } from '@/api/system/parking/index';
|
||||||
import { ParkingVO, ParkingQuery, ParkingForm } from '@/api/system/parking/type';
|
import { ParkingVO, ParkingQuery, ParkingForm } from '@/api/system/parking/type';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { com_review } = toRefs<any>(proxy?.useDict('com_review'));
|
const { com_review } = toRefs<any>(proxy?.useDict('com_review'));
|
||||||
@@ -185,10 +195,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ParkingVO) => {
|
const handleUpdate = async (row?: ParkingVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/carArea/editParking',
|
path: '/carArea/editParking',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="岗位编码" prop="postCode">
|
<el-form-item label="岗位编码" prop="postCode">
|
||||||
<el-input v-model="queryParams.postCode" placeholder="请输入岗位编码" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.postCode" placeholder="请输入岗位编码" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -55,8 +55,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="住户类型" prop="type">
|
<el-form-item label="住户类型" prop="type">
|
||||||
<el-select v-model="queryParams.type" placeholder="请输入住户类型" style="width: 240px">
|
<el-select v-model="queryParams.type" placeholder="请输入住户类型" style="width: 240px">
|
||||||
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in com_resident_relationship" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
@@ -16,8 +16,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-1 h-full">
|
<div class="flex-1 h-full">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['resident:resident:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['resident:resident:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -47,8 +47,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['resident:resident:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['resident:resident:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['resident:resident:add'])"
|
||||||
|
:show-edit="checkPermi(['resident:resident:edit'])"
|
||||||
|
:show-delete="checkPermi(['resident:resident:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table class="tablebox" v-loading="loading" border :data="residentList" @selection-change="handleSelectionChange">
|
<el-table class="tablebox" v-loading="loading" border :data="residentList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
@@ -68,19 +77,11 @@
|
|||||||
<el-table-column label="房间" min-width="120" align="center" prop="houseAddress" />
|
<el-table-column label="房间" min-width="120" align="center" prop="houseAddress" />
|
||||||
<el-table-column label="操作" align="center" min-width="120" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" min-width="120" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button
|
<el-button v-if="scope.row.status !== '1'" link type="primary" @click="handleMain(scope.row)" v-hasPermi="['resident:resident:edit']"
|
||||||
v-if="scope.row.status !== '1'"
|
|
||||||
link
|
|
||||||
type="primary"
|
|
||||||
icon="Edit"
|
|
||||||
@click="handleMain(scope.row)"
|
|
||||||
v-hasPermi="['resident:resident:edit']"
|
|
||||||
>审核</el-button
|
>审核</el-button
|
||||||
>
|
>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['resident:resident:edit']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['resident:resident:edit']">编辑</el-button>
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['resident:resident:remove']"
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['resident:resident:remove']">删除 </el-button>
|
||||||
>删除
|
|
||||||
</el-button>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -103,6 +104,7 @@ import { listResident, delResident } from '@/api/system/resident/index';
|
|||||||
import { ResidentVO, ResidentQuery, ResidentForm } from '@/api/system/resident/type';
|
import { ResidentVO, ResidentQuery, ResidentForm } from '@/api/system/resident/type';
|
||||||
import { getHousePathById } from '@/utils/house';
|
import { getHousePathById } from '@/utils/house';
|
||||||
import { useHouseStore } from '@/store/modules/house';
|
import { useHouseStore } from '@/store/modules/house';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const houseStore = useHouseStore();
|
const houseStore = useHouseStore();
|
||||||
const currentVilageInfo = ref({
|
const currentVilageInfo = ref({
|
||||||
@@ -334,10 +336,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: ResidentVO) => {
|
const handleUpdate = async (row?: ResidentVO) => {
|
||||||
|
const _id = row.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/editResident',
|
path: '/house/editResident',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: _id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
310
src/views/system/role/addRole.vue
Normal file
310
src/views/system/role/addRole.vue
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
<template>
|
||||||
|
<div class="AddBuildingBox">
|
||||||
|
<PageHeader></PageHeader>
|
||||||
|
<div class="AddBuildingBody">
|
||||||
|
<div class="title">基本信息</div>
|
||||||
|
<div class="addBuildingFormBody formBody">
|
||||||
|
<el-form ref="roleFormRef" :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="角色名称" prop="roleName">
|
||||||
|
<el-input v-model="form.roleName" placeholder="请输入角色名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item prop="roleKey">
|
||||||
|
<template #label>
|
||||||
|
<span>
|
||||||
|
<el-tooltip content="控制器中定义的权限字符" placement="top">
|
||||||
|
<el-icon><question-filled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
权限字符
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<el-input v-model="form.roleKey" placeholder="请输入权限字符" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="角色顺序" prop="roleSort">
|
||||||
|
<el-input-number v-model="form.roleSort" controls-position="right" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="状态">
|
||||||
|
<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="菜单权限">
|
||||||
|
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
|
||||||
|
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
|
||||||
|
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
|
||||||
|
<el-tree
|
||||||
|
ref="menuRef"
|
||||||
|
class="tree-border"
|
||||||
|
:data="menuOptions"
|
||||||
|
show-checkbox
|
||||||
|
node-key="id"
|
||||||
|
:check-strictly="!form.menuCheckStrictly"
|
||||||
|
empty-text="加载中,请稍候"
|
||||||
|
:props="{ label: 'label', children: 'children' }"
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="dialog-footer text-center">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import api from '@/api/system/user';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import PageHeader from '@/components/Pageheader/index.vue';
|
||||||
|
import { getCommunitylistAPI } from '@/api/system/community';
|
||||||
|
import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index';
|
||||||
|
import { addRole, getRole, updateRole } from '@/api/system/role';
|
||||||
|
import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types';
|
||||||
|
import { DeptTreeOption } from '@/api/system/role/types';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
const { sys_normal_disable } = toRefs<any>(proxy?.useDict('sys_normal_disable'));
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const formRef = ref();
|
||||||
|
|
||||||
|
const userid = ref(null);
|
||||||
|
const menuRef = ref();
|
||||||
|
const roleFormRef = ref<ElFormInstance>();
|
||||||
|
const menuOptions = ref<MenuTreeOption[]>([]);
|
||||||
|
const menuExpand = ref(false);
|
||||||
|
const menuNodeAll = ref(false);
|
||||||
|
|
||||||
|
const form = ref({
|
||||||
|
roleId: undefined,
|
||||||
|
roleSort: 1,
|
||||||
|
status: '0',
|
||||||
|
roleName: '',
|
||||||
|
roleKey: '',
|
||||||
|
menuCheckStrictly: true,
|
||||||
|
deptCheckStrictly: true,
|
||||||
|
remark: '',
|
||||||
|
dataScope: '1',
|
||||||
|
menuIds: [],
|
||||||
|
deptIds: []
|
||||||
|
});
|
||||||
|
|
||||||
|
const rules = ref({
|
||||||
|
roleName: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }],
|
||||||
|
roleKey: [{ required: true, message: '权限字符不能为空', trigger: 'blur' }],
|
||||||
|
roleSort: [{ required: true, message: '角色顺序不能为空', trigger: 'blur' }]
|
||||||
|
});
|
||||||
|
|
||||||
|
async function init() {
|
||||||
|
if (route.query.id) {
|
||||||
|
const { data } = await getRole(userid.value);
|
||||||
|
Object.assign(form.value, data);
|
||||||
|
form.value.roleSort = Number(form.value.roleSort);
|
||||||
|
const res = await getRoleMenuTreeselect(userid.value);
|
||||||
|
res.checkedKeys.forEach((v) => {
|
||||||
|
nextTick(() => {
|
||||||
|
menuRef.value?.setChecked(v, true, false);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
getMenuTreeselect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** 查询菜单树结构 */
|
||||||
|
const getMenuTreeselect = async () => {
|
||||||
|
const res = await menuTreeselect();
|
||||||
|
menuOptions.value = res.data;
|
||||||
|
};
|
||||||
|
/** 根据角色ID查询菜单树结构 */
|
||||||
|
const getRoleMenuTreeselect = (roleId: string | number) => {
|
||||||
|
return roleMenuTreeselect(roleId).then((res): RoleMenuTree => {
|
||||||
|
menuOptions.value = res.data.menus;
|
||||||
|
return res.data;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
/** 树权限(展开/折叠)*/
|
||||||
|
const handleCheckedTreeExpand = (value: boolean, type: string) => {
|
||||||
|
if (type == 'menu') {
|
||||||
|
const treeList = menuOptions.value;
|
||||||
|
for (let i = 0; i < treeList.length; i++) {
|
||||||
|
if (menuRef.value) {
|
||||||
|
menuRef.value.store.nodesMap[treeList[i].id].expanded = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (type == 'dept') {
|
||||||
|
// const treeList = deptOptions.value;
|
||||||
|
// for (let i = 0; i < treeList.length; i++) {
|
||||||
|
// if (deptRef.value) {
|
||||||
|
// deptRef.value.store.nodesMap[treeList[i].id].expanded = value;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/** 树权限(全选/全不选) */
|
||||||
|
const handleCheckedTreeNodeAll = (value: any, type: string) => {
|
||||||
|
if (type == 'menu') {
|
||||||
|
menuRef.value?.setCheckedNodes(value ? (menuOptions.value as any) : []);
|
||||||
|
} else if (type == 'dept') {
|
||||||
|
// deptRef.value?.setCheckedNodes(value ? (deptOptions.value as any) : []);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/** 树权限(父子联动) */
|
||||||
|
const handleCheckedTreeConnect = (value: any, type: string) => {
|
||||||
|
if (type == 'menu') {
|
||||||
|
form.value.menuCheckStrictly = value;
|
||||||
|
} else if (type == 'dept') {
|
||||||
|
// form.value.deptCheckStrictly = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/** 所有菜单节点数据 */
|
||||||
|
const getMenuAllCheckedKeys = (): any => {
|
||||||
|
// 目前被选中的菜单节点
|
||||||
|
const checkedKeys = menuRef.value?.getCheckedKeys();
|
||||||
|
// 半选中的菜单节点
|
||||||
|
const halfCheckedKeys = menuRef.value?.getHalfCheckedKeys();
|
||||||
|
if (halfCheckedKeys) {
|
||||||
|
checkedKeys?.unshift(...halfCheckedKeys);
|
||||||
|
}
|
||||||
|
return checkedKeys;
|
||||||
|
};
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
|
||||||
|
// !== 提交 =============================================================================
|
||||||
|
/** 提交按钮 */
|
||||||
|
const submitForm = () => {
|
||||||
|
roleFormRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
form.value.menuIds = getMenuAllCheckedKeys();
|
||||||
|
form.value.roleId ? await updateRole(form.value) : await addRole(form.value);
|
||||||
|
proxy?.$modal.msgSuccess('操作成功');
|
||||||
|
cancel();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
/** 取消按钮 */
|
||||||
|
const cancel = () => {
|
||||||
|
cancelForm();
|
||||||
|
};
|
||||||
|
// 推出
|
||||||
|
const cancelForm = () => {
|
||||||
|
router.back();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.AddBuildingBox {
|
||||||
|
padding: 15px;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.AddBuildingBody {
|
||||||
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: white;
|
||||||
|
padding: 15px;
|
||||||
|
.title {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
padding-left: 20px;
|
||||||
|
background-color: rgba(255, 255, 255, 1);
|
||||||
|
color: rgba(16, 16, 16, 1);
|
||||||
|
border-bottom: 1px solid #bbbbbb;
|
||||||
|
margin-bottom: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formBody {
|
||||||
|
width: 550px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.residentBox {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 10px 5px;
|
||||||
|
}
|
||||||
|
.checkoutSideUsesbox {
|
||||||
|
// display: grid;
|
||||||
|
// grid-template-columns: repeat(3, 1fr);
|
||||||
|
// gap: 5px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-content: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 5px;
|
||||||
|
li {
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
min-width: 240px;
|
||||||
|
height: 35px;
|
||||||
|
padding: 0 10px;
|
||||||
|
line-height: 35px;
|
||||||
|
|
||||||
|
background-color: #f3f9ff;
|
||||||
|
border: 1px solid #8fc0f1;
|
||||||
|
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
@media (max-width: 2000px) {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1650px) {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1650px) {
|
||||||
|
font-size: 8px;
|
||||||
|
}
|
||||||
|
.el-icon {
|
||||||
|
margin-left: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.add {
|
||||||
|
cursor: pointer;
|
||||||
|
justify-content: center;
|
||||||
|
color: #409eff;
|
||||||
|
border: 1px dashed #409eff;
|
||||||
|
background-color: transparent;
|
||||||
|
&:hover {
|
||||||
|
background-color: #40a0ff10;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:deep(.el-form-item__content, .el-select, .el-input) {
|
||||||
|
width: 350px !important;
|
||||||
|
margin-right: 10px;
|
||||||
|
.el-cascader {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.el-button {
|
||||||
|
width: 80px;
|
||||||
|
height: 35px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="search">
|
<div v-show="showSearch" class="search">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="用户名称" prop="userName">
|
<el-form-item label="用户名称" prop="userName">
|
||||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="角色名称" prop="roleName">
|
<el-form-item label="角色名称" prop="roleName">
|
||||||
<el-input v-model="queryParams.roleName" placeholder="请输入角色名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.roleName" placeholder="请输入角色名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -29,8 +29,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -40,19 +40,33 @@
|
|||||||
<el-card class="flex-1" shadow="hover">
|
<el-card class="flex-1" shadow="hover">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:role:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
<el-button v-hasPermi="['system:role:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:role:edit']" type="success" plain :disabled="single" icon="Edit" @click="handleUpdate()">修改</el-button>
|
<el-button v-hasPermi="['system:role:edit']" type="success" plain :disabled="single" icon="Edit" @click="handleUpdate()">编辑</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:role:remove']" type="danger" plain :disabled="ids.length === 0" @click="handleDelete()">删除</el-button>
|
<el-button v-hasPermi="['system:role:remove']" type="danger" plain :disabled="ids.length === 0" @click="handleDelete()">删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:role:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
<el-button v-hasPermi="['system:role:export']" type="warning" plain icon="Download" @click="handleExport">导出</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:show-search="showSearch" @query-table="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['system:role:add'])"
|
||||||
|
:show-edit="false"
|
||||||
|
:show-delete="false"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
>
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-item v-if="checkPermi(['system:role:export'])" @click="handleExport">
|
||||||
|
<div>导出</div>
|
||||||
|
</el-dropdown-item>
|
||||||
|
</template>
|
||||||
|
</right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -198,6 +212,7 @@ import { addRole, changeRoleStatus, dataScope, delRole, getRole, listRole, updat
|
|||||||
import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index';
|
import { roleMenuTreeselect, treeselect as menuTreeselect } from '@/api/system/menu/index';
|
||||||
import { RoleVO, RoleForm, RoleQuery, DeptTreeOption } from '@/api/system/role/types';
|
import { RoleVO, RoleForm, RoleQuery, DeptTreeOption } from '@/api/system/role/types';
|
||||||
import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types';
|
import { MenuTreeOption, RoleMenuTree } from '@/api/system/menu/types';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
@@ -369,6 +384,10 @@ const reset = () => {
|
|||||||
|
|
||||||
/** 添加角色 */
|
/** 添加角色 */
|
||||||
const handleAdd = () => {
|
const handleAdd = () => {
|
||||||
|
router.push({
|
||||||
|
path: '/system/addRole'
|
||||||
|
});
|
||||||
|
return;
|
||||||
reset();
|
reset();
|
||||||
getMenuTreeselect();
|
getMenuTreeselect();
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
@@ -376,6 +395,14 @@ const handleAdd = () => {
|
|||||||
};
|
};
|
||||||
/** 修改角色 */
|
/** 修改角色 */
|
||||||
const handleUpdate = async (row?: RoleVO) => {
|
const handleUpdate = async (row?: RoleVO) => {
|
||||||
|
const roleId2 = row?.roleId || ids.value[0];
|
||||||
|
router.push({
|
||||||
|
path: '/system/addRole',
|
||||||
|
query: {
|
||||||
|
id: roleId2
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
reset();
|
reset();
|
||||||
const roleId = row?.roleId || ids.value[0];
|
const roleId = row?.roleId || ids.value[0];
|
||||||
const { data } = await getRole(roleId);
|
const { data } = await getRole(roleId);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-dialog v-model="visible" title="选择用户" width="800px" top="5vh" append-to-body>
|
<el-dialog v-model="visible" title="选择用户" width="800px" top="5vh" append-to-body>
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="用户名称" prop="userName">
|
<el-form-item label="用户名称" prop="userName">
|
||||||
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.userName" placeholder="请输入用户名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -9,8 +9,8 @@
|
|||||||
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.phonenumber" placeholder="请输入手机号码" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-row>
|
<el-row>
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ const flowLineOption = shallowRef<EChartsOption>({
|
|||||||
}
|
}
|
||||||
.searchLabel {
|
.searchLabel {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
font-size: 0.8rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
// 入住清空
|
// 入住清空
|
||||||
.cardbox {
|
.cardbox {
|
||||||
|
|||||||
@@ -443,7 +443,7 @@ const flowLineOption = shallowRef<EChartsOption>({
|
|||||||
}
|
}
|
||||||
.searchLabel {
|
.searchLabel {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
font-size: 0.8rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
// 入住清空
|
// 入住清空
|
||||||
.cardbox {
|
.cardbox {
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form label-width="100" ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form label-width="100" ref="queryFormRef" @submit.prevent="handleQuery" :model="queryParams" :inline="true">
|
||||||
<el-form-item label="储藏室号" prop="storeroomNo">
|
<el-form-item label="储藏室号" prop="storeroomNo">
|
||||||
<el-input v-model="queryParams.storeroomNo" placeholder="请输入储藏室号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.storeroomNo" placeholder="请输入储藏室号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-card shadow="never">
|
<el-card shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['storeroom:storeroom:add']">新增</el-button>
|
<el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['storeroom:storeroom:add']">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -32,8 +32,17 @@
|
|||||||
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['storeroom:storeroom:remove']"
|
<el-button type="danger" plain icon="Delete" :disabled="multiple" @click="handleDelete()" v-hasPermi="['storeroom:storeroom:remove']"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="checkPermi(['storeroom:storeroom:add'])"
|
||||||
|
:show-edit="checkPermi(['storeroom:storeroom:edit'])"
|
||||||
|
:show-delete="checkPermi(['storeroom:storeroom:remove'])"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -48,12 +57,8 @@
|
|||||||
<el-table-column label="备注" align="center" prop="remark" />
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tooltip content="修改" placement="top">
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['storeroom:storeroom:edit']">修改</el-button>
|
||||||
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['storeroom:storeroom:edit']"></el-button>
|
<el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['storeroom:storeroom:remove']">删除</el-button>
|
||||||
</el-tooltip>
|
|
||||||
<el-tooltip content="删除" placement="top">
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['storeroom:storeroom:remove']"></el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -68,6 +73,7 @@ import Pageheader from '@/components/Pageheader/index.vue';
|
|||||||
import { listStoreroom, getStoreroom, delStoreroom, addStoreroom, updateStoreroom } from '@/api/system/storeroom/index';
|
import { listStoreroom, getStoreroom, delStoreroom, addStoreroom, updateStoreroom } from '@/api/system/storeroom/index';
|
||||||
import { StoreroomVO, StoreroomQuery, StoreroomForm } from '@/api/system/storeroom/types';
|
import { StoreroomVO, StoreroomQuery, StoreroomForm } from '@/api/system/storeroom/types';
|
||||||
import { getBuildinglists } from '@/api/system/house';
|
import { getBuildinglists } from '@/api/system/house';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
@@ -180,10 +186,11 @@ const handleAdd = () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: StoreroomVO) => {
|
const handleUpdate = async (row?: StoreroomVO) => {
|
||||||
|
const id = row?.id || ids.value[0];
|
||||||
router.push({
|
router.push({
|
||||||
path: '/house/EditStoreRoom',
|
path: '/house/EditStoreRoom',
|
||||||
query: {
|
query: {
|
||||||
id: row.id
|
id: id
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="租户编号" prop="tenantId">
|
<el-form-item label="租户编号" prop="tenantId">
|
||||||
<el-input v-model="queryParams.tenantId" placeholder="请输入租户编号" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.tenantId" placeholder="请输入租户编号" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
<el-input v-model="queryParams.companyName" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.companyName" placeholder="请输入企业名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="套餐名称" prop="packageName">
|
<el-form-item label="套餐名称" prop="packageName">
|
||||||
<el-input v-model="queryParams.packageName" placeholder="请输入套餐名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.packageName" placeholder="请输入套餐名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<el-input v-model="queryParams.title" placeholder="请输入问卷标题" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.title" placeholder="请输入问卷标题" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" :icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" : @click="handleQuery">搜索</el-button>
|
||||||
<el-button :icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button :@click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain :icon="Plus" @click="handleAdd">新增问卷</el-button>
|
<el-button type="primary" plain :icon="Plus" @click="handleAdd">新增问卷</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList" />
|
<right-toolbar />
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<!-- 数据表格 -->
|
<!-- 数据表格 -->
|
||||||
|
|||||||
289
src/views/system/user/addUser.vue
Normal file
289
src/views/system/user/addUser.vue
Normal file
@@ -0,0 +1,289 @@
|
|||||||
|
<template>
|
||||||
|
<div class="AddBuildingBox">
|
||||||
|
<PageHeader></PageHeader>
|
||||||
|
<div class="AddBuildingBody">
|
||||||
|
<div class="title">基本信息</div>
|
||||||
|
<div class="addBuildingFormBody">
|
||||||
|
<el-form class="formBody" label-position="right" ref="formRef" :model="form" :rules="rules" label-width="130px">
|
||||||
|
<el-form-item label="员工姓名" prop="nickName">
|
||||||
|
<el-input v-model.trim="form.nickName" placeholder="请输入员工姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="登录账号" prop="userName">
|
||||||
|
<el-input v-model.trim="form.userName" placeholder="请输入登录账号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="登录密码" prop="password">
|
||||||
|
<el-input v-model.trim="form.password" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="员工头像" prop="chargeScope"></el-form-item>
|
||||||
|
<el-form-item label="员工性别" prop="chargeScope">
|
||||||
|
<el-select v-model="form.sex" placeholder="请选择">
|
||||||
|
<el-option v-for="dict in sys_user_sex" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="员工角色" prop="roleIds">
|
||||||
|
<el-select v-model="form.roleIds" multiple>
|
||||||
|
<el-option v-for="(item, index) in roleOptions" :key="index" :value="item.roleId" :label="item.roleName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="管理小区" prop="checkvillage">
|
||||||
|
<el-select v-model="checkvillage" multiple @change="handleChangeVillage">
|
||||||
|
<el-option v-for="(item, index) in vilageList" :key="index" :value="item.villageId" :label="item.villageName"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="手机号" prop="phonenumber">
|
||||||
|
<el-input v-model.trim="form.phonenumber" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="邮箱" prop="email">
|
||||||
|
<el-input v-model.trim="form.email" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input type="textarea" :rows="5" v-model.trim="form.remark" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item style="margin-top: 30px">
|
||||||
|
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||||
|
<el-button @click="cancelForm">返回</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import api from '@/api/system/user';
|
||||||
|
import { ref } from 'vue';
|
||||||
|
import PageHeader from '@/components/Pageheader/index.vue';
|
||||||
|
import { getCommunitylistAPI } from '@/api/system/community';
|
||||||
|
import { validator } from '@/utils/Reg';
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
|
|
||||||
|
const { com_bill_charge_period } = toRefs<any>(proxy?.useDict('com_bill_charge_period'));
|
||||||
|
const { sys_user_sex } = toRefs<any>(proxy?.useDict('sys_user_sex'));
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const route = useRoute();
|
||||||
|
const formRef = ref();
|
||||||
|
|
||||||
|
const userid = ref(null);
|
||||||
|
const form = ref({
|
||||||
|
'userId': null,
|
||||||
|
'userName': '', // >= 0 && <= 30 账号
|
||||||
|
'nickName': '', // >= 0 && <= 30 昵称
|
||||||
|
// 'userType': '', // 用户类型(sys_user系统用户)
|
||||||
|
'villageIds': '', // 管理小区id串
|
||||||
|
'email': '', // >= 0 && <= 50
|
||||||
|
'phonenumber': '', // 手机号码
|
||||||
|
'sex': '', // 0男 1女 2未知
|
||||||
|
'status': '0', // (0正常 1停用)
|
||||||
|
'password': '', // 密码
|
||||||
|
'roleIds': [], // 角色组
|
||||||
|
'remark': ''
|
||||||
|
});
|
||||||
|
const rules = ref({
|
||||||
|
// 员工姓名:必填,长度限制
|
||||||
|
nickName: [
|
||||||
|
{ required: true, message: '请输入员工姓名', trigger: 'blur' },
|
||||||
|
{ min: 1, max: 30, message: '长度在 1 到 30 个字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
// 登录账号:必填,长度限制,通常建议增加唯一性校验(需后端配合或异步校验)
|
||||||
|
userName: [
|
||||||
|
{ required: true, message: '请输入登录账号', trigger: 'blur' },
|
||||||
|
{ min: 1, max: 30, message: '长度在 1 到 30 个字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
// 登录密码:必填,新增时必填,编辑时可选(通常逻辑),这里暂按必填处理,建议长度限制
|
||||||
|
password: [{ min: 5, max: 20, message: '长度在 5 到 20 个字符', trigger: 'blur' }],
|
||||||
|
roleIds: [{ required: true, message: '请选择员工角色', trigger: 'change' }],
|
||||||
|
phonenumber: [
|
||||||
|
{
|
||||||
|
validator: (_, val) => validator(val, 'phone'),
|
||||||
|
message: '请输入正确的手机号码',
|
||||||
|
trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
email: [{ type: 'email', message: '请输入正确的邮箱地址', trigger: 'blur' }]
|
||||||
|
});
|
||||||
|
// 选择小区
|
||||||
|
const checkvillage = ref([]);
|
||||||
|
// 角色列表
|
||||||
|
const roleOptions = ref([]);
|
||||||
|
|
||||||
|
async function init() {
|
||||||
|
if (route.query.id) {
|
||||||
|
userid.value = route.query.id;
|
||||||
|
api.getUser(userid.value).then((res) => {
|
||||||
|
form.value = {
|
||||||
|
'userId': res.data.user.userId,
|
||||||
|
'userName': res.data.user.userName, // >= 0 && <= 30 账号
|
||||||
|
'nickName': res.data.user.nickName, // >= 0 && <= 30 昵称
|
||||||
|
'villageIds': res.data.user.villageIds, // 管理小区id串
|
||||||
|
'status': res.data.user.status, // 0启用 1停用
|
||||||
|
'email': res.data.user.email, // >= 0 && <= 50
|
||||||
|
'phonenumber': res.data.user.phonenumber, // 手机号码
|
||||||
|
'sex': res.data.user.sex, // 0男 1女 2未知
|
||||||
|
'password': '', // 密码
|
||||||
|
'roleIds': res.data.roleIds ?? [], // 角色组
|
||||||
|
'remark': ''
|
||||||
|
};
|
||||||
|
roleOptions.value = [];
|
||||||
|
roleOptions.value = Array.from(new Map([...res.data.roles, ...res.data.user.roles].map((role) => [role.roleId, role])).values());
|
||||||
|
checkvillage.value = res.data.user.villageIds.split(',').filter((item) => item);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
const { data } = await api.getUser();
|
||||||
|
roleOptions.value = data.roles;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 小区列表
|
||||||
|
const vilageList = ref([]);
|
||||||
|
/** 查询小区列表 */
|
||||||
|
const getViliageList = async () => {
|
||||||
|
const res = await getCommunitylistAPI();
|
||||||
|
vilageList.value = res.rows;
|
||||||
|
console.log(vilageList.value);
|
||||||
|
};
|
||||||
|
onMounted(() => {
|
||||||
|
getViliageList();
|
||||||
|
init();
|
||||||
|
});
|
||||||
|
|
||||||
|
function handleChangeVillage(value: string[]) {
|
||||||
|
console.log(value);
|
||||||
|
form.value.villageIds = value.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
// !== 提交 =============================================================================
|
||||||
|
const submitForm = () => {
|
||||||
|
formRef.value?.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
if (userid.value) {
|
||||||
|
api.updateUser(form.value).then(() => {
|
||||||
|
ElMessage.success('编辑成功');
|
||||||
|
cancelForm();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
api.addUser(form.value).then(() => {
|
||||||
|
ElMessage.success('添加成功');
|
||||||
|
cancelForm();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
// 推出
|
||||||
|
const cancelForm = () => {
|
||||||
|
router.back();
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.AddBuildingBox {
|
||||||
|
padding: 15px;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.AddBuildingBody {
|
||||||
|
margin-top: 20px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
background-color: white;
|
||||||
|
padding: 15px;
|
||||||
|
.title {
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
padding-left: 20px;
|
||||||
|
background-color: rgba(255, 255, 255, 1);
|
||||||
|
color: rgba(16, 16, 16, 1);
|
||||||
|
border-bottom: 1px solid #bbbbbb;
|
||||||
|
margin-bottom: 60px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formBody {
|
||||||
|
width: 550px;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.residentBox {
|
||||||
|
max-height: 400px;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 10px 5px;
|
||||||
|
}
|
||||||
|
.checkoutSideUsesbox {
|
||||||
|
// display: grid;
|
||||||
|
// grid-template-columns: repeat(3, 1fr);
|
||||||
|
// gap: 5px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-content: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 10px 5px;
|
||||||
|
li {
|
||||||
|
margin-right: 10px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
min-width: 240px;
|
||||||
|
height: 35px;
|
||||||
|
padding: 0 10px;
|
||||||
|
line-height: 35px;
|
||||||
|
|
||||||
|
background-color: #f3f9ff;
|
||||||
|
border: 1px solid #8fc0f1;
|
||||||
|
|
||||||
|
margin-bottom: 10px;
|
||||||
|
|
||||||
|
@media (max-width: 2000px) {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1650px) {
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
@media (max-width: 1650px) {
|
||||||
|
font-size: 8px;
|
||||||
|
}
|
||||||
|
.el-icon {
|
||||||
|
margin-left: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
&:hover {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.add {
|
||||||
|
cursor: pointer;
|
||||||
|
justify-content: center;
|
||||||
|
color: #409eff;
|
||||||
|
border: 1px dashed #409eff;
|
||||||
|
background-color: transparent;
|
||||||
|
&:hover {
|
||||||
|
background-color: #40a0ff10;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:deep(.el-form-item__content, .el-select, .el-input) {
|
||||||
|
width: 350px !important;
|
||||||
|
margin-right: 10px;
|
||||||
|
.el-cascader {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-form-item {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.el-button {
|
||||||
|
width: 80px;
|
||||||
|
height: 35px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="员工姓名" prop="nickName">
|
<el-form-item label="员工姓名" prop="nickName">
|
||||||
<el-input v-model="queryParams.nickName" placeholder="请输入员工姓名" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.nickName" placeholder="请输入员工姓名" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -20,8 +20,8 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
<el-card class="flex-1" shadow="hover">
|
<el-card class="flex-1" shadow="hover">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10">
|
<el-row :gutter="10">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button v-has-permi="['system:user:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
<el-button v-has-permi="['system:user:add']" type="primary" plain icon="Plus" @click="handleAdd()">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
@@ -53,14 +53,23 @@
|
|||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item icon="Download" @click="importTemplate">下载模板</el-dropdown-item>
|
<el-dropdown-item icon="Download" @click="importTemplate">下载模板</el-dropdown-item>
|
||||||
<!-- 注意 由于el-dropdown-item标签是延迟加载的 所以v-has-permi自定义标签不生效 需要使用v-if调用方法执行 -->
|
注意 由于el-dropdown-item标签是延迟加载的 所以v-has-permi自定义标签不生效 需要使用v-if调用方法执行
|
||||||
<el-dropdown-item v-if="checkPermi(['system:user:import'])" icon="Top" @click="handleImport">导入数据</el-dropdown-item>
|
<el-dropdown-item v-if="checkPermi(['system:user:import'])" icon="Top" @click="handleImport">导入数据</el-dropdown-item>
|
||||||
<el-dropdown-item v-if="checkPermi(['system:user:export'])" icon="Download" @click="handleExport">导出数据</el-dropdown-item>
|
<el-dropdown-item v-if="checkPermi(['system:user:export'])" icon="Download" @click="handleExport">导出数据</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
</template>
|
</template>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<right-toolbar v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="getList"></right-toolbar>
|
<right-toolbar more-title="更多" v-model:show-search="showSearch" :columns="columns" :search="true" @query-table="getList">
|
||||||
|
<template #dropdown>
|
||||||
|
<el-dropdown-item @click="handleUpdate()">修改</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="handleDelete()">删除</el-dropdown-item>
|
||||||
|
<el-dropdown-item @click="importTemplate">下载模板</el-dropdown-item>
|
||||||
|
<!-- 注意 由于el-dropdown-item标签是延迟加载的 所以v-has-permi自定义标签不生效 需要使用v-if调用方法执行 -->
|
||||||
|
<el-dropdown-item v-if="checkPermi(['system:user:import'])" @click="handleImport">导入数据</el-dropdown-item>
|
||||||
|
<el-dropdown-item v-if="checkPermi(['system:user:export'])" @click="handleExport">导出数据</el-dropdown-item>
|
||||||
|
</template>
|
||||||
|
</right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -72,14 +81,7 @@
|
|||||||
<el-table-column v-if="columns[4].visible" key="phonenumber" label="手机号码" align="center" prop="phonenumber" width="120" />
|
<el-table-column v-if="columns[4].visible" key="phonenumber" label="手机号码" align="center" prop="phonenumber" width="120" />
|
||||||
<el-table-column v-if="columns[5].visible" key="status" label="状态" align="center">
|
<el-table-column v-if="columns[5].visible" key="status" label="状态" align="center">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-switch
|
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
||||||
v-model="scope.row.status"
|
|
||||||
active-text="启用"
|
|
||||||
active-value="0"
|
|
||||||
inactive-value="1"
|
|
||||||
inactive-text="停用"
|
|
||||||
@change="handleStatusChange(scope.row)"
|
|
||||||
></el-switch>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
@@ -251,6 +253,7 @@ import { communitylist_rows_type } from '@/api/system/community/type';
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const { sys_normal_disable, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex'));
|
const { sys_normal_disable, sys_user_sex } = toRefs<any>(proxy?.useDict('sys_normal_disable', 'sys_user_sex'));
|
||||||
|
|
||||||
const userList = ref<UserVO[]>();
|
const userList = ref<UserVO[]>();
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
const showSearch = ref(true);
|
const showSearch = ref(true);
|
||||||
@@ -515,6 +518,10 @@ const cancel = () => {
|
|||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
const handleAdd = async () => {
|
const handleAdd = async () => {
|
||||||
|
router.push({
|
||||||
|
path: '/system/addUser'
|
||||||
|
});
|
||||||
|
return;
|
||||||
reset();
|
reset();
|
||||||
const { data } = await api.getUser();
|
const { data } = await api.getUser();
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
@@ -526,8 +533,15 @@ const handleAdd = async () => {
|
|||||||
|
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
const handleUpdate = async (row?: UserForm) => {
|
const handleUpdate = async (row?: UserForm) => {
|
||||||
reset();
|
|
||||||
const userId = row?.userId || ids.value[0];
|
const userId = row?.userId || ids.value[0];
|
||||||
|
router.push({
|
||||||
|
path: '/system/editUser',
|
||||||
|
query: {
|
||||||
|
id: userId
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
reset();
|
||||||
const { data } = await api.getUser(userId);
|
const { data } = await api.getUser(userId);
|
||||||
dialog.visible = true;
|
dialog.visible = true;
|
||||||
dialog.title = '修改员工';
|
dialog.title = '修改员工';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-2">
|
<div class="p-2">
|
||||||
<el-row :gutter="20">
|
<Pageheader></Pageheader>
|
||||||
|
<el-row :gutter="20" class="mt-20px">
|
||||||
<el-col :span="6" :xs="24">
|
<el-col :span="6" :xs="24">
|
||||||
<el-card class="box-card">
|
<el-card class="box-card">
|
||||||
<template #header>
|
<template #header>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
<transition :enter-active-class="proxy?.animate.searchAnimate.enter" :leave-active-class="proxy?.animate.searchAnimate.leave">
|
||||||
<div v-show="showSearch" class="mb-[10px]">
|
<div v-show="showSearch" class="mb-[10px]">
|
||||||
<el-card shadow="hover">
|
<el-card shadow="hover">
|
||||||
<el-form ref="queryFormRef" :model="queryParams" :inline="true">
|
<el-form ref="queryFormRef" :model="queryParams" @submit.prevent="handleQuery" :inline="true">
|
||||||
<el-form-item label="选择品牌" prop="brand">
|
<el-form-item label="选择品牌" prop="brand">
|
||||||
<el-input v-model="queryParams.brand" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.brand" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
<el-input v-model="queryParams.materialName" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
|
<el-input v-model="queryParams.materialName" placeholder="请输入物料名称" clearable @keyup.enter="handleQuery" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
<el-button @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
@@ -26,8 +26,16 @@
|
|||||||
<el-card class="flex-1" shadow="never">
|
<el-card class="flex-1" shadow="never">
|
||||||
<template #header>
|
<template #header>
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<!-- <el-button type="primary" icon="Plus" @click="handleAdd">添加</el-button> -->
|
<right-toolbar
|
||||||
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
:disable-delete="multiple"
|
||||||
|
:disable-edit="single"
|
||||||
|
:show-add="false"
|
||||||
|
:show-edit="checkPermi(['warehouse:edit:inventory'])"
|
||||||
|
:show-delete="false"
|
||||||
|
@update:add="handleAdd"
|
||||||
|
@update:edit="handleUpdate()"
|
||||||
|
@update:delete="handleDelete()"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -42,8 +50,7 @@
|
|||||||
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
|
<el-table-column label="备注" show-overflow-tooltip align="center" prop="remark" />
|
||||||
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:edit:inventory']">修改</el-button>
|
<el-button link type="primary" @click="handleUpdate(scope.row)" v-hasPermi="['warehouse:edit:inventory']">编辑</el-button>
|
||||||
<!-- <el-button link type="primary" @click="handleDelete(scope.row)" v-hasPermi="['system:material:remove']">删除</el-button> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -57,6 +64,7 @@
|
|||||||
import { delMaterial } from '@/api/system/Tmaterial';
|
import { delMaterial } from '@/api/system/Tmaterial';
|
||||||
import { MaterialVO, MaterialQuery, MaterialForm } from '@/api/system/Tmaterial/type';
|
import { MaterialVO, MaterialQuery, MaterialForm } from '@/api/system/Tmaterial/type';
|
||||||
import { listStock } from '@/api/system/Tstock/index';
|
import { listStock } from '@/api/system/Tstock/index';
|
||||||
|
import { checkPermi } from '@/utils/permission';
|
||||||
|
|
||||||
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user