许宏杰 4 weeks ago
commit 70d89a9557

@ -46,6 +46,7 @@ const usePermissionStore = defineStore("permission", {
const rewriteRoutes = filterAsyncRouter(rdata, false, true); const rewriteRoutes = filterAsyncRouter(rdata, false, true);
const defaultRoutes = filterAsyncRouter(defaultData); const defaultRoutes = filterAsyncRouter(defaultData);
const asyncRoutes = filterDynamicRoutes(dynamicRoutes); const asyncRoutes = filterDynamicRoutes(dynamicRoutes);
console.log(defaultRoutes,sidebarRoutes,rewriteRoutes,asyncRoutes,defaultData);
asyncRoutes.forEach((route) => { asyncRoutes.forEach((route) => {
router.addRoute(route); router.addRoute(route);
}); });
@ -53,6 +54,7 @@ const usePermissionStore = defineStore("permission", {
this.setSidebarRouters(constantRoutes.concat(sidebarRoutes)); this.setSidebarRouters(constantRoutes.concat(sidebarRoutes));
this.setDefaultRoutes(sidebarRoutes); this.setDefaultRoutes(sidebarRoutes);
this.setTopbarRoutes(defaultRoutes); this.setTopbarRoutes(defaultRoutes);
console.log(rewriteRoutes); console.log(rewriteRoutes);
resolve(rewriteRoutes); resolve(rewriteRoutes);
}); });

