web资产表单上传地址更改

yanfeiyong
严飞永 4 weeks ago
parent 8497731bbf
commit 55ef062a59

@ -0,0 +1,53 @@
<template>
<assetsTypeOne :pageType="$route.query.pageType" :isModdle="true" :id="$route.query.id" :queryData="$route.query.queryData" :name="$route.query.name" v-if="$route.query.type == 0" />
<assetsTypeTwo :pageType="$route.query.pageType" :isModdle="true" :id="$route.query.id" :queryData="$route.query.queryData" :name="$route.query.name" v-else-if="$route.query.type == 1" />
<assetsTypeThree :pageType="$route.query.pageType" :isModdle="true" :id="$route.query.id" :queryData="$route.query.queryData" :name="$route.query.name" v-else-if="$route.query.type == 2" />
<assetsTypeFour :pageType="$route.query.pageType" :isModdle="true" :id="$route.query.id" :queryData="$route.query.queryData" :name="$route.query.name" v-else-if="$route.query.type == 3" />
<assetsTypeFive :pageType="$route.query.pageType" :isModdle="true" :id="$route.query.id" :queryData="$route.query.queryData" :name="$route.query.name" v-else-if="$route.query.type == 4" />
</template>
<script>
// web
import assetsTypeOne from "@/views/components/myAssetsType/index.vue"
//
import assetsTypeTwo from "@/views/components/myAssetsType/index_v1.vue"
//
import assetsTypeThree from "@/views/components/myAssetsType/index_v2.vue"
//
import assetsTypeFour from "@/views/components/myAssetsType/index_v3.vue"
//
import assetsTypeFive from "@/views/components/myAssetsType/index_v4.vue"
export default {
name: "AssetsAuth",
components:{
assetsTypeOne,
assetsTypeTwo,
assetsTypeThree,
assetsTypeFour,
assetsTypeFive,
},
data() {
return {
}
},
beforeRouteEnter(to,from,next){
to.meta.type = to.query.type
if(to.meta.pageType == 'look') {
to.meta.title = '查看资产'
} else if(to.meta.pageType == 'change'){
to.meta.title = '修改资产'
}
// if(to.meta.type == 0) {
// to.meta.activeMenu = "/assetRecord/myWebAssets"
// } else if(to.meta.type == 1) {
// to.meta.activeMenu = "/assetRecord/myProgram"
// } else if(to.meta.type == 2) {
// to.meta.activeMenu = "/assetRecord/myOfficialAccount"
// } else if(to.meta.type == 3) {
// to.meta.activeMenu = "/assetRecord/myEmail"
// } else if(to.meta.type == 4) {
// to.meta.activeMenu = "/assetRecord/myMobileApplication"
// }
next();
},
}
</script>

