<template>
	<fullscreen :fullscreen.sync="fullscreen" class="container">
		<div class="container-box">

			<!-- <h2>广告宣传费台账</h2>
				<div class="adv-type">
				    <div @click="jumpinfop('/publicityAccount',1,'宣传费台账')" v-if="lockFlag == 'updata'">
				        <span><i class="el-icon-folder-opened"></i></span>
				        <span>创建模板</span>
				    </div>
					<div @click="jumpinfop('/publicityAccount',2,'宣传费台账')">
				        <span><i class="el-icon-folder-opened"></i></span>
				        <span>录入/更新</span>
				    </div>
					<div @click="jumpinfop('/publicityAccount',3,'宣传费台账')" v-if="lockFlag == 'updata'">
				        <span><i class="el-icon-folder-opened"></i></span>
				        <span>查看/下载</span>
				    </div>
				</div> -->
			<h2 class="font-ui" style="margin-top: 20px;">宣传物料管理</h2>
			<div class="adv-type">
				<div class="wfour" @click="jumpinfo('/materialApplication', '宣传物料申请及审批')">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>宣传物料申请及审批</span>
				</div>
				<!-- <div class="wfour" @click="jumpinfo('/materialApplicationc','市级物料申请')">
				        <span><i class="el-icon-folder-opened"></i></span>
				        <span>市级物料申请</span>
				    </div>
					<div class="wfour" @click="jumpinfo('/materialApplicationExa','物料申请审核')">
					    <span><i class="el-icon-folder-opened"></i></span>
					    <span>省级物料审批</span>
					</div>
					<div class="wfour" @click="jumpinfo('/materialApplicationExac','物料申请审核')">
					    <span><i class="el-icon-folder-opened"></i></span>
					    <span>市级物料审批</span>
					</div> -->
			</div>
			<h2 class="font-ui" style="margin-top: 20px;">基础数据管理</h2>
			<div class="adv-type">
				<!-- <div class="wfive" @click="jumpinfo('/materielPick','一采物料类型建档')" v-if="province">
				        <span><i class="el-icon-folder-opened"></i></span>
				        <span>一采物料类型建档</span>
				    </div> -->
				<div class="wfive" @click="jumpinfo('/materiel', '二采物料类型建档')" v-if="province">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>二采物料类型建档</span>
				</div>
				<div class="wfive" @click="jumpinfo('/contractCap', '预算及合同上限')">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>预算及合同上限</span>
				</div>
				<div class="wfive" @click="jumpinfo('/supplier', '供应商管理')" v-if="province">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>供应商管理</span>
				</div>
				<div class="wfive" @click="jumpinfo('/businessHall', '物料基础信息维护')">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>物料基础信息维护</span>
				</div>
				<div class="wfive" @click="jumpinfo('/materialApplistatic', '物料统计')">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>物料统计</span>
				</div>
				<div class="wfive" @click="jumpinfo('/materialAppMessage', '宣传物料制作费用明细')">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>宣传物料制作费用明细</span>
				</div>
				<div class="wfive" @click="jumpinfo('/materialAppNum', '验收打分单')">
					<span><i class="el-icon-folder-opened"></i></span>
					<span>验收打分单</span>
				</div>

			</div>

		</div>

</fullscreen>
</template>
<script>
import mySearch from "../../../components/search.vue";
import myMessage from "../../../components/myMessage.vue"
import toolList from '../../../components/toolList'
import myUpload from '../../../components/upload'

export default {
	components: {
		mySearch,
		myMessage,
		toolList,
		myUpload
	},
	data() {

		return {
			fullscreen: false,
			lockFlag: 'see',
			province: true
		}
	},
	methods: {
		jumpinfop(p, v, n) {
			this.$router.push({
				path: p,
				query: {
					type: v
				}
			});
			this.setabList(n, p + "?type=" + v);
		},
		jumpinfo(p, n) {
			this.$router.push({
				path: p,
			});
			this.setabList(n, p);
		},
		setabList(n, p) {
			let params = {
				children: "",
				name: n,
				rountPath: p,
				target: "_self",
			};
			for (let i = 0; i < this.$store.state.tabList.length; i++) {
				if (this.$store.state.tabList[i].name === params.name) {
					this.$store.state.tabList[i] = params;
				}
			}
			let set = new Set([...this.$store.state.tabList, params]);
			set.add(params);
			this.$store.commit("setDefaultActive", params.rountPath);
			this.$store.commit("setTabList", Array.from(set));
		},
		getUser() {
			this.userInfo = JSON.parse(window.sessionStorage.userInfo);
			let Menus = JSON.parse(window.sessionStorage.childrenMenus);
			for (let i = 0; i < Menus.length; i++) {
				if (Menus[i].systemflag == 1 && Menus[i].jspUrl == '/publicityAccount') {
					this.lockFlag = 'add';//省级
				}
				if (Menus[i].systemflag == 1 && Menus[i].jspUrl == '/publicity') {
					this.lockFlag = 'updata';//管理员
					i = Menus.length;
				}
			}
			for (let i = 0; i < Menus.length; i++) {
				if (Menus[i].systemflag == 1 && Menus[i].jspUrl == '/province') {
					this.province = true;//省公司
				}
			}
		}
	},
	mounted() {
		this.getUser();
	},
	created() {

	}
}
</script>
<style scoped lang="scss">
.container-box {
	height: calc(100vh - 200px);
	overflow-y: scroll;
	padding-bottom: 20px;
}

.adv-type {
	margin-top: 20px;
	display: flex;
	// justify-content: space-between;
	flex-wrap: wrap;
	// border: 1px solid #ddd;
	border-radius: 5px;
	padding: 20px;
	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);

	div {
		width: 33%;
		text-align: center;
		height: 80px;
		overflow: hidden;
		min-width: 100px;
		cursor: pointer;
		padding-top: 10px;
		margin: 10px 0;
	}

	div:hover {
		background: #CFE8FC;
		border-radius: 5px;
	}

	span {
		width: 100%;
		display: inline-block;
		height: 40px;

		// line-height: 40px;
		i {
			color: #0074D9;
			font-size: 36px;
		}
	}

	.wfour {
		width: 25%;
	}

	.wfive {
		width: 20%;
	}
}</style>
