新增菜单修改面包屑进入路由

main
吕天方 2 months ago
parent 12f01469ab
commit 34b9ef65bf

@ -5,8 +5,8 @@ VUE_APP_TITLE = 太仓资产管理系统
ENV = 'development'
# 若依管理系统/开发环境
# VUE_APP_BASE_API = 'http://192.168.0.109:9115'
VUE_APP_BASE_API = 'http://39.101.188.84:9115'
VUE_APP_BASE_API = 'http://192.168.0.109:9115'
# VUE_APP_BASE_API = 'http://39.101.188.84:9115'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -42,12 +42,11 @@ export default {
let matched = this.$route.matched.filter(item => item.meta && item.meta.title)
if(matched[0].path == "/assetsAuth" ) {
// ----
const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'assets')
this.levelList = [activeRoute[0].children[0],matched[0]]
// const activeRoute = sidebarRouters.filter(item => item.path == '/assetsManage')
// const childrenRoute = activeRoute.children;
// console.log(activeRoute,"activeRoute");
// this.levelList = [activeRoute[0],activeRoute[0].children[0],matched[0]]
// const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'assets')
// this.levelList = [activeRoute[0].children[0],matched[0]]
const activeRoute = sidebarRouters.filter(item => item.path == '/assetsManage')
const childrenRoute = activeRoute[0].children;
this.levelList = [activeRoute[0],childrenRoute[Number(matched[0].meta.type)],matched[0]]
} else if(matched[0].path == "/taskInfo" || matched[0].path == "/taskAudit") {
// ----/
const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'task')
@ -93,6 +92,10 @@ export default {
this.$router.push(redirect)
return
}
if(path == "assets" || path == "program" || path == "officialAccount" || path == "email" || path == "mobileApplication") {
this.$router.push("assetsManage/" + path)
return;
}
this.$router.push(path)
}
}

@ -34,7 +34,7 @@
<!-- <router-link to="/user/profile">
<el-dropdown-item>个人中心</el-dropdown-item>
</router-link> -->
<el-dropdown-item divided @click.native="logout">
<el-dropdown-item @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
</el-dropdown-menu>

@ -77,8 +77,8 @@ export const constantRoutes = [
path: 'assetsAuth',
component: () => import('@/views/auditPages/assetsManagement/assetsAuth'),
name: 'AssetsAuth',
meta: { title: '新增资产', icon: 'user', activeMenu: "/assets" }
// meta: { title: '新增资产', icon: 'user', activeMenu: "/assetsManage/assets" }
// meta: { title: '新增资产', icon: 'user', activeMenu: "/assets" }
meta: { title: '新增资产', icon: 'user', activeMenu: "/assetsManage/assets" }
},{
path: 'taskInfo',
component: () => import('@/views/auditPages/taskManagement/info'),

File diff suppressed because it is too large Load Diff

@ -0,0 +1,361 @@
<!-- 资产管理 -- 电子邮件 -->
<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="small" class="demo-form-inline">
<el-row>
<el-col :span="8">
<el-form-item label="系统名称:" prop="xtmc">
<el-input v-model="formInline.xtmc" placeholder="请输入系统名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="系统类型:" prop="xtlx">
<el-select v-model="formInline.xtlx" placeholder="请选择系统类型">
<el-option
v-for="dict in dict.type.zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<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="8">
<el-form-item label="单位名称:" prop="dwmc">
<el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
</el-form-item>
</el-col>
<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.zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" style="text-align: right;padding-right: 50px;">
<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="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-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="50" 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 slot-scope="scope">
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/>
</template>
</el-table-column>
<el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
</el-table-column>
<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 slot-scope="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>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="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>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth";
import { assetUnit, deleteAssetInfo } from "@/api/auditPagesApi/index";
export default {
dicts: ['zc_xtzt','zc_xtlx'],
components:{myPagination},
data() {
return {
formInline:{
xtmc:"",
xtlx:"",
time:[],
startTime:"",
endTime:"",
dwmc:"",
xtzt:"",
current:1,
size:10,
},
total:0,
tableData:[],
loading:false,
tabHeader: undefined,
//
upload: {
//
open: false,
//
title: "资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import"
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
//
getList(){
this.loading = true;
assetUnit('get',this.formInline).then(res=>{
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
})
},
//
resetQuery(){
this.resetForm("queryForm");
this.handleQuery();
},
//
handleQuery(){
this.formInline.current = 1;
if(this.formInline.time) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
}
this.formInline.time = [];
this.getList();
},
//
getPagination(pages){
this.formInline.current = pages.page;
this.formInline.size = pages.limit;
this.getList();
},
//
handleImport(){
this.upload.open = true;
},
//
handleExport(){
this.download('/tc/assetCurrent/export', {
...this.formInline
}, `资产${new Date().getTime()}.xlsx`)
},
/** 下载模板操作 */
importTemplate() {
this.download('/tc/assetCurrent/importTemplate', {
}, `资产导入模板${new Date().getTime()}.xlsx`)
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.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 });
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
//
handleAdd(){
this.$router.push({name: 'AssetsAuth',query: {
pageType: "add",
type:3,
}})
},
//
goInfo(row,id){
if(id == 1) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "look",
type:3,
id:row.id
}})
} else if(id == 2) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "change",
type:3,
id:row.id
}})
} else if(id == 3) {
const userIds = row.id;
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
return deleteAssetInfo(userIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
},
//
edit(){
},
//
delInfo(){},
// table
tableRowClassName({row, rowIndex}){
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 110;
}
},
}
</script>