@ -0,0 +1,605 @@
<!-- 单位自主填报 -->
<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="formInlineRef"
:model="pagination"
size="small"
class="demo-form-inline"
>
<el-row>
<el-col :span="6">
<el-form-item label="资产名称:" prop="name">
<el-input
v-model="pagination.name"
placeholder="请输入"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="审核状态:" prop="auditState">
<el-select
v-model="pagination.auditState"
placeholder="请选择审核状态"
>
<el-option label="待审核" value="1" />
<el-option label="审核通过" value="2" />
<el-option label="审核驳回" value="3" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="6" style="text-align: left">
<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-form>
</div>
<main>
<div class="search-title">
<el-row class="mb8">
<el-col>
<div class="exportBtn">
<div
class="mybuttom"
:class="btnShow == item.value ? 'mybuttomshow' : ''"
v-for="(item, index) in btnArr"
@click="xuanzelist(item)"
>
{{ item.label }}
</div>
</div>
</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="50"
label="序号"
align="center"
/>
<el-table-column
label="资产名称"
key="xtmc"
prop="xtmc"
align="center"
v-if="btnShow == 'web'"
/>
<el-table-column
label="所属单位"
key="dwmc"
prop="dwmc"
align="center"
v-if="btnShow == 'web'"
/>
<el-table-column
label="资产名称"
key="xcxmc"
prop="xcxmc"
align="center"
v-if="btnShow == 'xcx'"
/>
<el-table-column
label="资产名称"
key="gzhmc"
prop="gzhmc"
align="center"
v-if="btnShow == 'gzh'"
/>
<el-table-column
label="资产名称"
key="dzyxhz"
prop="dzyxhz"
align="center"
v-if="btnShow == 'emil'"
/>
<el-table-column
label="资产名称"
key="appName"
prop="appName"
align="center"
v-if="btnShow == 'app'"
/>
<el-table-column
label="所属单位"
key="ssdw"
prop="ssdw"
align="center"
v-if="btnShow !== 'web'"
/>
<el-table-column
label="平台类型"
key="ptlx"
prop="ptlx"
align="center"
v-if="btnShow == 'gzh'"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.sys_ptlx_type"
:value="scope.row.ptlx"
/>
</template>
</el-table-column>
<el-table-column
label="审核状态"
key="auditState"
width="200px"
prop="auditState"
class-name="table-status"
align="center"
>
<template slot-scope="scope">
<span v-if="scope.row.auditState == 1" style="color: #f58a0c">
待审核
</span>
<span v-if="scope.row.auditState == 2" style="color: #16b771">
审批通过
</span>
<span v-if="scope.row.auditState == 3" 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)"
>
<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 == 3"
style="
display: flex;
align-items: center;
cursor: pointer;
margin-left: 10px;
"
@click="delInfo(scope.row)"
>
<img
src="@/assets/images/edit.png"
alt=""
style="width: 15px; margin-right: 5px"
/>
<span class="del-info" style="color: #1485ef">编辑</span>
</div>
<div
v-if="scope.row.auditState == 3"
style="
display: flex;
align-items: center;
cursor: pointer;
margin-left: 10px;
"
@click="lookInfo(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>
</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="查看原因"
ref="liebiaoDialog"
class="taskDialogBox"
width="40%"
>
<el-descriptions>
<el-descriptions-item label="不通过原因">
{{ chakanyuanyin }}
</el-descriptions-item>
</el-descriptions>
</my-dialog>
</div>
</template>
<script>
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";
import {
getAuditList,
miniProgramsGetAuditList,
gzhGetAuditList,
EmailList,
AppList,
} from "@/api/auditPagesApi/index.js";
import { mapGetters } from "vuex";
export default {
dicts: ["sys_ptlx_type"],
components: { myPagination, myDialog, danweiList },
data() {
return {
btnloading: false,
total: 0,
pagination: {
current: 1,
size: 10,
dwmc: "",
auditState: "",
name: "",
},
tableData: [],
loading: false,
tabHeader: undefined,
btnArr: [
{
label: "web资产",
value: "web",
},
{
label: "小程序",
value: "xcx",
},
{
label: "公众号",
value: "gzh",
},
{
label: "电子邮件",
value: "emil",
},
{
label: "移动应用系统",
value: "app",
},
],
btnShow: "web",
chakanyuanyin: "",
};
},
computed: {
...mapGetters(["nickName"]),
},
mounted() {
// this.getInfo(1);
this.cancalDebounce();
window.addEventListener("resize", this.cancalDebounce);
},
destroyed() {
window.removeEventListener("resize", this.cancalDebounce);
},
methods: {
//
getInfo(id) {
this.loading = true;
this.pagination.dwmc = this.nickName;
// getassetTask(this.pagination).then(res => {
// this.loading = false;
// this.total = res.data.total;
// this.tableData = res.data.records;
// })
if (id == 1) {
getAuditList(this.pagination).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
});
} else if (id == 2) {
miniProgramsGetAuditList(this.pagination).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
});
} else if (id == 3) {
gzhGetAuditList(this.pagination).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
});
} else if (id == 4) {
EmailList(this.pagination).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
});
} else if (id == 5) {
AppList(this.pagination).then((res) => {
this.loading = false;
this.total = res.data.total;
this.tableData = res.data.records;
});
}
},
//
resetQuery() {
this.resetForm("formInlineRef");
this.pagination.current = 1;
if (this.btnShow == "web") {
this.getInfo(1);
} else if (this.btnShow == "xcx") {
this.getInfo(2);
} else if (this.btnShow == "gzh") {
this.getInfo(3);
} else if (this.btnShow == "emil") {
this.getInfo(4);
} else if (this.btnShow == "app") {
this.getInfo(5);
}
this.getInfo();
},
//
handleQuery() {
this.pagination.current = 1;
if (this.btnShow == "web") {
this.getInfo(1);
} else if (this.btnShow == "xcx") {
this.getInfo(2);
} else if (this.btnShow == "gzh") {
this.getInfo(3);
} else if (this.btnShow == "emil") {
this.getInfo(4);
} else if (this.btnShow == "app") {
this.getInfo(5);
}
},
//
getPagination(pages) {
this.pagination.current = pages.page;
this.pagination.size = pages.limit;
if (this.btnShow == "web") {
this.getInfo(1);
} else if (this.btnShow == "xcx") {
this.getInfo(2);
} else if (this.btnShow == "gzh") {
this.getInfo(3);
} else if (this.btnShow == "emil") {
this.getInfo(4);
} else if (this.btnShow == "app") {
this.getInfo(5);
}
},
//
goInfo(row) {
this.$router.push({
name: "assetsAuthRecord",
query: {
type:
this.btnShow == "web"
? 0
: this.btnShow == "xcx"
? 1
: this.btnShow == "gzh"
? 2
: this.btnShow == "emil"
? 3
: this.btnShow == "app"
? 4
: 5,
pageType: "look",
btnShow: this.btnShow,
id:
this.btnShow == "web"
? row.currentId
: this.btnShow == "xcx"
? row.miniId
: this.btnShow == "gzh"
? row.accountId
: this.btnShow == "emil"
? row.emailId
: this.btnShow == "app"
? row.appId
: null,
name: "AssetRecord",
queryData: this.pagination,
},
});
},
//
delInfo(row) {
//taskAudit
this.$router.push({
name: "assetsAuthRecord",
query: {
type:
this.btnShow == "web"
? 0
: this.btnShow == "xcx"
? 1
: this.btnShow == "gzh"
? 2
: this.btnShow == "emil"
? 3
: this.btnShow == "app"
? 4
: 5,
pageType: "change",
btnShow: this.btnShow,
id:
this.btnShow == "web"
? row.currentId
: this.btnShow == "xcx"
? row.miniId
: this.btnShow == "gzh"
? row.accountId
: this.btnShow == "emil"
? row.emailId
: this.btnShow == "app"
? row.appId
: null,
name: "AssetRecord",
queryData: this.pagination,
},
});
},
//
lookInfo(row) {
this.chakanyuanyin = row.auditYy;
this.$refs.liebiaoDialog.open();
},
// tab
xuanzelist(item) {
this.btnShow = item.value;
switch (item.value) {
case "web":
this.getInfo(1);
break;
case "xcx":
this.getInfo(2);
break;
case "gzh":
this.getInfo(3);
break;
case "emil":
this.getInfo(4);
break;
case "app":
this.getInfo(5);
break;
default:
break;
}
},
// 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 - 140;
},
},
beforeRouteEnter(to, from, next) {
next((vm) => {
if (from.path == "/assetsAuthRecord") {
vm.btnShow = from.query.btnShow;
if (from.query.queryData) {
vm.pagination = from.query.queryData;
}
if (vm.btnShow == "web") {
vm.getInfo(1);
} else if (vm.btnShow == "xcx") {
vm.getInfo(2);
} else if (vm.btnShow == "gzh") {
vm.getInfo(3);
} else if (vm.btnShow == "emil") {
vm.getInfo(4);
} else if (vm.btnShow == "app") {
vm.getInfo(5);
}
} else {
vm.getInfo(1);
}
});
},
};
</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;
}
.exportBtn {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
}
.mybuttom {
margin: 0 10px;
display: inline-block;
padding: 5px 20px;
// background-color: rgba(30, 128, 235, 0.1);
background-color: rgba(213, 225, 236, 0.1);
border-radius: 8px;
border: 1px solid #1e80eb;
font-size: 14px;
color: #1e80eb;
font-family: Source Han Sans CN;
cursor: pointer;
&:hover {
background-color: #1e80eb;
color: #ffffff;
border: 1px solid #1e80eb;
}
}
.mybuttomshow {
background-color: #1e80eb;
color: #ffffff;
border: 1px solid #1e80eb;
}
</style>