@ -1,16 +0,0 @@
<template>
<div>
<button @click="getinfo"></button>
</div>
</template>
<script setup>
import { useRouter, useRoute } from "vue-router";
const router = useRouter();
const route = useRoute();
const getinfo = () => {
//
router.push({ path: "/assetsManage2/a2-info" });
};
</script>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,604 @@
<!--assetsManage/assets-->
<template>
<el-row
:gutter="20"
style="height: 100%; background-color: #f2f4f6; display: flex"
>
<!--部门数据-->
<el-col
:span="3"
:xs="24"
style="
margin-right: 10px;
height: 100%;
background-color: #fff;
padding-top: 20px;
"
>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="20" :xs="24" style="height: 100%; flex: 1">
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryForm"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-row>
<el-col :span="7">
<el-form-item label="系统名称:" prop="xtmc">
<el-input
v-model="formInline.xtmc"
placeholder="请输入系统名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="系统类型:" prop="xtlx">
<el-select
v-model="formInline.xtlx"
placeholder="请选择系统类型"
>
<el-option
v-for="dict in zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="新增时间:" prop="time">
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="单位名称:" prop="dwmc">
<el-input
v-model="formInline.dwmc"
placeholder="请输入单位名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="系统状态:" prop="xtzt">
<el-select
v-model="formInline.xtzt"
placeholder="请选择系统状态"
>
<el-option
v-for="dict in zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9" style="text-align: right; padding-right: 35px">
<el-form-item>
<el-button size="mini" @click="resetQuery"></el-button>
<el-button size="mini" type="primary" @click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="info"
plain
icon="Upload"
size="mini"
@click="handleImport"
>导入</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
size="mini"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="60"
label="序号"
align="center"
/>
<el-table-column
label="系统名称"
key="xtmc"
width="200px"
prop="xtmc"
align="center"
/>
<el-table-column
label="系统类型"
key="xtlx"
prop="xtlx"
align="center"
>
<template #default="scope">
<dict-tag :options="zc_xtlx" :value="scope.row.xtlx" />
</template>
</el-table-column>
<el-table-column
label="单位名称"
key="dwmc"
prop="dwmc"
align="center"
/>
<el-table-column
label="新增时间"
key="createTime"
prop="createTime"
align="center"
/>
<el-table-column
label="系统状态"
key="status"
prop="status"
class-name="table-status"
align="center"
>
<template #default="scope">
<span v-if="scope.row.xtzt == 1" style="color: #16b771"
>已安装</span
>
<span v-if="scope.row.xtzt == 2" style="color: #f58a0c"
>测试中</span
>
<span v-if="scope.row.xtzt == 3" style="color: #1485ef"
>使用中</span
>
<span v-if="scope.row.xtzt == 4" style="color: #29a07a"
>维护中</span
>
<span v-if="scope.row.xtzt == 5" style="color: #f50c0c"
>关停</span
>
<span v-if="scope.row.xtzt == 6" style="color: #f50c0c"
>备用</span
>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 1)"
>
<el-icon><View /></el-icon>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>查看</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 2)"
>
<el-icon><Edit /></el-icon>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 3)"
>
<el-icon><Delete /></el-icon>
<span
class="look-info"
style="color: #f50c0c; margin-right: 15px"
>删除</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
v-model:current-page="formInline.current"
/>
</main>
<!-- 资产导入对话框 -->
<el-dialog
v-model="upload.open"
:title="upload.title"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
<template #tip>
<div class="el-upload__tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"
> </el-button
>
<el-button @click="upload.open = false"> </el-button>
</div>
</template>
</el-dialog>
</div>
</el-col>
</el-row>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router";
import myPagination from "@/views/components/Pagination/index.vue";
import { getToken } from "@/utils/auth";
import { assetUnit, deleteAssetInfo, schema } from "@/api/auditPagesApi/index";
import { useDict } from "@/utils/dict";
import { ElMessage, ElMessageBox } from "element-plus";
import {
View,
Edit,
Delete,
Upload,
Download,
Plus,
UploadFilled,
} from "@element-plus/icons-vue";
const { proxy } = getCurrentInstance();
const router = useRouter();
//
const { zc_xtzt, zc_xtlx } = useDict("zc_xtzt", "zc_xtlx");
//
const deptOptions = ref();
const tree = ref(null);
const defaultProps = {
children: "children",
label: "label",
};
const formInline = reactive({
xtmc: "",
xtlx: "",
time: [],
startTime: "",
endTime: "",
dwmc: "",
xtzt: "",
current: 1,
size: 20,
});
const total = ref(0);
const tableData = ref([]);
const loading = ref(false);
const tabHeader = ref();
//
const upload = reactive({
//
open: false,
//
title: "web资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: location.origin + "/api/tc/assetCurrent/importData",
});
/** 查询部门下拉树结构 */
const getDeptTree = () => {
schema({ type: 0 }).then((response) => {
deptOptions.value = response.data;
});
};
//
const filterNode = (value, data) => {
if (!value) return true;
return data.label.indexOf(value) !== -1;
};
//
const handleNodeClick = (data) => {
formInline.deptId = data.id;
handleQuery();
};
//
const getList = () => {
loading.value = true;
assetUnit("get", formInline).then((res) => {
loading.value = false;
total.value = res.data.total;
tableData.value = res.data.records;
});
};
//
const resetQuery = () => {
proxy.$refs["queryForm"].resetFields();
formInline.deptId = undefined;
tree.value.setCurrentKey(null);
handleQuery();
};
//
const handleQuery = () => {
formInline.current = 1;
formInline.size = 20;
if (formInline.time) {
formInline.startTime = formInline.time[0];
formInline.endTime = formInline.time[1];
}
formInline.time = [];
getList();
};
//
const getPagination = (pages) => {
formInline.current = pages.page;
formInline.size = pages.limit;
getList();
};
//
const handleImport = () => {
upload.open = true;
};
//
const handleExport = () => {
proxy.download(
"/tc/assetCurrent/export",
{
...formInline,
},
`web资产${new Date().getTime()}.xlsx`
);
};
/** 下载模板操作 */
const importTemplate = () => {
proxy.download(
"/tc/assetCurrent/importTemplate",
{},
`web资产导入模板${new Date().getTime()}.xlsx`
);
};
//
const handleFileUploadProgress = () => {
upload.isUploading = true;
};
//
const handleFileSuccess = (response, file, fileList) => {
upload.open = false;
upload.isUploading = false;
proxy.$refs.upload.clearFiles();
ElMessageBox.alert(
`<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>${response.msg}</div>`,
"导入结果",
{ dangerouslyUseHTMLString: true }
);
getList();
};
//
const submitFileForm = () => {
proxy.$refs.upload.submit();
};
//
const handleAdd = () => {
router.push({
name: "AssetsAuth",
query: {
pageType: "add",
type: 0,
},
});
};
//
const goInfo = (row, id) => {
if (id === 1) {
router.push({
name: "AssetsAuth",
query: {
pageType: "look",
type: 0,
id: row.id,
queryData: formInline,
},
meta: {
title: "新增资产",
icon: "user",
activeMenu: "/assetsManage/program",
},
});
} else if (id === 2) {
router.push({
name: "AssetsAuth",
query: {
pageType: "change",
type: 0,
id: row.id,
queryData: formInline,
},
});
} else if (id === 3) {
const userIds = row.id;
ElMessageBox.confirm(`是否确认删除用户编号为"${userIds}"的数据项?`)
.then(() => {
return deleteAssetInfo(userIds);
})
.then(() => {
getList();
ElMessage.success("删除成功");
})
.catch(() => {});
}
};
// table
const tableRowClassName = ({ rowIndex }) => {
if (rowIndex % 2 !== 0) {
return "evenNumber-row";
}
return "";
};
const cancalDebounce = () => {
const element = document.getElementById("L-size-main");
const header = document.getElementById("L-header");
const pagination = document.getElementById("L-pagination");
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110;
};
onMounted(() => {
if (Object.keys(router.currentRoute.value.params).length !== 0) {
Object.assign(formInline, router.currentRoute.value.params);
} else {
formInline.current = 1;
formInline.size = 20;
}
getList();
getDeptTree();
cancalDebounce();
window.addEventListener("resize", cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener("resize", cancalDebounce);
});
</script>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,604 @@
<!--assetsManage/assets-->
<template>
<el-row
:gutter="20"
style="height: 100%; background-color: #f2f4f6; display: flex"
>
<!--部门数据-->
<el-col
:span="3"
:xs="24"
style="
margin-right: 10px;
height: 100%;
background-color: #fff;
padding-top: 20px;
"
>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="20" :xs="24" style="height: 100%; flex: 1">
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryForm"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-row>
<el-col :span="7">
<el-form-item label="系统名称:" prop="xtmc">
<el-input
v-model="formInline.xtmc"
placeholder="请输入系统名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="系统类型:" prop="xtlx">
<el-select
v-model="formInline.xtlx"
placeholder="请选择系统类型"
>
<el-option
v-for="dict in zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="新增时间:" prop="time">
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="单位名称:" prop="dwmc">
<el-input
v-model="formInline.dwmc"
placeholder="请输入单位名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="系统状态:" prop="xtzt">
<el-select
v-model="formInline.xtzt"
placeholder="请选择系统状态"
>
<el-option
v-for="dict in zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9" style="text-align: right; padding-right: 35px">
<el-form-item>
<el-button size="mini" @click="resetQuery"></el-button>
<el-button size="mini" type="primary" @click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="info"
plain
icon="Upload"
size="mini"
@click="handleImport"
>导入</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
size="mini"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="60"
label="序号"
align="center"
/>
<el-table-column
label="系统名称"
key="xtmc"
width="200px"
prop="xtmc"
align="center"
/>
<el-table-column
label="系统类型"
key="xtlx"
prop="xtlx"
align="center"
>
<template #default="scope">
<dict-tag :options="zc_xtlx" :value="scope.row.xtlx" />
</template>
</el-table-column>
<el-table-column
label="单位名称"
key="dwmc"
prop="dwmc"
align="center"
/>
<el-table-column
label="新增时间"
key="createTime"
prop="createTime"
align="center"
/>
<el-table-column
label="系统状态"
key="status"
prop="status"
class-name="table-status"
align="center"
>
<template #default="scope">
<span v-if="scope.row.xtzt == 1" style="color: #16b771"
>已安装</span
>
<span v-if="scope.row.xtzt == 2" style="color: #f58a0c"
>测试中</span
>
<span v-if="scope.row.xtzt == 3" style="color: #1485ef"
>使用中</span
>
<span v-if="scope.row.xtzt == 4" style="color: #29a07a"
>维护中</span
>
<span v-if="scope.row.xtzt == 5" style="color: #f50c0c"
>关停</span
>
<span v-if="scope.row.xtzt == 6" style="color: #f50c0c"
>备用</span
>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 1)"
>
<el-icon><View /></el-icon>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>查看</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 2)"
>
<el-icon><Edit /></el-icon>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 3)"
>
<el-icon><Delete /></el-icon>
<span
class="look-info"
style="color: #f50c0c; margin-right: 15px"
>删除</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
v-model:current-page="formInline.current"
/>
</main>
<!-- 资产导入对话框 -->
<el-dialog
v-model="upload.open"
:title="upload.title"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
<template #tip>
<div class="el-upload__tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"
> </el-button
>
<el-button @click="upload.open = false"> </el-button>
</div>
</template>
</el-dialog>
</div>
</el-col>
</el-row>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router";
import myPagination from "@/views/components/Pagination/index.vue";
import { getToken } from "@/utils/auth";
import { assetUnit, deleteAssetInfo, schema } from "@/api/auditPagesApi/index";
import { useDict } from "@/utils/dict";
import { ElMessage, ElMessageBox } from "element-plus";
import {
View,
Edit,
Delete,
Upload,
Download,
Plus,
UploadFilled,
} from "@element-plus/icons-vue";
const { proxy } = getCurrentInstance();
const router = useRouter();
//
const { zc_xtzt, zc_xtlx } = useDict("zc_xtzt", "zc_xtlx");
//
const deptOptions = ref();
const tree = ref(null);
const defaultProps = {
children: "children",
label: "label",
};
const formInline = reactive({
xtmc: "",
xtlx: "",
time: [],
startTime: "",
endTime: "",
dwmc: "",
xtzt: "",
current: 1,
size: 20,
});
const total = ref(0);
const tableData = ref([]);
const loading = ref(false);
const tabHeader = ref();
//
const upload = reactive({
//
open: false,
//
title: "web资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: location.origin + "/api/tc/assetCurrent/importData",
});
/** 查询部门下拉树结构 */
const getDeptTree = () => {
schema({ type: 0 }).then((response) => {
deptOptions.value = response.data;
});
};
//
const filterNode = (value, data) => {
if (!value) return true;
return data.label.indexOf(value) !== -1;
};
//
const handleNodeClick = (data) => {
formInline.deptId = data.id;
handleQuery();
};
//
const getList = () => {
loading.value = true;
assetUnit("get", formInline).then((res) => {
loading.value = false;
total.value = res.data.total;
tableData.value = res.data.records;
});
};
//
const resetQuery = () => {
proxy.$refs["queryForm"].resetFields();
formInline.deptId = undefined;
tree.value.setCurrentKey(null);
handleQuery();
};
//
const handleQuery = () => {
formInline.current = 1;
formInline.size = 20;
if (formInline.time) {
formInline.startTime = formInline.time[0];
formInline.endTime = formInline.time[1];
}
formInline.time = [];
getList();
};
//
const getPagination = (pages) => {
formInline.current = pages.page;
formInline.size = pages.limit;
getList();
};
//
const handleImport = () => {
upload.open = true;
};
//
const handleExport = () => {
proxy.download(
"/tc/assetCurrent/export",
{
...formInline,
},
`web资产${new Date().getTime()}.xlsx`
);
};
/** 下载模板操作 */
const importTemplate = () => {
proxy.download(
"/tc/assetCurrent/importTemplate",
{},
`web资产导入模板${new Date().getTime()}.xlsx`
);
};
//
const handleFileUploadProgress = () => {
upload.isUploading = true;
};
//
const handleFileSuccess = (response, file, fileList) => {
upload.open = false;
upload.isUploading = false;
proxy.$refs.upload.clearFiles();
ElMessageBox.alert(
`<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>${response.msg}</div>`,
"导入结果",
{ dangerouslyUseHTMLString: true }
);
getList();
};
//
const submitFileForm = () => {
proxy.$refs.upload.submit();
};
//
const handleAdd = () => {
router.push({
name: "AssetsAuth",
query: {
pageType: "add",
type: 0,
},
});
};
//
const goInfo = (row, id) => {
if (id === 1) {
router.push({
name: "AssetsAuth",
query: {
pageType: "look",
type: 0,
id: row.id,
queryData: formInline,
},
meta: {
title: "新增资产",
icon: "user",
activeMenu: "/assetsManage/program",
},
});
} else if (id === 2) {
router.push({
name: "AssetsAuth",
query: {
pageType: "change",
type: 0,
id: row.id,
queryData: formInline,
},
});
} else if (id === 3) {
const userIds = row.id;
ElMessageBox.confirm(`是否确认删除用户编号为"${userIds}"的数据项?`)
.then(() => {
return deleteAssetInfo(userIds);
})
.then(() => {
getList();
ElMessage.success("删除成功");
})
.catch(() => {});
}
};
// table
const tableRowClassName = ({ rowIndex }) => {
if (rowIndex % 2 !== 0) {
return "evenNumber-row";
}
return "";
};
const cancalDebounce = () => {
const element = document.getElementById("L-size-main");
const header = document.getElementById("L-header");
const pagination = document.getElementById("L-pagination");
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110;
};
onMounted(() => {
if (Object.keys(router.currentRoute.value.params).length !== 0) {
Object.assign(formInline, router.currentRoute.value.params);
} else {
formInline.current = 1;
formInline.size = 20;
}
getList();
getDeptTree();
cancalDebounce();
window.addEventListener("resize", cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener("resize", cancalDebounce);
});
</script>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,622 @@
<!-- 资产管理 -- 小程序 -->
<template>
<el-row
:gutter="20"
style="height: 100%; background-color: #f2f4f6; display: flex"
>
<!--部门数据-->
<el-col
:span="3"
:xs="24"
style="
margin-right: 10px;
height: 100%;
background-color: #fff;
padding-top: 20px;
"
>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col
:span="20"
:xs="24"
style="height: 100%; flex: 1"
>
<div
class="L-main"
id="L-size-main"
>
<div
class="content-search"
id="L-header"
>
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryForm"
:model="formInline"
:size="size"
class="demo-form-inline"
label-width="100px"
>
<el-row>
<el-col :span="6">
<el-form-item
label="所属单位:"
prop="dwmc"
>
<el-input
v-model="formInline.dwmc"
placeholder="请输入所属单位"
style="width: 95%;"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item
label="小程序名称:"
prop="xcxmc"
>
<el-input
v-model="formInline.xcxmc"
placeholder="请输入小程序名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item
label="新增时间:"
prop="time"
>
<el-date-picker
v-model="time"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item>
</el-col>
<el-col
:span="4"
style="text-align: right"
>
<el-form-item class="unit-form">
<el-button
size="mini"
@click="resetQuery('queryFrom')"
>重置</el-button
>
<el-button
size="mini"
type="primary"
@click="handleQuery('queryFrom')"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
<!-- <el-row>
<el-col :span="8">
<el-form-item label="小程序状态:" prop="xtzt">
<el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
<el-option
v-for="dict in dict.type.gzh_state"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="16" style="text-align: right;padding-right: 30px;">
<el-form-item>
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button>
</el-form-item>
</el-col>
</el-row> -->
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表蓝色为单位新增资产</span>
<el-row
:gutter="10"
class="mb8"
>
<el-col :span="1.5">
<el-button
type="info"
plain
:icon="Upload"
size="mini"
@click="handleImport"
>导入</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
:icon="Download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
:icon="Plus"
size="mini"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="60"
label="序号"
align="center"
/>
<el-table-column
label="小程序名称"
key="xcxmc"
prop="xcxmc"
align="center"
>
<template #default="scope">
<span
:style="{ color: scope.row.xzType == 1 ? 'blue' : '' }"
>{{ scope.row.xcxmc }}</span
>
</template>
<!-- <template #default="scope">
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/>
</template> -->
</el-table-column>
<el-table-column
label="所属单位"
key="ssdw"
prop="ssdw"
align="center"
/>
<!-- <el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
</el-table-column> -->
<!-- <el-table-column label="新增时间" key="createTime" prop="createTime" align="center" /> -->
<el-table-column
label="小程序状态"
key="state"
prop="state"
class-name="table-status"
align="center"
>
<template #default="scope">
<span
v-if="scope.row.state == 1"
style="color: #16b771"
>
正常
</span>
<span
v-if="scope.row.state == 2"
style="color: #f58a0c"
>
注销
</span>
<span
v-if="scope.row.state == 3"
style="color: #1485ef"
>
迁移
</span>
<span
v-if="scope.row.state == 4"
style="color: #29a07a"
>
受限
</span>
<span
v-if="scope.row.state == 5"
style="color: #f50c0c"
>
违规
</span>
<span
v-if="scope.row.state == 6"
style="color: #f58a0c"
>
未知
</span>
<span
v-if="scope.row.state == 7"
style="color: #f50c0c"
>
关停
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 1)"
>
<img
src="@/assets/images/icon-ck@2x.png"
alt=""
style="width: 20px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>查看</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 2)"
>
<img
src="@/assets/images/edit.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 3)"
>
<img
src="@/assets/images/del.png"
alt=""
style="width: 20px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #f50c0c; margin-right: 15px"
>删除</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
:current-page.sync="formInline.current"
></my-pagination>
</main>
<!-- 资产导入对话框 -->
<el-dialog
:title="upload.title"
:visible.sync="upload.open"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
<div
class="el-upload__tip text-center"
slot="tip"
>
<!-- <div class="el-upload__tip" slot="tip">
<el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据
</div> -->
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</el-upload>
<div
slot="footer"
class="dialog-footer"
>
<el-button
type="primary"
@click="submitFileForm"
> </el-button
>
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
</div>
</el-col>
</el-row>
</template>
<script setup>
import { Upload,Download,Plus } from '@element-plus/icons-vue'
import { ref, onMounted, onUnmounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import myPagination from "@/views/components/Pagination/index.vue";
import { getToken } from "@/utils/auth";
import {
miniProgramsList,
deleteMiniPrograms,
schema,
} from "@/api/auditPagesApi/index";
const router = useRouter();
const route = useRoute();
const size = ref('default')
//
const deptOptions = ref(undefined);
const defaultProps = {
children: "children",
label: "label",
};
const formInline = ref({
dwmc: "",
xcxmc: "",
startTime: "",
endTime: "",
current: 1,
size: 10,
});
const time = ref([]);
const total = ref(0);
const tableData = ref([]);
const loading = ref(false);
const tabHeader = ref(undefined);
const upload = ref({
open: false,
title: "小程序资产导入",
isUploading: false,
updateSupport: 0,
headers: { Authorization: "Bearer " + getToken() },
url:
import.meta.env.VITE_APP_HJ === "test"
? import.meta.env.VITE_APP_BASE_API +
"/tc/assetOfficialAccount/importData"
: location.origin + "/api/tc/assetOfficialAccount/importData",
});
function getDeptTree() {
schema({ type: 1 }).then((response) => {
deptOptions.value = response.data;
});
}
function filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
}
function handleNodeClick(data) {
formInline.value.deptId = data.id;
handleQuery();
}
function getList() {
loading.value = true;
miniProgramsList(formInline.value).then((res) => {
loading.value = false;
total.value = res.data.total;
tableData.value = res.data.records;
});
}
function resetQuery() {
// resetForm('queryForm') //
time.value = [];
formInline.value.deptId = undefined;
// this.$refs.tree.setCurrentKey(null)
handleQuery();
}
function handleQuery() {
formInline.value.current = 1;
if (time.value && time.value.length === 2) {
formInline.value.startTime = time.value[0];
formInline.value.endTime = time.value[1];
}
getList();
}
function getPagination(pages) {
formInline.value.current = pages.page;
formInline.value.size = pages.limit;
getList();
}
function handleImport() {
upload.value.open = true;
}
function handleExport() {
download(
"/tc/miniPrograms/export",
{
...formInline.value,
},
`小程序资产${new Date().getTime()}.xlsx`
);
}
function importTemplate() {
download(
"/tc/miniPrograms/importTemplate",
{},
`小程序资产导入模板${new Date().getTime()}.xlsx`
);
}
function handleFileUploadProgress(event, file, fileList) {
upload.value.isUploading = true;
}
function handleFileSuccess(response, file, fileList) {
upload.value.open = false;
upload.value.isUploading = false;
this.$refs.upload.clearFiles()
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
getList();
}
function submitFileForm() {
this.$refs.upload.submit();
}
function handleAdd() {
router.push({
name: "AssetsAuth",
query: {
pageType: "add",
type: 1,
},
});
}
function goInfo(row, id) {
console.log(formInline.value,'row')
if (id === 1) {
router.push({
name: "assetsType1",
query: {
pageType: "look",
type: 1,
id: row.id,
queryData: formInline.value,
},
});
} else if (id === 2) {
router.push({
name: "AssetsAuth",
query: {
pageType: "change",
type: 1,
id: row.id,
queryData: formInline.value,
},
});
} else if (id === 3) {
const userIds = row.id;
this.$modal
.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
.then(() => {
return deleteMiniPrograms(userIds);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
}
}
function tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 !== 0) {
return "evenNumber-row";
}
return "";
}
function cancalDebounce() {
const element = document.getElementById("L-size-main");
const header = document.getElementById("L-header");
const pagination = document.getElementById("L-pagination");
const elementHeight = element?.offsetHeight || 0;
const headerHeight = header?.offsetHeight || 0;
const paginationtHeight = pagination?.offsetHeight || 0;
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110;
}
//
onMounted(() => {
if (Object.keys(route.params).length !== 0) {
formInline.value = route.params;
} else {
formInline.value.current = 1;
formInline.value.size = 20;
}
getDeptTree();
getList();
cancalDebounce();
window.addEventListener("resize", cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener("resize", cancalDebounce);
});
</script>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,604 @@
<!--assetsManage/assets-->
<template>
<el-row
:gutter="20"
style="height: 100%; background-color: #f2f4f6; display: flex"
>
<!--部门数据-->
<el-col
:span="3"
:xs="24"
style="
margin-right: 10px;
height: 100%;
background-color: #fff;
padding-top: 20px;
"
>
<div class="head-container">
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
node-key="id"
default-expand-all
highlight-current
@node-click="handleNodeClick"
/>
</div>
</el-col>
<el-col :span="20" :xs="24" style="height: 100%; flex: 1">
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryForm"
:model="formInline"
size="small"
class="demo-form-inline"
>
<el-row>
<el-col :span="7">
<el-form-item label="系统名称:" prop="xtmc">
<el-input
v-model="formInline.xtmc"
placeholder="请输入系统名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="系统类型:" prop="xtlx">
<el-select
v-model="formInline.xtlx"
placeholder="请选择系统类型"
>
<el-option
v-for="dict in zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="新增时间:" prop="time">
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="7">
<el-form-item label="单位名称:" prop="dwmc">
<el-input
v-model="formInline.dwmc"
placeholder="请输入单位名称"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="系统状态:" prop="xtzt">
<el-select
v-model="formInline.xtzt"
placeholder="请选择系统状态"
>
<el-option
v-for="dict in zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9" style="text-align: right; padding-right: 35px">
<el-form-item>
<el-button size="mini" @click="resetQuery"></el-button>
<el-button size="mini" type="primary" @click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="info"
plain
icon="Upload"
size="mini"
@click="handleImport"
>导入</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="Download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="Plus"
size="mini"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="60"
label="序号"
align="center"
/>
<el-table-column
label="系统名称"
key="xtmc"
width="200px"
prop="xtmc"
align="center"
/>
<el-table-column
label="系统类型"
key="xtlx"
prop="xtlx"
align="center"
>
<template #default="scope">
<dict-tag :options="zc_xtlx" :value="scope.row.xtlx" />
</template>
</el-table-column>
<el-table-column
label="单位名称"
key="dwmc"
prop="dwmc"
align="center"
/>
<el-table-column
label="新增时间"
key="createTime"
prop="createTime"
align="center"
/>
<el-table-column
label="系统状态"
key="status"
prop="status"
class-name="table-status"
align="center"
>
<template #default="scope">
<span v-if="scope.row.xtzt == 1" style="color: #16b771"
>已安装</span
>
<span v-if="scope.row.xtzt == 2" style="color: #f58a0c"
>测试中</span
>
<span v-if="scope.row.xtzt == 3" style="color: #1485ef"
>使用中</span
>
<span v-if="scope.row.xtzt == 4" style="color: #29a07a"
>维护中</span
>
<span v-if="scope.row.xtzt == 5" style="color: #f50c0c"
>关停</span
>
<span v-if="scope.row.xtzt == 6" style="color: #f50c0c"
>备用</span
>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 1)"
>
<el-icon><View /></el-icon>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>查看</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 2)"
>
<el-icon><Edit /></el-icon>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
<div
style="
display: flex;
align-items: center;
cursor: pointer;
"
@click="goInfo(scope.row, 3)"
>
<el-icon><Delete /></el-icon>
<span
class="look-info"
style="color: #f50c0c; margin-right: 15px"
>删除</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
v-model:current-page="formInline.current"
/>
</main>
<!-- 资产导入对话框 -->
<el-dialog
v-model="upload.open"
:title="upload.title"
width="400px"
append-to-body
>
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:headers="upload.headers"
:action="upload.url + '?updateSupport=' + upload.updateSupport"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<el-icon class="el-icon--upload"><upload-filled /></el-icon>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
<template #tip>
<div class="el-upload__tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
>下载模板</el-link
>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"
> </el-button
>
<el-button @click="upload.open = false"> </el-button>
</div>
</template>
</el-dialog>
</div>
</el-col>
</el-row>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance } from "vue";
import { useRouter } from "vue-router";
import myPagination from "@/views/components/Pagination/index.vue";
import { getToken } from "@/utils/auth";
import { assetUnit, deleteAssetInfo, schema } from "@/api/auditPagesApi/index";
import { useDict } from "@/utils/dict";
import { ElMessage, ElMessageBox } from "element-plus";
import {
View,
Edit,
Delete,
Upload,
Download,
Plus,
UploadFilled,
} from "@element-plus/icons-vue";
const { proxy } = getCurrentInstance();
const router = useRouter();
//
const { zc_xtzt, zc_xtlx } = useDict("zc_xtzt", "zc_xtlx");
//
const deptOptions = ref();
const tree = ref(null);
const defaultProps = {
children: "children",
label: "label",
};
const formInline = reactive({
xtmc: "",
xtlx: "",
time: [],
startTime: "",
endTime: "",
dwmc: "",
xtzt: "",
current: 1,
size: 20,
});
const total = ref(0);
const tableData = ref([]);
const loading = ref(false);
const tabHeader = ref();
//
const upload = reactive({
//
open: false,
//
title: "web资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: location.origin + "/api/tc/assetCurrent/importData",
});
/** 查询部门下拉树结构 */
const getDeptTree = () => {
schema({ type: 0 }).then((response) => {
deptOptions.value = response.data;
});
};
//
const filterNode = (value, data) => {
if (!value) return true;
return data.label.indexOf(value) !== -1;
};
//
const handleNodeClick = (data) => {
formInline.deptId = data.id;
handleQuery();
};
//
const getList = () => {
loading.value = true;
assetUnit("get", formInline).then((res) => {
loading.value = false;
total.value = res.data.total;
tableData.value = res.data.records;
});
};
//
const resetQuery = () => {
proxy.$refs["queryForm"].resetFields();
formInline.deptId = undefined;
tree.value.setCurrentKey(null);
handleQuery();
};
//
const handleQuery = () => {
formInline.current = 1;
formInline.size = 20;
if (formInline.time) {
formInline.startTime = formInline.time[0];
formInline.endTime = formInline.time[1];
}
formInline.time = [];
getList();
};
//
const getPagination = (pages) => {
formInline.current = pages.page;
formInline.size = pages.limit;
getList();
};
//
const handleImport = () => {
upload.open = true;
};
//
const handleExport = () => {
proxy.download(
"/tc/assetCurrent/export",
{
...formInline,
},
`web资产${new Date().getTime()}.xlsx`
);
};
/** 下载模板操作 */
const importTemplate = () => {
proxy.download(
"/tc/assetCurrent/importTemplate",
{},
`web资产导入模板${new Date().getTime()}.xlsx`
);
};
//
const handleFileUploadProgress = () => {
upload.isUploading = true;
};
//
const handleFileSuccess = (response, file, fileList) => {
upload.open = false;
upload.isUploading = false;
proxy.$refs.upload.clearFiles();
ElMessageBox.alert(
`<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>${response.msg}</div>`,
"导入结果",
{ dangerouslyUseHTMLString: true }
);
getList();
};
//
const submitFileForm = () => {
proxy.$refs.upload.submit();
};
//
const handleAdd = () => {
router.push({
name: "AssetsAuth",
query: {
pageType: "add",
type: 0,
},
});
};
//
const goInfo = (row, id) => {
if (id === 1) {
router.push({
name: "AssetsAuth",
query: {
pageType: "look",
type: 0,
id: row.id,
queryData: formInline,
},
meta: {
title: "新增资产",
icon: "user",
activeMenu: "/assetsManage/program",
},
});
} else if (id === 2) {
router.push({
name: "AssetsAuth",
query: {
pageType: "change",
type: 0,
id: row.id,
queryData: formInline,
},
});
} else if (id === 3) {
const userIds = row.id;
ElMessageBox.confirm(`是否确认删除用户编号为"${userIds}"的数据项?`)
.then(() => {
return deleteAssetInfo(userIds);
})
.then(() => {
getList();
ElMessage.success("删除成功");
})
.catch(() => {});
}
};
// table
const tableRowClassName = ({ rowIndex }) => {
if (rowIndex % 2 !== 0) {
return "evenNumber-row";
}
return "";
};
const cancalDebounce = () => {
const element = document.getElementById("L-size-main");
const header = document.getElementById("L-header");
const pagination = document.getElementById("L-pagination");
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110;
};
onMounted(() => {
if (Object.keys(router.currentRoute.value.params).length !== 0) {
Object.assign(formInline, router.currentRoute.value.params);
} else {
formInline.current = 1;
formInline.size = 20;
}
getList();
getDeptTree();
cancalDebounce();
window.addEventListener("resize", cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener("resize", cancalDebounce);
});
</script>

@ -0,0 +1,291 @@
<template>
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryFormRef"
:model="formInline"
size="medium"
class="demo-form-inline"
>
<el-row>
<el-col :span="7">
<el-form-item label="电子邮箱后缀:" prop="dzyxhz">
<el-input
v-model="formInline.dzyxhz"
placeholder="请输入电子邮箱后缀"
style="width: 95%;"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="邮件系统状态:" prop="xtzt">
<el-select
v-model="formInline.xtzt"
placeholder="请选择邮件系统状态"
>
<el-option
v-for="dict in email_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3" style="text-align: right">
<el-form-item class="unit-form">
<el-button size="mini" @click="resetQuery"></el-button>
<el-button
size="mini"
type="primary"
@click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
:icon="Download"
size="mini"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
:icon="Plus"
size="mini"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="60"
label="序号"
align="center"
/>
<el-table-column
label="所属单位"
key="ssdw"
prop="ssdw"
align="center"
/>
<el-table-column
label="电子邮箱后缀"
key="dzyxhz"
prop="dzyxhz"
align="center"
/>
<el-table-column
label="邮件系统供应商"
key="yjxtgys"
prop="yjxtgys"
align="center"
/>
<el-table-column
label="新增时间"
key="createTime"
prop="createTime"
align="center"
/>
<el-table-column
label="邮件系统状态"
key="status"
prop="status"
class-name="table-status"
align="center"
>
<template #default="scope">
<span v-if="scope.row.yjxtzc == 1" style="color: #16b771">
正常
</span>
<span v-if="scope.row.yjxtzc == 2" style="color: #f58a0c">
停用
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div style="display: flex; align-items: center; justify-content: center;">
<div style="display: flex; align-items: center; cursor: pointer" @click="goInfo(scope.row, 1)">
<img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px; margin-right: 5px" />
<span class="look-info" style="color: #1485ef; margin-right: 15px">查看</span>
</div>
<div
v-if="!scope.row.auditState || scope.row.auditState == 2"
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row, 2)"
>
<img src="@/assets/images/edit.png" alt="" style="width: 15px; margin-right: 5px" />
<span class="look-info" style="color: #1485ef; margin-right: 15px">编辑</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
v-model:current-page="formInline.current"
></my-pagination>
</main>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import myPagination from '@/views/components/Pagination/index.vue'
import { assetEmailList } from '@/api/auditPagesApi/index'
import { Download, Plus } from "@element-plus/icons-vue";
const route = useRoute()
const router = useRouter()
//
const formInline = reactive({
dzyxhz: '',
xtzt: '',
current: 1,
size: 10
})
//
const loading = ref(false)
const total = ref(0)
const tableData = ref([])
const tabHeader = ref(undefined)
//
const { proxy } = getCurrentInstance();
const { email_state } = proxy.useDict(
"email_state"
);
//
const handleAdd = () => {
router.push({
name: 'myAssetsAuth',
query: {
pageType: 'add',
type: 3,
queryData: formInline,
name: 'MyEmail'
}
})
}
const getList = async () => {
loading.value = true
try {
const res = await assetEmailList(formInline)
total.value = res.data.total
tableData.value = res.data.records
} finally {
loading.value = false
}
}
const resetQuery = () => {
formInline.dzyxhz = ''
formInline.xtzt = ''
formInline.current = 1
getList()
}
const handleQuery = () => {
formInline.current = 1
getList()
}
const getPagination = ({ page, limit }) => {
formInline.current = page
formInline.size = limit
getList()
}
const handleExport = () => {
console.log('导出数据:', formInline)
}
const goInfo = (row, id) => {
router.push({
name: 'myAssetsAuth',
query: {
pageType: id === 1 ? 'look' : 'change',
type: 3,
id: row.id,
queryData: formInline,
name: 'MyEmail'
}
})
}
const tableRowClassName = ({ rowIndex }) => {
return rowIndex % 2 !== 0 ? 'evenNumber-row' : ''
}
const cancalDebounce = () => {
const element = document.getElementById('L-size-main')
const header = document.getElementById('L-header')
const pagination = document.getElementById('L-pagination')
if (element && header && pagination) {
const elementHeight = element.offsetHeight
const headerHeight = header.offsetHeight
const paginationtHeight = pagination.offsetHeight
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110
}
}
onMounted(() => {
if (Object.keys(route.params).length !== 0) {
Object.assign(formInline, route.params)
} else {
formInline.current = 1
formInline.size = 20
}
getList()
cancalDebounce()
window.addEventListener('resize', cancalDebounce)
})
onUnmounted(() => {
window.removeEventListener('resize', cancalDebounce)
})
</script>