@ -1,4 +1,4 @@
<!-- 资产管理 -->
<!-- 资产管理 -- web系统 -->
<template>
<div class="L-main" id="L-size-main">
<div class="content-search" id="L-header">
@ -307,6 +307,7 @@ export default {
handleAdd(){
this.$router.push({name: 'AssetsAuth',query: {
pageType: "add",
type:0,
}})
},
//
@ -314,11 +315,13 @@ export default {
if(id == 1) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "look",
type:0,
id:row.id
}})
} else if(id == 2) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "change",
type:0,
id:row.id
}})
} else if(id == 3) {

@ -0,0 +1,361 @@
<!-- 资产管理 -- 移动应用系统 -->
<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="small" class="demo-form-inline">
<el-row>
<el-col :span="8">
<el-form-item label="系统名称:" prop="xtmc">
<el-input v-model="formInline.xtmc" placeholder="请输入系统名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="系统类型:" prop="xtlx">
<el-select v-model="formInline.xtlx" placeholder="请选择系统类型">
<el-option
v-for="dict in dict.type.zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<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="8">
<el-form-item label="单位名称:" prop="dwmc">
<el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
</el-form-item>
</el-col>
<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.zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" style="text-align: right;padding-right: 50px;">
<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="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-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="50" 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 slot-scope="scope">
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/>
</template>
</el-table-column>
<el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
</el-table-column>
<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 slot-scope="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>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="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>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth";
import { assetUnit, deleteAssetInfo } from "@/api/auditPagesApi/index";
export default {
dicts: ['zc_xtzt','zc_xtlx'],
components:{myPagination},
data() {
return {
formInline:{
xtmc:"",
xtlx:"",
time:[],
startTime:"",
endTime:"",
dwmc:"",
xtzt:"",
current:1,
size:10,
},
total:0,
tableData:[],
loading:false,
tabHeader: undefined,
//
upload: {
//
open: false,
//
title: "资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import"
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
//
getList(){
this.loading = true;
assetUnit('get',this.formInline).then(res=>{
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
})
},
//
resetQuery(){
this.resetForm("queryForm");
this.handleQuery();
},
//
handleQuery(){
this.formInline.current = 1;
if(this.formInline.time) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
}
this.formInline.time = [];
this.getList();
},
//
getPagination(pages){
this.formInline.current = pages.page;
this.formInline.size = pages.limit;
this.getList();
},
//
handleImport(){
this.upload.open = true;
},
//
handleExport(){
this.download('/tc/assetCurrent/export', {
...this.formInline
}, `资产${new Date().getTime()}.xlsx`)
},
/** 下载模板操作 */
importTemplate() {
this.download('/tc/assetCurrent/importTemplate', {
}, `资产导入模板${new Date().getTime()}.xlsx`)
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.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 });
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
//
handleAdd(){
this.$router.push({name: 'AssetsAuth',query: {
pageType: "add",
type:4,
}})
},
//
goInfo(row,id){
if(id == 1) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "look",
type:4,
id:row.id
}})
} else if(id == 2) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "change",
type:4,
id:row.id
}})
} else if(id == 3) {
const userIds = row.id;
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
return deleteAssetInfo(userIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
},
//
edit(){
},
//
delInfo(){},
// table
tableRowClassName({row, rowIndex}){
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 110;
}
},
}
</script>

