//组件
	var pscomponent = {
		template:`
		<div>
			<div :style="{ height: tHeight + 'px' }">
				<el-tag style="font-size: 16px;">参数单位</el-tag>
				
				<template>
					<div class="text item" style="margin-top: 20px;margin-left: 40px;color: rgb(255,255,0);">
						<span style="margin-right: 20px;color: rgb(255,255,0);">压力</span>
						<el-radio v-model="radio1" label="1" style="color: rgb(255,255,0);">MPa</el-radio>
						<el-radio v-model="radio1" label="2" style="color: rgb(255,255,0);" >psi</el-radio>
					</div>
				</template>
				
				<template>
					<div class="text item" style="margin-top: 20px;margin-left: 40px;color: rgb(255,255,0);">
						<span style="margin-right: 20px;color: rgb(255,255,0);">温度</span>
						<el-radio v-model="radio2" label="1" style="color: rgb(255,255,0);" >℃</el-radio>
						<el-radio v-model="radio2" label="2" style="color: rgb(255,255,0);" >℉</el-radio>
					</div>
				</template>
				
				<el-tag style="font-size: 16px;margin-top: 20px;">日期显示</el-tag>
				
				<template>
					<div class="text item" style="margin-top: 20px;margin-left: 40px;color: rgb(255,255,0);">
						<span style="margin-right: 20px;color: rgb(255,255,0);">日期格式</span>
						<el-radio v-model="radio3" label="1" style="color: rgb(255,255,0);" >YYYY-MM-DD</el-radio>
						<el-radio v-model="radio3" label="2" style="color: rgb(255,255,0);">MM-DD-YYYY</el-radio>
						<el-radio v-model="radio3" label="3" style="color: rgb(255,255,0);">DD/MM/YYYY</el-radio>
						<el-checkbox v-model="radio4" style="color: rgb(255,255,0);">月份英文简写</el-checkbox>
					</div>
				</template>
				
				<el-tag style="font-size: 16px;margin-top: 20px;">度盘样式</el-tag>
				
				<template>
					<div class="text item" style="margin-top: 20px;margin-left: 40px;color: rgb(255,255,0);">
						<el-radio v-model="radio5" label="1" style="color: rgb(255,255,0);">样式1</el-radio>
						<el-radio v-model="radio5" label="2" style="color: rgb(255,255,0);">样式2</el-radio>
					</div>
				</template>
				
				 <el-button type="primary" round style="margin-top: 20px;margin-left: 40px;" @click="page_setting">保存配置</el-button>
			</div>
			  
		</div>
		`,
	data(){
		// 获取当前屏幕的分辨率
		let screenW = window.screen.width;
		let screenH = window.screen.height;
		console.log("screen width:",screenW);
		console.log("screen height:",screenH);
	  return {
		tHeight:screenH*0.8,
		
		radio1:'1',
		radio2:'1',
		radio3:'1',
		radio4:false,
		radio5:'1',
	  }
	},
	mounted() {
		this.get_page_setting();
	},
	  methods: {
		page_setting(){
			var _this = this;
			axios.post('/deescloud/page_setting', {
				opuser:localStorage.getItem("online_user"),
				opuser_uuid:localStorage.getItem("uuid"),
				r1:this.$data.radio1,
				r2:this.$data.radio2,
				r3:this.$data.radio3,
				r4:this.$data.radio4,
				r5:this.$data.radio5,
			  })
			  .then(function (response) {
			    _this.$message({
			    	message: "设置成功",
			    	type: "success",
			    	duration: 1500
			    });
				
				_this.get_page_setting();
			  })
			  .catch(function (error) {
			    console.log(error);
			  });
		},
		get_page_setting(){
			var _this = this;
			axios.post('/deescloud/get_page_setting', {
				opuser:localStorage.getItem("online_user"),
				opuser_uuid:localStorage.getItem("uuid"),
			  })
			  .then(function (response) {
			    _this.$data.radio1 = response.data.r1;
				_this.$data.radio2 = response.data.r2;
				_this.$data.radio3 = response.data.r3;
				_this.$data.radio4 = response.data.r4;
				_this.$data.radio5 = response.data.r5;
			  })
			  .catch(function (error) {
			    console.log(error);
			  });
		},
		
	  }
	}
			