@ -0,0 +1,312 @@
<template>
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryFormRef"
:model="formInline"
size="mediu"
class="demo-form-inline"
>
<el-row>
<el-col :span="7">
<el-form-item label="移动应用名称:" prop="yymc">
<el-input
v-model="formInline.yymc"
placeholder="请输入移动应用名称"
style="width: 95%;"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="icp备案状态" prop="xtzt">
<el-select
v-model="formInline.xtzt"
placeholder="请选择icp备案状态"
>
<el-option
v-for="dict in app_icp_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7" style="text-align: right">
<el-form-item class="unit-form">
<el-button @click="resetQuery"></el-button>
<el-button
type="primary"
@click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
:icon="Download"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
:icon="Plus"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="70"
label="序号"
align="center"
/>
<el-table-column
label="移动应用名称"
key="appName"
prop="appName"
align="center"
/>
<el-table-column
label="所属单位"
key="ssdw"
prop="ssdw"
align="center"
/>
<el-table-column
label="新增时间"
key="createTime"
prop="createTime"
align="center"
/>
<el-table-column
label="icp备案状态"
key="status"
prop="status"
class-name="table-status"
align="center"
>
<template #default="scope">
<span v-if="scope.row.icpState == 1" style="color: #f58a0c">
未备案
</span>
<span v-if="scope.row.icpState == 2" style="color: #16b771">
已备案
</span>
<span v-if="scope.row.icpState == 3" style="color: #1485ef">
非网站系统
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row, 1)"
>
<img
src="@/assets/images/icon-ck@2x.png"
alt=""
style="width: 20px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>查看</span
>
</div>
<div
v-if="!scope.row.auditState || scope.row.auditState == 2"
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row, 2)"
>
<img
src="@/assets/images/edit.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
v-model:current-page="formInline.current"
></my-pagination>
</main>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import myPagination from '@/views/components/Pagination/index.vue'
import { assetAppList } from '@/api/auditPagesApi/index'
import { Download, Plus } from "@element-plus/icons-vue";
//
const route = useRoute()
const router = useRouter()
//
const formInline = reactive({
xtzt: '',
yymc: '',
current: 1,
size: 10
})
//
const loading = ref(false)
const total = ref(0)
const tableData = ref([])
const tabHeader = ref(undefined)
//
const { proxy } = getCurrentInstance();
const { app_icp_state } = proxy.useDict(
"app_icp_state"
);
//
const handleAdd = () => {
router.push({
name: 'myAssetsAuth',
query: {
pageType: 'add',
type: 4,
queryData: formInline,
name: 'MyMobileApplication'
}
})
}
const getList = async () => {
loading.value = true
try {
const res = await assetAppList(formInline)
total.value = res.data.total
tableData.value = res.data.records
} finally {
loading.value = false
}
}
const resetQuery = () => {
formInline.xtzt = ''
formInline.yymc = ''
formInline.current = 1
formInline.size = 10
getList()
}
const handleQuery = () => {
formInline.current = 1
getList()
}
const getPagination = ({ page, limit }) => {
formInline.current = page
formInline.size = limit
getList()
}
const handleExport = () => {
console.log('导出数据:', formInline)
}
const goInfo = (row, id) => {
router.push({
name: 'myAssetsAuth',
query: {
pageType: id === 1 ? 'look' : 'change',
type: 4,
id: row.id,
queryData: formInline,
name: 'MyMobileApplication'
}
})
}
const tableRowClassName = ({ rowIndex }) => {
return rowIndex % 2 !== 0 ? 'evenNumber-row' : ''
}
const cancalDebounce = () => {
const element = document.getElementById('L-size-main')
const header = document.getElementById('L-header')
const pagination = document.getElementById('L-pagination')
if (element && header && pagination) {
const elementHeight = element.offsetHeight
const headerHeight = header.offsetHeight
const paginationtHeight = pagination.offsetHeight
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110
}
}
onMounted(() => {
if (Object.keys(route.params).length !== 0) {
Object.assign(formInline, route.params)
} else {
formInline.current = 1
formInline.size = 20
}
getList()
cancalDebounce()
window.addEventListener('resize', cancalDebounce)
})
onUnmounted(() => {
window.removeEventListener('resize', cancalDebounce)
})
</script>

