From eeef5d4039d2b3fee6854ddc2789aa23232b2cfb Mon Sep 17 00:00:00 2001 From: zmc <zmc_li@foxmail.com> Date: 星期三, 27 九月 2023 17:24:10 +0800 Subject: [PATCH] 登陆页换了背景,加了风险排名 --- src/views/setting/SetConfiguration.vue | 207 ++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 154 insertions(+), 53 deletions(-) diff --git a/src/views/setting/SetConfiguration.vue b/src/views/setting/SetConfiguration.vue index e19ee72..62ca902 100644 --- a/src/views/setting/SetConfiguration.vue +++ b/src/views/setting/SetConfiguration.vue @@ -1,75 +1,176 @@ <script> -import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue'; +import TimeSelectWithShortCuts from '@/sfc/TimeSelectWithShortCuts.vue' import settingApi from '@/api/data_access_setting/settingApi.js' -import dayjs from 'dayjs'; - export default { - components: { - TimeSelectWithShortCuts, +import dayjs from 'dayjs' +import { ElMessage } from 'element-plus' +// import exceptionApi from '@/api/exceptionApi.js' +export default { + components: { + TimeSelectWithShortCuts }, - data() { - return{ + data() { + return { // 鍖哄煙 - radio:0, - // 瀹氭椂 - radio1:'', - beginTime:'', - endTime:'', - } - }, - mounted() { + radio: 0, + // 瀹氭椂 + radio1: '', + beginTime: '', + endTime: '', + // a :[], + // exception: { + // // 鏂數鎴栨柇缃� + // exception0: [], + // // 鏁版嵁瓒呬綆 + // exception1: [], + // // 瓒呮爣 + // exception2: [], + // // 鏁版嵁闀挎椂娈垫棤娉㈠姩 + // exception3: [], + // // 閲忕骇绐佸彉寮傚父 + // exception4: [], + // } + } + }, + mounted() { + // this.get() + // this.getAll() + console.log('鏃堕棿',new Date().getMilliseconds()); + }, + methods: { + giveTime(val) { + //灏嗕腑鍥芥爣鍑嗘椂闂磋浆涓烘寚瀹氭牸寮�(璇ョ粍浠惰繑鍥炵殑鏍囧噯鏃堕棿鐨勬牸寮忥紝鎵�浠ュ繀椤荤殑鍔犺繖涓嚱鏁�) + this.beginTime = dayjs(val[0]).format('YYYY-MM-DD HH:mm:ss') + this.endTime = dayjs(val[1]).format('YYYY-MM-DD HH:mm:ss') }, - methods: { - giveTime(val) { - //灏嗕腑鍥芥爣鍑嗘椂闂磋浆涓烘寚瀹氭牸寮�(璇ョ粍浠惰繑鍥炵殑鏍囧噯鏃堕棿鐨勬牸寮忥紝鎵�浠ュ繀椤荤殑鍔犺繖涓嚱鏁�) - this.beginTime = dayjs(val[0]).format('YYYY-MM-DD HH:mm:ss'); - this.endTime = dayjs(val[1]).format('YYYY-MM-DD HH:mm:ss'); - }, - set(){ - const params = {} - params.user = 'admin' - params.beginTime = this.beginTime - params.endTime = this.endTime - params.region = '閲戝北' - params.isRegularTime = this.radio1 - settingApi.submitSetting(params).then(res => { - if(res.data.code == 1){ - ElMessage.success('璁剧疆鎴愬姛') - }else{ - ElMessage('璁剧疆澶辫触') - } - }) - } - } + set() { + const params = {} + params.user = 'admin' + params.beginTime = this.beginTime + params.endTime = this.endTime + params.region = '閲戝北' + params.isRegularTime = this.radio1 + settingApi.submitSetting(params).then((res) => { + if (res.data.code == 1) { + ElMessage.success('璁剧疆鎴愬姛') + } else { + ElMessage('璁剧疆澶辫触') + } + }) + }, + // get(){ + + // exceptionApi.analysisdata('閲戝北鍖洪噾灞辨柊鍩嶫SC1-0401鍗曞厓1-11-01鍦板潡椤圭洰09','2023-07-01 00:00:00','2023-07-03 00:00:00').then((res)=>{ + // this.a = res.data.data + // // console.log('鏁版嵁涓猴細',res.data.data); + // return res.data.data + // }).then(result =>{ + // console.log('閾撅細',result); + // exceptionApi.analysisdata('涓婃捣鍥芥灄寤烘潗鏈夐檺鍏徃','2023-07-01 00:00:00','2023-07-03 00:00:00') + // } + // ) + // }, + + // async getAll(){ + // const a = await this.$http + // .get('/dust/sitenamecode', { + // params: { + // exceptionType: '0', + // beginTime: this.beginTime, + // endTime: this.endTime + // } + // }).then((result) => { + // this.exception.exception0 = result.data.data + // }) + + // const b = await this.$http + // .get('/dust/sitenamecode', { + // params: { + // exceptionType: '1', + // beginTime: this.beginTime, + // endTime: this.endTime + // } + // }).then((result) => { + // this.exception.exception1 = result.data.data + // }) + + + // const c = await this.$http + // .get('/dust/sitenamecode', { + // params: { + // exceptionType: '2', + // beginTime: this.beginTime, + // endTime: this.endTime + // } + // }).then((result) => { + // this.exception.exception2 = result.data.data + // }) + // const d = await this.$http + // .get('/dust/sitenamecode', { + // params: { + // exceptionType: '3', + // beginTime: this.beginTime, + // endTime: this.endTime + // } + // }).then((result) => { + // this.exception.exception3 = result.data.data + // }) + + // console.log('澶�1锛�',this.exception.exception0); + // console.log('澶�2锛�',this.exception.exception1); + // console.log('澶�3锛�',this.exception.exception2); + // console.log('澶�4锛�',this.exception.exception3); + // // Promise.all([a,b,c,d,e,f,g,h]).then((responses)=>{ + // // console.log('鍏ㄩ儴鏁版嵁涓猴細'); + // // for (const response of responses) { + // // console.log('鏁版嵁锛�',response.data.data); + + // // } + // // }) + // } + } } </script> <template> - <div>鐢熸垚閰嶇疆鏂囦欢</div> + <el-card> <el-form> - <el-form-item label="鍖哄煙"> + <div>鐢熸垚閰嶇疆鏂囦欢</div> + <el-form-item label="鍖哄煙锛�"> <el-radio-group v-model="radio"> - <el-radio :label="0">閲戝北</el-radio> - <!-- <el-radio :label="6">Option B</el-radio> - <el-radio :label="9">Option C</el-radio> --> - </el-radio-group> + <el-radio :label="0">閲戝北</el-radio> + </el-radio-group> </el-form-item> - <el-form-item label="閫夋嫨璧峰鏃堕棿"> + <el-form-item> <TimeSelectWithShortCuts @submit-time="giveTime"></TimeSelectWithShortCuts> </el-form-item> - <el-form-item label="鏄惁瀹氭椂"> - <el-radio-group v-model="radio1" > - <el-radio label="1" size="large">鏄�</el-radio> - <el-radio label="2" size="large">鍚�</el-radio> - </el-radio-group> + <el-form-item label="鏄惁瀹氭椂锛�"> + <el-radio-group v-model="radio1"> + <el-radio label="1" size="large">鏄�</el-radio> + <el-radio label="2" size="large">鍚�</el-radio> + </el-radio-group> </el-form-item> - <el-form-item> <el-button @click="set">璁剧疆</el-button></el-form-item> + <el-form-item> <el-button type="success" @click="set">璁剧疆</el-button></el-form-item> </el-form> + <correct theme="outline" size="24" fill="#333"/> + +</el-card> </template> -<style scoped> - -</style> \ No newline at end of file +<style scoped> +.el-card { + margin: 10px; +} +div { + margin-bottom: 10px; + color: #333333; +} +:deep(.el-form-item__label) { + font-weight: bold; + font-size: 16px; + color: #333333; +} +</style> -- Gitblit v1.9.3