@ -0,0 +1,361 @@
<!-- 资产管理 -- 公众号 -->
<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="small" class="demo-form-inline">
<el-row>
<el-col :span="8">
<el-form-item label="系统名称:" prop="xtmc">
<el-input v-model="formInline.xtmc" placeholder="请输入系统名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="系统类型:" prop="xtlx">
<el-select v-model="formInline.xtlx" placeholder="请选择系统类型">
<el-option
v-for="dict in dict.type.zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<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="8">
<el-form-item label="单位名称:" prop="dwmc">
<el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
</el-form-item>
</el-col>
<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.zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" style="text-align: right;padding-right: 50px;">
<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="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-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="50" 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 slot-scope="scope">
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/>
</template>
</el-table-column>
<el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
</el-table-column>
<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 slot-scope="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>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="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>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth";
import { assetUnit, deleteAssetInfo } from "@/api/auditPagesApi/index";
export default {
dicts: ['zc_xtzt','zc_xtlx'],
components:{myPagination},
data() {
return {
formInline:{
xtmc:"",
xtlx:"",
time:[],
startTime:"",
endTime:"",
dwmc:"",
xtzt:"",
current:1,
size:10,
},
total:0,
tableData:[],
loading:false,
tabHeader: undefined,
//
upload: {
//
open: false,
//
title: "资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import"
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
//
getList(){
this.loading = true;
assetUnit('get',this.formInline).then(res=>{
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
})
},
//
resetQuery(){
this.resetForm("queryForm");
this.handleQuery();
},
//
handleQuery(){
this.formInline.current = 1;
if(this.formInline.time) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
}
this.formInline.time = [];
this.getList();
},
//
getPagination(pages){
this.formInline.current = pages.page;
this.formInline.size = pages.limit;
this.getList();
},
//
handleImport(){
this.upload.open = true;
},
//
handleExport(){
this.download('/tc/assetCurrent/export', {
...this.formInline
}, `资产${new Date().getTime()}.xlsx`)
},
/** 下载模板操作 */
importTemplate() {
this.download('/tc/assetCurrent/importTemplate', {
}, `资产导入模板${new Date().getTime()}.xlsx`)
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.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 });
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
//
handleAdd(){
this.$router.push({name: 'AssetsAuth',query: {
pageType: "add",
type:2,
}})
},
//
goInfo(row,id){
if(id == 1) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "look",
type:2,
id:row.id
}})
} else if(id == 2) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "change",
type:2,
id:row.id
}})
} else if(id == 3) {
const userIds = row.id;
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
return deleteAssetInfo(userIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
},
//
edit(){
},
//
delInfo(){},
// table
tableRowClassName({row, rowIndex}){
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 110;
}
},
}
</script>