@ -0,0 +1,368 @@
<!-- 我的资产--公众号 -->
<template>
<div
class="L-main"
id="L-size-main"
>
<div
class="content-search"
id="L-header"
>
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryFormRef"
:model="formInline"
size="medium"
class="demo-form-inline"
>
<el-row>
<el-col :span="7">
<el-form-item
label="公众号名称:"
prop="gzhmc"
>
<el-input
v-model="formInline.gzhmc"
placeholder="请输入公众号名称"
style="width: 95%"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item
label="公众号状态:"
prop="xtzt"
>
<el-select
v-model="formInline.xtzt"
placeholder="请选择公众号状态"
>
<el-option
v-for="dict in gzh_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span="7"
style="text-align: right"
>
<el-form-item class="unit-form">
<el-button @click="resetQuery"></el-button>
<el-button
type="primary"
@click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row
:gutter="10"
class="mb8"
>
<el-col :span="1.5">
<el-button
type="warning"
plain
:icon="Download"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
:icon="Plus"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="70"
label="序号"
align="center"
/>
<el-table-column
label="公众号名称"
key="gzhmc"
prop="gzhmc"
align="center"
/>
<el-table-column
label="所属单位"
key="ssdw"
prop="ssdw"
align="center"
/>
<el-table-column
label="新增时间"
key="createTime"
prop="createTime"
align="center"
/>
<el-table-column
label="平台类型"
key="ptlx"
prop="ptlx"
align="center"
>
<template #default="scope">
<dict-tag
:options="sys_ptlx_type"
:value="scope.row.ptlx"
/>
</template>
</el-table-column>
<el-table-column
label="公众号状态"
key="status"
prop="status"
class-name="table-status"
align="center"
>
<template #default="scope">
<span
v-if="scope.row.gzhzt == 1"
style="color: #16b771"
>正常</span
>
<span
v-else-if="scope.row.gzhzt == 2"
style="color: #f58a0c"
>注销</span
>
<span
v-else-if="scope.row.gzhzt == 3"
style="color: #1485ef"
>迁移</span
>
<span
v-else-if="scope.row.gzhzt == 4"
style="color: #29a07a"
>受限</span
>
<span
v-else-if="scope.row.gzhzt == 5"
style="color: #f50c0c"
>违规</span
>
<span
v-else-if="scope.row.gzhzt == 6"
style="color: #f58a0c"
>未知</span
>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row, 1)"
>
<img
src="@/assets/images/icon-ck@2x.png"
alt=""
style="width: 20px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>查看</span
>
</div>
<div
v-if="!scope.row.auditState || scope.row.auditState == 2"
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row, 2)"
>
<img
src="@/assets/images/edit.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
v-model:current-page="formInline.current"
></my-pagination>
</main>
</div>
</template>
<script setup>
import { ref, onMounted, onUnmounted } from "vue";
import { useRoute, useRouter } from "vue-router";
import myPagination from "@/views/components/Pagination/index.vue";
import { assetOfficialAccountList } from "@/api/auditPagesApi/index";
import { Download, Plus } from "@element-plus/icons-vue";
const { proxy } = getCurrentInstance();
const { gzh_state, sys_ptlx_type } = proxy.useDict(
"gzh_state",
"sys_ptlx_type"
);
const router = useRouter();
const route = useRoute();
const queryFormRef = ref(null);
const formInline = ref({
gzhmc: "",
xtzt: "",
current: 1,
size: 10,
});
const loading = ref(false);
const tableData = ref([]);
const total = ref(0);
const tabHeader = ref(undefined);
//
const getList = async () => {
try {
loading.value = true;
const res = await assetOfficialAccountList(formInline.value);
tableData.value = res.data.records;
total.value = res.data.total;
} catch (error) {
console.error("获取列表失败:", error);
} finally {
loading.value = false;
}
};
//
const resetQuery = () => {
queryFormRef.value?.resetFields();
formInline.value.current = 1;
getList();
};
//
const handleQuery = () => {
formInline.value.current = 1;
getList();
};
//
const getPagination = (pages) => {
formInline.value.current = pages.page;
formInline.value.size = pages.limit;
getList();
};
//
function handleExport() {
proxy.download(
"/tc/assetOfficialAccount/export",
{
...formInline.value,
},
`公众号资产${new Date().getTime()}.xlsx`
);
}
function handleAdd() {
router.push({
name: "myAssetsAuth",
query: {
pageType: "add",
type: 2,
},
});
}
// /
const goInfo = (row, id) => {
router.push({
name: "myAssetsAuth",
query: {
pageType: id === 1 ? "look" : "change",
type: 2,
id: row.id,
queryData: formInline.value,
name: "MyOfficialAccount",
},
});
};
//
const tableRowClassName = ({ rowIndex }) => {
return rowIndex % 2 !== 0 ? "evenNumber-row" : "";
};
//
const cancalDebounce = () => {
const element = document.getElementById("L-size-main");
const header = document.getElementById("L-header");
const pagination = document.getElementById("L-pagination");
if (element && header && pagination) {
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110;
}
};
onMounted(() => {
if (Object.keys(route.params).length !== 0) {
formInline.value = route.params;
}
getList();
cancalDebounce();
window.addEventListener("resize", cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener("resize", cancalDebounce);
});
</script>

@ -0,0 +1,321 @@
<template>
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryForm"
:model="formInline"
size="medium"
class="demo-form-inline"
label-width="100px"
>
<el-row>
<el-col :span="7">
<el-form-item label="小程序名称:" prop="xcxmc">
<el-input
v-model="formInline.xcxmc"
placeholder="请输入小程序名称"
style="width: 95%;"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item label="小程序状态:" prop="xtzt">
<el-select
v-model="formInline.xtzt"
placeholder="请选择小程序状态"
>
<el-option
v-for="dict in gzh_state"
:key="dict.value"
:label="dict.label"
:value="dict.value"
>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7" style="text-align: right">
<el-form-item class="unit-form">
<el-button @click="resetQuery"></el-button>
<el-button
type="primary"
@click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
:icon="Download"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
:icon="Plus"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:row-class-name="tableRowClassName"
:max-height="tabHeader"
>
<el-table-column
type="index"
width="70"
label="序号"
align="center"
/>
<el-table-column
label="小程序名称"
key="xcxmc"
prop="xcxmc"
align="center"
/>
<el-table-column
label="所属单位"
key="ssdw"
prop="ssdw"
align="center"
/>
<el-table-column
label="小程序状态"
key="state"
prop="state"
class-name="table-status"
align="center"
>
<template #default="scope">
<span v-if="scope.row.state == 1" style="color: #16b771">
正常
</span>
<span v-if="scope.row.state == 2" style="color: #f58a0c">
注销
</span>
<span v-if="scope.row.state == 3" style="color: #1485ef">
迁移
</span>
<span v-if="scope.row.state == 4" style="color: #29a07a">
受限
</span>
<span v-if="scope.row.state == 5" style="color: #f50c0c">
违规
</span>
<span v-if="scope.row.state == 6" style="color: #f58a0c">
未知
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row, 1)"
>
<img
src="@/assets/images/icon-ck@2x.png"
alt=""
style="width: 20px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>查看</span
>
</div>
<div
v-if="!scope.row.auditState || scope.row.auditState == 2"
style="
display: flex;
align-items: center;
cursor: pointer;
margin-left: 10px;
"
@click="goInfo(scope.row, 2)"
>
<img
src="@/assets/images/edit.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
v-model:current-page="formInline.current"
></my-pagination>
</main>
</div>
</template>
<script setup>
import { ref, reactive, onMounted, onUnmounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import myPagination from '@/views/components/Pagination/index.vue'
import { miniProgramsList } from '@/api/auditPagesApi/index'
import { Download, Plus } from "@element-plus/icons-vue";
const route = useRoute()
const router = useRouter()
//
const formInline = reactive({
xtzt: '',
xcxmc: '',
current: 1,
size: 10
})
//
const total = ref(0)
const tableData = ref([])
const loading = ref(false)
const tabHeader = ref(undefined)
const queryForm = ref(null)
const { proxy } = getCurrentInstance();
const { gzh_state } = proxy.useDict(
"gzh_state"
);
//
const handleAdd = () => {
router.push({
name: 'myAssetsAuth',
query: {
pageType: 'add',
type: 1,
queryData: formInline,
name: 'MyProgram'
}
})
}
const getList = async () => {
loading.value = true
try {
const res = await miniProgramsList(formInline)
total.value = res.data.total
tableData.value = res.data.records
} finally {
loading.value = false
}
}
const resetQuery = () => {
if (queryForm.value) {
queryForm.value.resetFields()
}
handleQuery()
}
const handleQuery = () => {
formInline.current = 1
getList()
}
const getPagination = ({ page, limit }) => {
formInline.current = page
formInline.size = limit
getList()
}
const handleExport = () => {
console.log('导出数据:', formInline)
}
const goInfo = (row, id) => {
router.push({
name: 'myAssetsAuth',
query: {
pageType: id === 1 ? 'look' : 'change',
type: 1,
id: row.id,
queryData: formInline,
name: 'MyProgram'
}
})
}
//
const tableRowClassName = ({ rowIndex }) => {
return rowIndex % 2 !== 0 ? 'evenNumber-row' : ''
}
//
const cancalDebounce = () => {
const element = document.getElementById('L-size-main')
const header = document.getElementById('L-header')
const pagination = document.getElementById('L-pagination')
if (element && header && pagination) {
const elementHeight = element.offsetHeight
const headerHeight = header.offsetHeight
const paginationtHeight = pagination.offsetHeight
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110
}
}
onMounted(() => {
if (Object.keys(route.params).length !== 0) {
Object.assign(formInline, route.params)
} else {
formInline.current = 1
formInline.size = 20
}
getList()
cancalDebounce()
window.addEventListener('resize', cancalDebounce)
})
onUnmounted(() => {
window.removeEventListener('resize', cancalDebounce)
})
</script>

@ -0,0 +1,378 @@
<template>
<div
class="L-main"
id="L-size-main"
>
<div
class="content-search"
id="L-header"
>
<div class="search-title">查询条件</div>
<el-form
:inline="true"
ref="queryFormRef"
:model="formInline"
size="medium"
class="demo-form-inline"
>
<el-row>
<el-col :span="7">
<el-form-item
label="系统名称:"
prop="xtmc"
>
<el-input
v-model="formInline.xtmc"
placeholder="请输入"
style="width: 95%"
></el-input>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item
label="系统类型:"
prop="xtlx"
>
<el-select
v-model="formInline.xtlx"
placeholder="请选择系统类型"
style="width: 95%"
>
<el-option
v-for="dict in zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="7">
<el-form-item
label="系统状态:"
prop="xtzt"
>
<el-select
v-model="formInline.xtzt"
placeholder="请选择系统状态"
>
<el-option
v-for="dict in zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col
:span="3"
style="text-align: right"
>
<el-form-item class="unit-form">
<el-button @click="resetQuery"></el-button>
<el-button
type="primary"
@click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">资产列表</span>
<el-row
:gutter="10"
class="mb8"
>
<el-col :span="1.5">
<el-button
type="warning"
plain
:icon="Download"
@click="handleExport"
>导出</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
:icon="Plus"
size="mini"
@click="handleAdd"
>新增资产</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:max-height="tabHeader"
:row-class-name="tableRowClassName"
>
<el-table-column
type="index"
width="70"
label="序号"
align="center"
/>
<el-table-column
label="系统名称"
key="xtmc"
width="200px"
prop="xtmc"
align="center"
/>
<el-table-column
label="系统类型"
key="xtlx"
prop="xtlx"
align="center"
>
<template #default="scope">
<dict-tag
:options="zc_xtlx"
:value="scope.row.xtlx"
/>
</template>
</el-table-column>
<el-table-column
label="单位名称"
key="dwmc"
prop="dwmc"
align="center"
/>
<el-table-column
label="新增时间"
key="createTime"
prop="createTime"
align="center"
/>
<el-table-column
label="系统状态"
key="status"
prop="status"
class-name="table-status"
align="center"
>
<template #default="scope">
<span
v-if="scope.row.xtzt == 1"
style="color: #16b771"
>
已安装
</span>
<span
v-else-if="scope.row.xtzt == 2"
style="color: #f58a0c"
>
测试中
</span>
<span
v-else-if="scope.row.xtzt == 3"
style="color: #1485ef"
>
使用中
</span>
<span
v-else-if="scope.row.xtzt == 4"
style="color: #29a07a"
>
维护中
</span>
<span
v-else-if="scope.row.xtzt == 5"
style="color: #f50c0c"
>
关停
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row, 1)"
>
<img
src="@/assets/images/icon-ck@2x.png"
alt=""
style="width: 20px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef"
>查看</span
>
</div>
<div
v-if="
!scope.row.auditState ||
scope.row.auditState == 2 ||
scope.row.xtzt == '5'
"
style="
display: flex;
align-items: center;
cursor: pointer;
margin-left: 10px;
"
@click="goInfo(scope.row, 2)"
>
<img
src="@/assets/images/edit.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef; margin-right: 15px"
>编辑</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="formInline.current"
:limit="formInline.size"
@pagination="getPagination"
:current-page.sync="formInline.current"
></my-pagination>
</main>
</div>
</template>
<script setup>
import { ref, onMounted, onUnmounted } from "vue";
import { useRouter, useRoute } from "vue-router";
import myPagination from "@/views/components/Pagination/index.vue";
import { assetUnit } from "@/api/auditPagesApi/index";
import { Download, Plus } from "@element-plus/icons-vue";
const router = useRouter();
const route = useRoute();
const { proxy } = getCurrentInstance();
const { zc_xtzt, zc_xtlx } = proxy.useDict(
"zc_xtzt",
"zc_xtlx"
);
const queryFormRef = ref(null);
const formInline = ref({
xtmc: "",
xtlx: "",
xtzt: "",
current: 1,
size: 10,
});
const total = ref(0);
const tableData = ref([]);
const loading = ref(false);
const tabHeader = ref(undefined);
const getList = async () => {
try {
loading.value = true;
const res = await assetUnit("get", formInline.value);
tableData.value = res.data.records;
total.value = res.data.total;
} catch (error) {
console.error(error);
} finally {
loading.value = false;
}
};
const resetQuery = () => {
queryFormRef.value?.resetFields();
handleQuery();
};
const handleQuery = () => {
formInline.value.current = 1;
getList();
};
const getPagination = (pages) => {
formInline.value.current = pages.page;
formInline.value.size = pages.limit;
getList();
};
const handleExport = () => {
// Implement export functionality
console.log("Export functionality to be implemented");
};
const goInfo = (row, id) => {
router.push({
name: "myAssetsAuth",
query: {
pageType: id === 1 ? "look" : "change",
type: 0,
id: row.id,
queryData: formInline.value,
name: "MyWebAssets",
},
});
};
const tableRowClassName = ({ row, rowIndex }) => {
return rowIndex % 2 !== 0 ? "evenNumber-row" : "";
};
const cancalDebounce = () => {
const element = document.getElementById("L-size-main");
const header = document.getElementById("L-header");
const pagination = document.getElementById("L-pagination");
if (element && header && pagination) {
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 120;
}
};
onMounted(() => {
if (Object.keys(route.params).length !== 0) {
formInline.value = route.params;
} else {
formInline.value.current = 1;
formInline.value.size = 20;
}
getList();
cancalDebounce();
window.addEventListener("resize", cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener("resize", cancalDebounce);
});
</script>

@ -0,0 +1,748 @@
<!-- TaskManagement.vue -->
<template>
<div
class="L-main"
id="L-size-main"
>
<div
class="content-search"
id="L-header"
>
<div class="search-title">查询条件</div>
<el-form
:inline="true"
:model="formInline"
size="medium"
class="demo-form-inline"
>
<el-row>
<el-col :span="6">
<el-form-item label="任务名称:">
<el-input
v-model="formInline.taskName"
placeholder="请输入"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="任务状态:">
<el-select
v-model="formInline.taskStatus"
placeholder="请选择"
>
<el-option
label="已关闭"
value="0"
></el-option>
<el-option
label="进行中"
value="1"
></el-option>
<el-option
label="正常完成"
value="2"
></el-option>
<el-option
label="超期完成"
value="3"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="任务完成时间:">
<el-date-picker
v-model="formInline.time"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
start-placeholder="开始时间"
end-placeholder="结束时间"
placeholder="请选择"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col
:span="6"
style="text-align: right; padding-left: 20px"
>
<el-form-item>
<el-button @click="resetQuery"></el-button>
<el-button
type="primary"
@click="handleQuery"
>查询</el-button
>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<main>
<div class="search-title">
<span class="search-title-span">任务列表</span>
<el-row
:gutter="10"
class="mb8"
>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
@click="handleAdd"
>任务创建</el-button
>
</el-col>
</el-row>
</div>
<section>
<el-table
v-loading="loading"
:data="tableData"
:height="tabHeader"
:max-height="tabHeader"
:row-class-name="tableRowClassName"
>
<el-table-column
type="index"
width="70"
label="序号"
align="center"
/>
<el-table-column
label="任务名称"
key="taskName"
prop="taskName"
align="center"
/>
<el-table-column
label="任务下发时间"
key="taskTime"
prop="taskTime"
align="center"
/>
<el-table-column
label="任务期限"
key="taskDeadline"
prop="taskDeadline"
align="center"
/>
<el-table-column
label="任务完成时间"
key="taskFinishTime"
prop="taskFinishTime"
align="center"
/>
<el-table-column
label="任务状态"
key="taskStatus"
width="200px"
prop="taskStatus"
class-name="table-status"
align="center"
>
<template #default="scope">
<span
v-if="scope.row.taskStatus == 0"
style="color: #f56c6c"
>已关闭</span
>
<span
v-if="scope.row.taskStatus == 1"
style="color: #e6a23c"
>进行中</span
>
<span
v-if="scope.row.taskStatus == 2"
style="color: #67c23a"
>正常完成</span
>
<span
v-if="scope.row.taskStatus == 3"
style="color: #67c23a"
>超期完成</span
>
<span
v-if="scope.row.taskStatus == 4"
style="color: #f56c6c"
>审核不通过</span
>
<span
v-if="scope.row.taskStatus == 5"
style="color: #f56c6c"
>审核驳回</span
>
</template>
</el-table-column>
<el-table-column
label="操作"
prop="userId"
class-name="table-operation"
align="center"
>
<template #default="scope">
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<div
style="display: flex; align-items: center; cursor: pointer"
@click="goInfo(scope.row)"
>
<img
src="@/assets/images/icon-ck@2x.png"
alt=""
style="width: 20px; margin-right: 5px"
/>
<span
class="look-info"
style="color: #1485ef"
>查看</span
>
</div>
<div
v-if="scope.row.taskStatus == 1 && scope.row.taskStatus != 0"
style="
display: flex;
align-items: center;
cursor: pointer;
margin-left: 10px;
"
@click="delInfo(scope.row)"
>
<img
src="@/assets/images/icon-shenhe@2x.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span
class="del-info"
style="color: #1485ef"
>审核</span
>
</div>
<div
v-if="scope.row.taskStatus == 1 && scope.row.taskStatus != 0"
style="
display: flex;
align-items: center;
cursor: pointer;
margin-left: 10px;
"
@click="guanbijiekou(scope.row)"
>
<i class="el-icon-delete"></i>
<span
class="del-info"
style="color: #1485ef"
>关闭</span
>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="pagination.current"
:limit="pagination.size"
@pagination="getPagination"
:current-page.sync="pagination.current"
>
</my-pagination>
</main>
<my-dialog
title="新增任务"
@close="importClose"
ref="taskDialog"
class="taskDialogBox"
width="43%"
>
<el-row>
<el-col :span="21">
<el-form
:model="ruleForm"
:rules="rules"
ref="ruleFormRef"
label-width="120px"
>
<el-form-item
label="任务名称"
prop="taskName"
>
<el-input
v-model="ruleForm.taskName"
placeholder="请输入任务名称"
></el-input>
</el-form-item>
<el-form-item
label="核查资产类型"
prop="type"
>
<el-checkbox-group
v-model="ruleForm.type"
@change="checkboxChange"
>
<el-checkbox label="0">web资产</el-checkbox>
<el-checkbox label="1">小程序资产</el-checkbox>
<el-checkbox label="2">公众号资产</el-checkbox>
<el-checkbox label="3">电子邮件资产</el-checkbox>
<el-checkbox label="4">移动应用程序资产</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item
label="核查单位"
prop="dwmc"
class="select-box"
>
<el-col>
<el-select
v-model="ruleForm.dwmc"
placeholder="请选择核查单位"
multiple
collapse-tags
@remove-tag="isclear"
>
</el-select>
</el-col>
<el-col class="btn-box">
<el-button
type="primary"
@click="addliebiao"
><i class="el-icon-s-unfold"></i
></el-button>
</el-col>
</el-form-item>
<el-form-item
label="任务期限"
prop="taskDeadline"
>
<el-date-picker
type="datetime"
placeholder="选择日期"
v-model="ruleForm.taskDeadline"
style="width: 100%"
value-format="yyyy-MM-dd HH:mm:ss"
default-time="23:59:59"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item class="newTask-form-item">
<el-button @click="resetForm"></el-button>
<el-button
type="primary"
@click="submitForm"
:loading="btnloading"
>发布</el-button
>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6"></el-col>
</el-row>
</my-dialog>
<div class="newTask-liebiao">
<my-dialog
title="单位列表"
ref="liebiaoDialog"
@close="liebiaoClose"
class="taskDialogBox"
width="80%"
>
<danweiList
ref="danweiList"
@adddanweilist="adddanweilist"
@liebiaoClose="liebiaoClose"
></danweiList>
</my-dialog>
</div>
</div>
</template>
<script>
import { ref, onMounted, onUnmounted } from "vue";
import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
// import myPagination from "@/views/components/Pagination/index.vue";
// import myDialog from "@/views/components/myDialog/index.vue";
// import danweiList from "@/views/system/user/danweiList.vue";
import {
addassetTaskadd,
getassetTask,
getassetTaskid,
assetTaskclose,
} from "@/api/renwuApi/index.js";
export default {
// components: { myPagination, myDialog, danweiList },
setup() {
const router = useRouter();
// Refs
const taskDialog = ref(null);
const liebiaoDialog = ref(null);
const danweiList = ref(null);
const ruleFormRef = ref(null);
// Data
const pickerOptions = {
disabledDate(time) {
const date = new Date();
const oneday = date.getTime();
return time.getTime() < new Date().getTime() - 86400000;
},
selectableRange: (() => {
let data = new Date();
let hour = data.getHours();
let minute = data.getMinutes();
let second = data.getSeconds();
return [`${hour}:${minute}:${second} - 23:59:59`];
})(),
};
const btnloading = ref(false);
const formInline = ref({
name: "",
type: "",
time: [],
number: "",
status: "",
});
const total = ref(0);
const pagination = ref({
current: 1,
size: 10,
});
const tableData = ref([]);
const loading = ref(false);
const tabHeader = ref(undefined);
const ruleForm = ref({
taskName: "",
dwmc: [],
taskDeadline: "",
type: [],
});
const rules = ref({
taskName: [{ required: true, message: "请输入", trigger: "change" }],
dwmc: [{ required: true, message: "请选择", trigger: "change" }],
taskDeadline: [
{ required: true, message: "请选择日期", trigger: "change" },
],
type: [{ required: true, message: "请选择", trigger: "change" }],
});
const tabclicklist = ref([]);
const chanckList = ref([
{ lable: "0", conent: "web资产" },
{ lable: "1", conent: "小程序资产" },
{ lable: "2", conent: "公众号资产" },
{ lable: "3", conent: "电子邮件资产" },
{ lable: "4", conent: "移动应用程序资产" },
]);
// Methods
const isclear = (value) => {
tabclicklist.value = tabclicklist.value.filter(
(user) => user.nickName != value
);
};
const checkboxChange = () => {
ruleForm.value.dwmc = [];
tabclicklist.value = [];
setTimeout(() => {
ruleFormRef.value.clearValidate();
}, 0);
};
const resetForm = () => {
ruleForm.value = {
dwmc: [],
taskName: "",
taskDeadline: "",
type: [],
};
taskDialog.value.close();
tabclicklist.value = [];
btnloading.value = false;
};
const fonsisis = (data) => {
const specificTime = new Date(data);
const currentTime = new Date();
return currentTime <= specificTime;
};
const submitForm = async () => {
if (!fonsisis(ruleForm.value.taskDeadline)) {
ElMessage.error("选择时间不能小于当前时间");
return false;
}
try {
await ruleFormRef.value.validate();
btnloading.value = true;
const formData = {
...ruleForm.value,
dwmc: ruleForm.value.dwmc.join(","),
type: ruleForm.value.type.join(","),
};
await addassetTaskadd(formData);
resetForm();
getInfo();
ElMessage.success("新增成功");
} catch (error) {
console.log("error submit!!", error);
} finally {
btnloading.value = false;
}
};
const adddanweilist = (val) => {
if (val) {
ruleForm.value.dwmc = val.map((element) => element.nickName);
} else {
ruleForm.value.dwmc = [];
}
tabclicklist.value = val || [];
};
const getInfo = async () => {
loading.value = true;
try {
const res = await getassetTask(pagination.value);
total.value = res.data.total;
tableData.value = res.data.records;
} finally {
loading.value = false;
}
};
const resetQuery = () => {
formInline.value = {
name: "",
type: "",
time: [],
number: "",
status: "",
};
pagination.value = {
current: 1,
size: 10,
};
localStorage.removeItem("ismypagination");
getInfo();
};
const addliebiao = () => {
if (ruleForm.value.type.length > 0) {
liebiaoDialog.value.open();
setTimeout(() => {
danweiList.value.getType(ruleForm.value.type);
if (tabclicklist.value) {
setTimeout(() => {
danweiList.value.dakai(tabclicklist.value);
}, 100);
}
}, 10);
} else {
ElMessage("请先选择核查资产类型");
}
};
const liebiaoClose = () => {
danweiList.value.queryParams = {
current: 1,
size: 10,
userName: undefined,
nickName: undefined,
dwlx: undefined,
};
liebiaoDialog.value.close();
};
const handleQuery = () => {
pagination.value = {
current: 1,
size: 10,
};
if (formInline.value.time.length > 0) {
formInline.value.begainTime = formInline.value.time[0];
formInline.value.endTime = formInline.value.time[1];
}
pagination.value = { ...pagination.value, ...formInline.value };
formInline.value.isfanhui = false;
localStorage.setItem("ismypagination", JSON.stringify(formInline.value));
getInfo();
};
const getPagination = (pages) => {
pagination.value.current = pages.page;
pagination.value.size = pages.limit;
getInfo();
};
const handleAdd = () => {
taskDialog.value.open();
setTimeout(() => {
ruleFormRef.value.clearValidate();
}, 100);
};
const importClose = () => {
resetForm();
};
const goInfo = (row) => {
getassetTaskid(row.id);
router.push({
name: "TaskInfo",
query: {
pageType: "look",
id: row.id,
},
});
};
const delInfo = (row) => {
router.push({
name: "TaskInfo",
query: {
pageType: "info",
id: row.id,
},
});
};
const guanbijiekou = (row) => {
ElMessageBox.confirm("此操作将关闭任务, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(async () => {
try {
await assetTaskclose({ taskId: row.id, taskName: row.taskName });
ElMessage.success("关闭成功!");
getInfo();
} catch (error) {
console.error(error);
}
})
.catch(() => {
ElMessage.info("已取消关闭");
});
};
const tableRowClassName = ({ rowIndex }) => {
return rowIndex % 2 !== 0 ? "evenNumber-row" : "";
};
const cancalDebounce = () => {
const element = document.getElementById("L-size-main");
const header = document.getElementById("L-header");
const pagination = document.getElementById("L-pagination");
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110;
};
// Lifecycle hooks
onMounted(() => {
if (localStorage.getItem("ismypagination")) {
const storedData = JSON.parse(localStorage.getItem("ismypagination"));
if (storedData.isfanhui) {
formInline.value = storedData;
handleQuery();
} else {
localStorage.removeItem("ismypagination");
}
}
localStorage.removeItem("ismypaginationTow");
localStorage.removeItem("activeName");
getInfo();
cancalDebounce();
window.addEventListener("resize", cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener("resize", cancalDebounce);
});
return {
// Refs
taskDialog,
liebiaoDialog,
danweiList,
ruleFormRef,
// Data
pickerOptions,
btnloading,
formInline,
total,
pagination,
tableData,
loading,
tabHeader,
ruleForm,
rules,
tabclicklist,
chanckList,
// Methods
isclear,
checkboxChange,
resetForm,
fonsisis,
submitForm,
adddanweilist,
getInfo,
resetQuery,
addliebiao,
liebiaoClose,
handleQuery,
getPagination,
handleAdd,
importClose,
goInfo,
delInfo,
guanbijiekou,
tableRowClassName,
cancalDebounce,
};
},
};
</script>
<style lang="scss" scoped>
.el-icon-s-unfold {
font-size: 16px;
}
// ::v-deep .el-dialog__body{
// padding-left: 80px;
// }
.el-icon-delete {
color: #409eff;
font-size: 16px;
font-weight: 600;
margin-right: 5px;
}
</style>
Loading…
Cancel
Save