# Conflicts:
#	src/views/auditPages/taskManagement/index.vue
main
项洋 1 day ago
commit 3425888623

@ -107,6 +107,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
@ -138,6 +139,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item
@ -176,6 +178,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item <el-form-item

@ -1,9 +1,8 @@
<!-- 我的资产 -->
<template> <template>
<div class="L-main" id="L-size-main"> <div class="L-main" id="L-size-main">
<div class="content-search" id="L-header"> <div class="content-search" id="L-header">
<div class="search-title">查询条件</div> <div class="search-title">查询条件</div>
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline"> <el-form :inline="true" ref="queryFormRef" :model="formInline" size="small" class="demo-form-inline">
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="系统名称:" prop="xtmc"> <el-form-item label="系统名称:" prop="xtmc">
@ -14,11 +13,11 @@
<el-form-item label="系统类型:" prop="xtlx"> <el-form-item label="系统类型:" prop="xtlx">
<el-select v-model="formInline.xtlx" placeholder="请选择系统类型"> <el-select v-model="formInline.xtlx" placeholder="请选择系统类型">
<el-option <el-option
v-for="dict in dict.type.zc_xtlx" v-for="dict in zc_xtlx"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value"> :value="dict.value"
</el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -26,18 +25,18 @@
<el-form-item label="系统状态:" prop="xtzt"> <el-form-item label="系统状态:" prop="xtzt">
<el-select v-model="formInline.xtzt" placeholder="请选择系统状态"> <el-select v-model="formInline.xtzt" placeholder="请选择系统状态">
<el-option <el-option
v-for="dict in dict.type.zc_xtzt" v-for="dict in zc_xtzt"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value"> :value="dict.value"
</el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3" style="text-align: right;"> <el-col :span="3" style="text-align: right;">
<el-form-item class="unit-form"> <el-form-item class="unit-form">
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button> <el-button size="mini" @click="resetQuery"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button> <el-button size="mini" type="primary" @click="handleQuery"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -63,37 +62,33 @@
<el-table-column type="index" width="50" label="序号" align="center"/> <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="xtmc" width="200px" prop="xtmc" align="center" />
<el-table-column label="系统类型" key="xtlx" prop="xtlx" align="center"> <el-table-column label="系统类型" key="xtlx" prop="xtlx" align="center">
<template slot-scope="scope"> <template #default="scope">
<dict-tag :options="dict.type.zc_xtlx" :value="scope.row.xtlx"/> <dict-tag :options="zc_xtlx" :value="scope.row.xtlx"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="单位名称" key="dwmc" prop="dwmc" align="center"> <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="createTime" prop="createTime" align="center" />
<el-table-column label="系统状态" key="status" prop="status" class-name="table-status" align="center"> <el-table-column label="系统状态" key="status" prop="status" class-name="table-status" align="center">
<template slot-scope="scope"> <template #default="scope">
<span v-if="scope.row.xtzt == 1" style="color: #16B771;"> <span v-if="scope.row.xtzt == 1" style="color: #16B771;">
已安装 已安装
</span> </span>
<span v-if="scope.row.xtzt == 2" style="color: #F58A0C;"> <span v-else-if="scope.row.xtzt == 2" style="color: #F58A0C;">
测试中 测试中
</span> </span>
<span v-if="scope.row.xtzt == 3" style="color: #1485EF;"> <span v-else-if="scope.row.xtzt == 3" style="color: #1485EF;">
使用中 使用中
</span> </span>
<span v-if="scope.row.xtzt == 4" style="color: #29A07A;"> <span v-else-if="scope.row.xtzt == 4" style="color: #29A07A;">
维护中 维护中
</span> </span>
<span v-if="scope.row.xtzt == 5" style="color: #F50C0C;"> <span v-else-if="scope.row.xtzt == 5" style="color: #F50C0C;">
关停 关停
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center"> <el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope"> <template #default="scope">
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,1)"> <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;"> <img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
@ -119,104 +114,111 @@
</main> </main>
</div> </div>
</template> </template>
<script>
import myPagination from "@/views/components/Pagination/index.vue" <script setup>
// import myDialog from "@/views/components/myDialog/index.vue" import { ref, onMounted, onUnmounted } from 'vue';
import { assetUnit, deleteAssetInfo } from "@/api/auditPagesApi/index"; import { useRouter, useRoute } from 'vue-router';
export default { import myPagination from "@/views/components/Pagination/index.vue";
dicts: ['zc_xtzt','zc_xtlx'], import { assetUnit } from "@/api/auditPagesApi/index";
components:{myPagination},
data() { const router = useRouter();
return { const route = useRoute();
formInline:{
xtmc:"", // Dictionaries - these should be provided via props or composable
xtlx:"", const zc_xtzt = ref([]);
xtzt:"", const zc_xtlx = ref([]);
current:1,
size:10, const queryFormRef = ref(null);
}, const formInline = ref({
total:0, xtmc: "",
tableData:[], xtlx: "",
loading:false, xtzt: "",
tabHeader: undefined, current: 1,
} size: 10,
}, });
mounted(){ const total = ref(0);
if( Object.keys(this.$route.params).length != 0) { const tableData = ref([]);
this.formInline = this.$route.params; const loading = ref(false);
}else{ const tabHeader = ref(undefined);
this.formInline.current = 1
this.formInline.size = 20 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;
} }
this.getList(); };
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce); const resetQuery = () => {
}, queryFormRef.value?.resetFields();
destroyed() { handleQuery();
window.removeEventListener('resize', this.cancalDebounce); };
},
methods:{ const handleQuery = () => {
// formInline.value.current = 1;
getList(){ getList();
this.loading = true; };
assetUnit('get',this.formInline).then(res=>{
this.loading = false; const getPagination = (pages) => {
this.total = res.data.total; formInline.value.current = pages.page;
this.tableData = res.data.records; formInline.value.size = pages.limit;
}) getList();
}, };
//
resetQuery(){ const handleExport = () => {
this.resetForm("queryForm"); // Implement export functionality
this.handleQuery(); console.log('Export functionality to be implemented');
}, };
//
handleQuery(){ const goInfo = (row, id) => {
this.formInline.current = 1; router.push({
this.getList(); name: 'myAssetsAuth',
}, query: {
// pageType: id === 1 ? "look" : "change",
getPagination(pages){ type: 0,
this.formInline.current = pages.page;
this.formInline.size = pages.limit;
this.getList();
},
//
handleImport(){},
//
handleExport(){
this.download('/tc/assetCurrent/export', {
...this.formInline
}, `asset_${new Date().getTime()}.xlsx`)
},
//
goInfo(row,id){
this.$router.push({name: 'myAssetsAuth',query: {
pageType: id == 1 ? "look" : "change",
type:0,
id: row.id, id: row.id,
queryData:this.formInline, queryData: formInline.value,
name:"MyWebAssets" name: "MyWebAssets"
}})
},
// table
tableRowClassName({row, rowIndex}){
if (rowIndex % 2 !== 0) {
return 'evenNumber-row';
} }
return ''; });
}, };
//
cancalDebounce(){ const tableRowClassName = ({ row, rowIndex }) => {
const element = document.getElementById('L-size-main'); // ID return rowIndex % 2 !== 0 ? 'evenNumber-row' : '';
const header = document.getElementById('L-header'); // ID };
const pagination = document.getElementById('L-pagination'); // ID
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 elementHeight = element.offsetHeight;
const headerHeight = header.offsetHeight; const headerHeight = header.offsetHeight;
const paginationtHeight = pagination.offsetHeight; const paginationtHeight = pagination.offsetHeight;
this.tabHeader = elementHeight - headerHeight - paginationtHeight - 120; 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;
} }
},
}
</script>
getList();
cancalDebounce();
window.addEventListener('resize', cancalDebounce);
});
onUnmounted(() => {
window.removeEventListener('resize', cancalDebounce);
});
</script>