@ -0,0 +1,361 @@
<!-- 资产管理 -- 小程序 -->
<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="small" class="demo-form-inline">
<el-row>
<el-col :span="8">
<el-form-item label="系统名称:" prop="xtmc">
<el-input v-model="formInline.xtmc" placeholder="请输入系统名称"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="系统类型:" prop="xtlx">
<el-select v-model="formInline.xtlx" placeholder="请选择系统类型">
<el-option
v-for="dict in dict.type.zc_xtlx"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<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="8">
<el-form-item label="单位名称:" prop="dwmc">
<el-input v-model="formInline.dwmc" placeholder="请输入单位名称"></el-input>
</el-form-item>
</el-col>
<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.zc_xtzt"
:key="dict.value"
:label="dict.label"
:value="dict.value">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8" style="text-align: right;padding-right: 50px;">
<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="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-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="50" 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 slot-scope="scope">
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/>
</template>
</el-table-column>
<el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.project_middle_type" :value="scope.row.projectMiddleType"/>
</template> -->
</el-table-column>
<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 slot-scope="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>
</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="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>
</template>
<script>
import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue"
import { getToken } from "@/utils/auth";
import { assetUnit, deleteAssetInfo } from "@/api/auditPagesApi/index";
export default {
dicts: ['zc_xtzt','zc_xtlx'],
components:{myPagination},
data() {
return {
formInline:{
xtmc:"",
xtlx:"",
time:[],
startTime:"",
endTime:"",
dwmc:"",
xtzt:"",
current:1,
size:10,
},
total:0,
tableData:[],
loading:false,
tabHeader: undefined,
//
upload: {
//
open: false,
//
title: "资产导入",
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/tc/assetCurrent/import"
},
}
},
mounted(){
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
//
getList(){
this.loading = true;
assetUnit('get',this.formInline).then(res=>{
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
})
},
//
resetQuery(){
this.resetForm("queryForm");
this.handleQuery();
},
//
handleQuery(){
this.formInline.current = 1;
if(this.formInline.time) {
this.formInline.startTime = this.formInline.time[0]
this.formInline.endTime = this.formInline.time[1]
}
this.formInline.time = [];
this.getList();
},
//
getPagination(pages){
this.formInline.current = pages.page;
this.formInline.size = pages.limit;
this.getList();
},
//
handleImport(){
this.upload.open = true;
},
//
handleExport(){
this.download('/tc/assetCurrent/export', {
...this.formInline
}, `资产${new Date().getTime()}.xlsx`)
},
/** 下载模板操作 */
importTemplate() {
this.download('/tc/assetCurrent/importTemplate', {
}, `资产导入模板${new Date().getTime()}.xlsx`)
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.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 });
this.getList();
},
//
submitFileForm() {
this.$refs.upload.submit();
},
//
handleAdd(){
this.$router.push({name: 'AssetsAuth',query: {
pageType: "add",
type:1,
}})
},
//
goInfo(row,id){
if(id == 1) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "look",
type:1,
id:row.id
}})
} else if(id == 2) {
this.$router.push({name: 'AssetsAuth',query: {
pageType: "change",
type:1,
id:row.id
}})
} else if(id == 3) {
const userIds = row.id;
this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
return deleteAssetInfo(userIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
},
//
edit(){
},
//
delInfo(){},
// table
tableRowClassName({row, rowIndex}){
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
}
return '';
},
//
cancalDebounce(){
const element = document.getElementById('L-size-main'); // ID
const header = document.getElementById('L-header'); // ID
const pagination = document.getElementById('L-pagination'); // ID
const elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 110;
}
},
}
</script>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,274 @@
<!-- 小程序表单 -->
<template>
<div class="L-assets-info">
<div class="assets-info-top">
<el-row style="margin: 10px 0;">
<span class="top-title-box">基本信息</span>
</el-row>
<div class="assets-info-box">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="170px" class="demo-ruleForm" label-position="right" :disabled="disabled">
<el-row>
<el-col :span="12">
<el-form-item label="单位名称" required prop="dwmc">
<!-- <el-input v-model="ruleForm.dwmc" placeholder="请输入单位名称"></el-input> -->
<el-autocomplete
v-model="ruleForm.dwmc"
:fetch-suggestions="querySearchAsync"
placeholder="请输入单位名称"
></el-autocomplete>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="小程序名称" required prop="xtmc">
<el-input v-model="ruleForm.xtmc" placeholder="请输入小程序名称"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="APPID">
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入APPID"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="认证主体" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入认证主体"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="daoqitixingren" prop="tyshxydm" label="统一社会信用代码"
:rules="[
{
pattern: /^[a-zA-Z0-9]{18}$/,
message: '请输入正确格式的18位统一社会信用代码',
trigger: 'blur'
}
]"
>
<el-input v-model="ruleForm.tyshxydm" placeholder="请输入统一信用代码"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="小程序状态">
<el-select v-model="ruleForm.xtbq" placeholder="请选择小程序状态">
<el-option label="正常" value="1"></el-option>
<el-option label="注销" value="2"></el-option>
<el-option label="迁移" value="3"></el-option>
<el-option label="受限" value="4"></el-option>
<el-option label="违规" value="5"></el-option>
<el-option label="未知" value="6"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="账号原始ID" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入账号原始ID"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="小程序包状态">
<el-select v-model="ruleForm.xtbq" placeholder="请选择小程序包状态">
<el-option label="正常" value="1"></el-option>
<el-option label="停用" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="认证状态">
<el-select v-model="ruleForm.xtbq" placeholder="请选择认证状态">
<el-option label="已认证" value="1"></el-option>
<el-option label="未认证" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="认证时间" required>
<el-date-picker
v-model="ruleForm.ymdqsj"
type="date"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="认证类型">
<el-select v-model="ruleForm.xtbq" placeholder="请选择认证类型">
<el-option label="个人" value="1"></el-option>
<el-option label="企业" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="icp备案状态" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入icp备案状态"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="域名白名单">
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入域名白名单"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="服务类目" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入服务类目"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="行业电子邮箱">
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入行业电子邮箱"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属行业" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入所属行业"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="重点行业">
<el-select v-model="ruleForm.xtbq" placeholder="请选择系统标签">
<el-option label="政务" value="1"></el-option>
<el-option label="交通" value="2"></el-option>
<el-option label="卫健" value="3"></el-option>
<el-option label="新闻媒体" value="4"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="行政区划" required>
<el-cascader
size="large"
:props="props"
:options="options"
v-model="dlwz"
>
</el-cascader>
</el-form-item>
</el-col>
</el-row>
<!-- TODO明天加字段 -->
<el-row>
<el-col :span="12">
<el-form-item label="系统标签">
<el-select v-model="ruleForm.xtbq" placeholder="请选择系统标签">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="机房信息" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入机房信息"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="系统标签">
<el-select v-model="ruleForm.xtbq" placeholder="请选择系统标签">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="机房信息" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入机房信息"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="系统标签">
<el-select v-model="ruleForm.xtbq" placeholder="请选择系统标签">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="机房信息" required>
<el-input v-model="ruleForm.jfxx" style="width: 100%;" placeholder="请输入机房信息"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
</div>
</div>
</template>
<script>
import pcas from "@/utils/pca-code.json"
import { assetUnitData, assetInfo, unitAllList } from "@/api/auditPagesApi/index";
export default {
data() {
return {
options: pcas,
props:{
value:'value',
label:"value",
checkStrictly:true,
},
ruleForm:{
},
rules:{},
disabled:false,
}
},
props:['pageType', 'id'],
mounted(){
if(this.pageType == 'look') {
this.getInfo(this.id)
this.disabled = true;
this.$nextTick(()=>{
const inputElements = document.querySelectorAll('.el-input__inner');
const textareaInputElements = document.querySelectorAll('.el-textarea__inner');
inputElements.forEach((input) => {
input.placeholder = '';
});
textareaInputElements.forEach((input) => {
input.placeholder = '';
});
})
} else if(this.pageType == 'change') {
this.getInfo(this.id)
this.disabled = false;
}
},
methods:{
getInfo(id){
},
//
querySearchAsync(queryString, cb){
let results = [];
unitAllList({nickName: queryString}).then(res => {
res.data.forEach(item => {
results.push({
value: item.nickName,
id: item.id,
})
})
})
cb(results);
},
},
}
</script>