@ -4220,7 +4220,7 @@
</el-row>
<el-row style="margin: 20px 0">
<el-form-item>
<myUpload
<FileUpload
:fileSize="30"
:limit="1"
:fileType="accept"
@ -4232,12 +4232,12 @@
>附件上传支持xlsxlsxdocdocxpdfrarzippcaptxt最多上传1个文件每个不超过30M</span
>
</div>
</myUpload>
</FileUpload>
</el-form-item>
</el-row>
<el-row style="margin: 20px 0">
<el-form-item>
<myUpload
<FileUpload
:fileSize="30"
:limit="1"
:fileType="acceptTwo"
@ -4249,7 +4249,7 @@
>图片上传支持jpgjpegpng最多上传1张图片每个不超过30M</span
>
</div>
</myUpload>
</FileUpload>
</el-form-item>
</el-row>
<el-row style="margin: 10px 0" v-if="ruleForm.bfyy">
@ -4286,7 +4286,7 @@ import { ref, reactive, onMounted, nextTick } from "vue";
import { useRouter, useRoute } from "vue-router";
import { ElMessage } from "element-plus";
import pcas from "@/utils/pca-code.json";
import myUpload from "@/views/components/myUpload/index.vue";
import FileUpload from "@/components/FileUpload/index.vue";
import {
assetUnitData,
assetInfo,

Loading…
Cancel
Save