//组件
var pscomponent = {
template:`
参数单位
压力
MPa
psi
温度
℃
℉
日期显示
日期格式
YYYY-MM-DD
MM-DD-YYYY
DD/MM/YYYY
月份英文简写
度盘样式
样式1
样式2
保存配置
`,
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);
});
},
}
}