@ -0,0 +1,19 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {
}
},
props:['pageType', 'id'],
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,19 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {
}
},
props:['pageType', 'id'],
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>

@ -0,0 +1,19 @@
<template>
<div>
</div>
</template>
<script>
export default {
data() {
return {
}
},
props:['pageType', 'id'],
methods:{
},
}
</script>
<style lang="scss" scoped>
</style>

@ -11,7 +11,11 @@ export default {
},
mounted() {
const firstRouter = this.defaultRoutes.filter(item => !item.hidden)
this.$router.push('/'+firstRouter[0].children[0].path);
if(this.$store.state.user.roles.includes('unit')) {
this.$router.push('/'+firstRouter[0].children[0].path);
} else {
this.$router.push(firstRouter[0].path + "/" + firstRouter[0].children[0].path);
}
},
};
</script>

@ -137,178 +137,208 @@
</el-col>
</el-row>
</div> -->
<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="queryParams" ref="queryForm" size="small" class="demo-form-inline">
<el-row>
<el-col :span="6">
<el-form-item label="单位名称:" prop="nickName">
<el-input
v-model="queryParams.nickName"
placeholder="请输入单位名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位类型:" prop="dwlx">
<el-select
v-model="queryParams.dwlx"
placeholder="请选择单位类型"
clearable
>
<el-option
v-for="dict in dict.type.dwlx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="统一社会信用代码:" class="tyshxydm-class" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入统一社会信用代码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="3" style="text-align: right;padding-right: 20px;">
<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="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增单位</el-button>
</el-col>
</el-row>
<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-input
v-model="deptName"
placeholder="请输入部门名称"
clearable
size="small"
prefix-icon="el-icon-search"
style="margin-bottom: 20px"
/>
</div>
<section>
<el-table v-loading="loading" :data="userList" :height="tabHeader" :max-height="tabHeader" :row-class-name="tableRowClassName">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="单位名称" align="center" key="nickName" prop="nickName">
<template slot-scope="scope">{{ scope.row.nickName }}</template>
</el-table-column>
<el-table-column label="单位类型" align="center" key="dwlx" prop="dwlx">
<template slot-scope="scope">
<dict-tag :options="dict.type.dwlx" :value="scope.row.dwlx"/>
</template>
</el-table-column>
<el-table-column label="统一社会信用代码" align="center" key="userName" prop="userName">
<template slot-scope="scope">{{ scope.row.userName }}</template>
</el-table-column>
<el-table-column label="所属区域" align="center" key="ssqycounty" prop="ssqycounty">
<template slot-scope="scope">{{ getSsqu(scope.row) }}</template>
</el-table-column>
<el-table-column label="所属行业" align="center" key="sshy" prop="sshy">
<template slot-scope="scope">
<dict-tag :options="dict.type.sshy" :value="scope.row.sshy"/>
<!-- {{ scope.row.sshy }} -->
</template>
</el-table-column>
<el-table-column label="单位地址" align="center" key="dwxxdz" prop="dwxxdz">
<template slot-scope="scope">{{ scope.row.dwxxdz }}</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<div style="display: flex;align-items: center;cursor: pointer;"@click="handleLookdate(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 style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="handleUpdate(scope.row)">
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;">
<span class="look-info" style="color: #1485EF;">编辑</span>
</div>
<div style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="handleDelete(scope.row)">
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;">
<span class="look-info" style="color: #F50C0C;">删除</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="queryParams.current"
:limit="queryParams.size"
@pagination="getPagination"
:current-page.sync="queryParams.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 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" :model="queryParams" ref="queryForm" size="small" class="demo-form-inline">
<el-row>
<el-col :span="6">
<el-form-item label="单位名称:" prop="nickName">
<el-input
v-model="queryParams.nickName"
placeholder="请输入单位名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位类型:" prop="dwlx">
<el-select
v-model="queryParams.dwlx"
placeholder="请选择单位类型"
clearable
>
<el-option
v-for="dict in dict.type.dwlx"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="统一社会信用代码:" class="tyshxydm-class" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入统一社会信用代码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-col>
<el-col :span="3" style="text-align: right;padding-right: 20px;">
<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>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
<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="el-icon-upload2"
size="mini"
@click="handleImport"
>导入</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增单位</el-button>
</el-col>
</el-row>
</div>
<section>
<el-table v-loading="loading" :data="userList" :height="tabHeader" :max-height="tabHeader" :row-class-name="tableRowClassName">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="单位名称" align="center" key="nickName" prop="nickName">
<template slot-scope="scope">{{ scope.row.nickName }}</template>
</el-table-column>
<el-table-column label="单位类型" align="center" key="dwlx" prop="dwlx">
<template slot-scope="scope">
<dict-tag :options="dict.type.dwlx" :value="scope.row.dwlx"/>
</template>
</el-table-column>
<el-table-column label="统一社会信用代码" align="center" key="userName" prop="userName">
<template slot-scope="scope">{{ scope.row.userName }}</template>
</el-table-column>
<!-- <el-table-column label="所属区域" align="center" key="ssqycounty" prop="ssqycounty">
<template slot-scope="scope">{{ getSsqu(scope.row) }}</template>
</el-table-column> -->
<el-table-column label="所属行业" align="center" key="sshy" prop="sshy">
<template slot-scope="scope">
<dict-tag :options="dict.type.sshy" :value="scope.row.sshy"/>
<!-- {{ scope.row.sshy }} -->
</template>
</el-table-column>
<el-table-column label="单位地址" align="center" key="dwxxdz" prop="dwxxdz">
<template slot-scope="scope">{{ scope.row.dwxxdz }}</template>
</el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope">
<div style="display: flex;align-items: center;justify-content: center;">
<div style="display: flex;align-items: center;cursor: pointer;"@click="handleLookdate(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 style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="handleUpdate(scope.row)">
<img src="@/assets/images/edit.png" alt="" style="width: 15px;margin-right: 5px;">
<span class="look-info" style="color: #1485EF;">编辑</span>
</div>
<div style="display: flex;align-items: center;cursor: pointer; margin-left: 10px;" @click="handleDelete(scope.row)">
<img src="@/assets/images/del.png" alt="" style="width: 20px;margin-right: 5px;">
<span class="look-info" style="color: #F50C0C;">删除</span>
</div>
</div>
</template>
</el-table-column>
</el-table>
</section>
<my-pagination
id="L-pagination"
:total="total"
:page="queryParams.current"
:limit="queryParams.size"
@pagination="getPagination"
:current-page.sync="queryParams.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-dialog>
</div>
</el-col>
</el-row>
</template>
<script>
// import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus, deptTreeSelect } from "@/api/system/user";
import { listUnit, delUnit } from "@/api/auditPagesApi/index";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
@ -418,6 +448,7 @@ export default {
},
created() {
this.getList();
this.getDeptTree();
// this.getConfigKey("sys.user.initPassword").then(response => {
// this.initPassword = response.msg;
// });
@ -457,6 +488,17 @@ export default {
this.queryParams.size = pages.limit;
this.getList();
},
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then(response => {
this.deptOptions = response.data;
});
},
//
filterNode(value, data) {
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.deptId = data.id;

Loading…
Cancel
Save