@ -1,9 +1,8 @@
<!-- 资产管理 -- 公众号 -->
<template> <template>
<div class="L-main" id="L-size-main"> <div class="L-main" id="L-size-main">
<div class="content-search" id="L-header"> <div class="content-search" id="L-header">
<div class="search-title">查询条件</div> <div class="search-title">查询条件</div>
<el-form :inline="true" ref="queryForm" :model="formInline" size="small" class="demo-form-inline"> <el-form :inline="true" ref="queryFormRef" :model="formInline" size="small" class="demo-form-inline">
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="公众号名称:" prop="gzhmc"> <el-form-item label="公众号名称:" prop="gzhmc">
@ -14,46 +13,21 @@
<el-form-item label="公众号状态:" prop="xtzt"> <el-form-item label="公众号状态:" prop="xtzt">
<el-select v-model="formInline.xtzt" placeholder="请选择公众号状态"> <el-select v-model="formInline.xtzt" placeholder="请选择公众号状态">
<el-option <el-option
v-for="dict in dict.type.gzh_state" v-for="dict in gzh_state"
:key="dict.value" :key="dict.value"
:label="dict.label" :label="dict.label"
:value="dict.value"> :value="dict.value"
</el-option> />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3" style="text-align: right;"> <el-col :span="3" style="text-align: right;">
<el-form-item class="unit-form"> <el-form-item class="unit-form">
<el-button size="mini" @click="resetQuery('queryFrom')"></el-button> <el-button size="mini" @click="resetQuery"></el-button>
<el-button size="mini" type="primary" @click="handleQuery('queryFrom')"></el-button> <el-button size="mini" type="primary" @click="handleQuery"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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> </el-form>
</div> </div>
<main> <main>
@ -76,38 +50,24 @@
<el-table-column type="index" width="50" label="序号" align="center"/> <el-table-column type="index" width="50" label="序号" align="center"/>
<el-table-column label="公众号名称" key="gzhmc" prop="gzhmc" 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="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="createTime" prop="createTime" align="center" />
<el-table-column label="平台类型" key="ptlx" prop="ptlx" align="center"> <el-table-column label="平台类型" key="ptlx" prop="ptlx" align="center">
<template slot-scope="scope"> <template #default="scope">
<dict-tag :options="dict.type.sys_ptlx_type" :value="scope.row.ptlx"/> <dict-tag :options="sys_ptlx_type" :value="scope.row.ptlx"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="公众号状态" key="status" prop="status" class-name="table-status" align="center"> <el-table-column label="公众号状态" key="status" prop="status" class-name="table-status" align="center">
<template slot-scope="scope"> <template #default="scope">
<span v-if="scope.row.gzhzt == 1" style="color: #16B771;"> <span v-if="scope.row.gzhzt == 1" style="color: #16B771;"></span>
正常 <span v-else-if="scope.row.gzhzt == 2" style="color: #F58A0C;">注销</span>
</span> <span v-else-if="scope.row.gzhzt == 3" style="color: #1485EF;">迁移</span>
<span v-if="scope.row.gzhzt == 2" style="color: #F58A0C;"> <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> <span v-else-if="scope.row.gzhzt == 6" style="color: #F58A0C;">未知</span>
<span v-if="scope.row.gzhzt == 3" style="color: #1485EF;">
迁移
</span>
<span v-if="scope.row.gzhzt == 4" style="color: #29A07A;">
受限
</span>
<span v-if="scope.row.gzhzt == 5" style="color: #F50C0C;">
违规
</span>
<span v-if="scope.row.gzhzt == 6" style="color: #F58A0C;">
未知
</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" prop="userId" class-name="table-operation" align="center"> <el-table-column label="操作" prop="userId" class-name="table-operation" align="center">
<template slot-scope="scope"> <template #default="scope">
<div style="display: flex;align-items: center;justify-content: center;"> <div style="display: flex;align-items: center;justify-content: center;">
<div style="display: flex;align-items: center;cursor: pointer;" @click="goInfo(scope.row,1)"> <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;"> <img src="@/assets/images/icon-ck@2x.png" alt="" style="width: 20px;margin-right: 5px;">
@ -128,114 +88,121 @@
:page="formInline.current" :page="formInline.current"
:limit="formInline.size" :limit="formInline.size"
@pagination="getPagination" @pagination="getPagination"
:current-page.sync="formInline.current" v-model:current-page="formInline.current"
></my-pagination> ></my-pagination>
</main> </main>
</div> </div>
</template> </template>
<script>
<script setup>
import { ref, onMounted, onUnmounted } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import myPagination from "@/views/components/Pagination/index.vue" import myPagination from "@/views/components/Pagination/index.vue"
// import myDialog from "@/views/components/myDialog/index.vue" import { assetOfficialAccountList } from "@/api/auditPagesApi/index"
import { assetOfficialAccountList, deleteAssetOfficialAccount } from "@/api/auditPagesApi/index";
export default { // (使provide/inject)
dicts: ['zc_xtzt','zc_xtlx', 'gzh_state','sys_ptlx_type'], const gzh_state = ref([])
components:{myPagination}, const sys_ptlx_type = ref([])
data() {
return { const router = useRouter()
formInline:{ const route = useRoute()
gzhmc:"", const queryFormRef = ref(null)
xtzt:"",
// startTime:"", const formInline = ref({
// endTime:"", gzhmc: "",
current:1, xtzt: "",
size:10, current: 1,
}, size: 10
// time:[], })
total:0,
tableData:[], const loading = ref(false)
loading:false, const tableData = ref([])
tabHeader: undefined, 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
} }
}, }
mounted(){
if( Object.keys(this.$route.params).length != 0) { //
this.formInline = this.$route.params; const resetQuery = () => {
}else{ queryFormRef.value?.resetFields()
this.formInline.current = 1 formInline.value.current = 1
this.formInline.size = 20 getList()
}
//
const handleQuery = () => {
formInline.value.current = 1
getList()
}
//
const getPagination = (pages) => {
formInline.value.current = pages.page
formInline.value.size = pages.limit
getList()
}
//
const handleExport = () => {
//
console.log('导出功能:', formInline.value)
}
// /
const goInfo = (row, id) => {
router.push({
name: 'myAssetsAuth',
query: {
pageType: id === 1 ? "look" : "change",
type: 2,
id: row.id,
queryData: formInline.value,
name: "MyOfficialAccount"
} }
this.getList();
this.cancalDebounce();
window.addEventListener('resize', this.cancalDebounce);
},
destroyed() {
window.removeEventListener('resize', this.cancalDebounce);
},
methods:{
//
getList(){
this.loading = true;
assetOfficialAccountList(this.formInline).then(res=>{
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
}) })
}, }
//
resetQuery(){ //
this.resetForm("queryForm"); const tableRowClassName = ({ rowIndex }) => {
// this.time = []; return rowIndex % 2 !== 0 ? 'evenNumber-row' : ''
this.handleQuery(); }
},
// //
handleQuery(){ const cancalDebounce = () => {
this.formInline.current = 1; const element = document.getElementById('L-size-main')
// if(this.time) { const header = document.getElementById('L-header')
// this.formInline.startTime = this.time[0] const pagination = document.getElementById('L-pagination')
// this.formInline.endTime = this.time[1]
// } if (element && header && pagination) {
const elementHeight = element.offsetHeight
this.getList(); const headerHeight = header.offsetHeight
}, const paginationtHeight = pagination.offsetHeight
// tabHeader.value = elementHeight - headerHeight - paginationtHeight - 110
getPagination(pages){
this.formInline.current = pages.page;
this.formInline.size = pages.limit;
this.getList();
},
//
handleExport(){
this.download('/tc/assetOfficialAccount/export', {
...this.formInline
}, `公众号资产${new Date().getTime()}.xlsx`)
},
//
goInfo(row,id){
this.$router.push({name: 'myAssetsAuth',query: {
pageType: id == 1 ? "look" : "change",
type:2,
id:row.id,
queryData:this.formInline,
name:"MyOfficialAccount"
}})
},
// 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;
} }
},
} }
onMounted(() => {
if (Object.keys(route.params).length !== 0) {
formInline.value = route.params
}
getList()
cancalDebounce()
window.addEventListener('resize', cancalDebounce)
})
onUnmounted(() => {
window.removeEventListener('resize', cancalDebounce)
})
</script> </script>
Loading…
Cancel
Save