Merge branch 'gray_branch' into 'master'
Gray branch See merge request faw-report-library/faw-report-library-web!7
This commit is contained in:
+42
-30
@@ -6,11 +6,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { loading } from './utils/request'
|
import { loading } from './utils/request'
|
||||||
|
import { basMessage } from '@/utils/Enum/enum'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ReportManager',
|
name: 'ReportManager',
|
||||||
data () {
|
data () {
|
||||||
return {}
|
return {
|
||||||
|
basMessage,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getQueryVariable (r, variable) {
|
getQueryVariable (r, variable) {
|
||||||
@@ -30,6 +33,27 @@ export default {
|
|||||||
closeLoading () {
|
closeLoading () {
|
||||||
loading.close()
|
loading.close()
|
||||||
this.$store.commit('saveIsLoading', false)
|
this.$store.commit('saveIsLoading', false)
|
||||||
|
},
|
||||||
|
// 判断是否要把页面置灰
|
||||||
|
getGray () {
|
||||||
|
let that = this
|
||||||
|
this.$api.setting.getOneSetting(that.basMessage['gray'].value).then(res=>{
|
||||||
|
if (res.ok) {
|
||||||
|
let obj=res.data;
|
||||||
|
if(!obj || !obj.configValue){
|
||||||
|
obj = {
|
||||||
|
configValue : '0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (obj.configValue === '1') {
|
||||||
|
document.querySelector('body').classList.add('setGray')
|
||||||
|
} else {
|
||||||
|
document.querySelector('body').classList.remove('setGray')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.respMsg)
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -41,35 +65,14 @@ export default {
|
|||||||
action: 'aplus.setMetaInfo',
|
action: 'aplus.setMetaInfo',
|
||||||
arguments: ['Info ', true]
|
arguments: ['Info ', true]
|
||||||
});
|
});
|
||||||
const _that = this
|
},
|
||||||
// var path = window.location.search
|
mounted() {
|
||||||
// var ticket = this.getQueryVariable(path, 'ticket')
|
debugger
|
||||||
// var loginType = this.getQueryVariable(path, 'loginType')
|
this.$bus.$on('getGray', () => {
|
||||||
// if (loginType == 1) {
|
this.getGray()
|
||||||
// window.open('http://10.12.1.78:9090/cas/login?service=http://192.168.144.22:9966/home', '_self');
|
})
|
||||||
// } else {
|
// @msg: 刷新后重定向
|
||||||
// // if (ticket) {
|
this.getGray();
|
||||||
// // var params = {
|
|
||||||
// // service: 'http://localhost:8080/home',
|
|
||||||
// // ticket: ticket
|
|
||||||
// // }
|
|
||||||
// // this.$api.login.loginByTicket(params).then(res => {
|
|
||||||
// // if (res.respCode !== '0') {
|
|
||||||
// // // this.verifyCode();
|
|
||||||
// // return this.$message.error(res.data.message);
|
|
||||||
// // }
|
|
||||||
// // this.$message.success('登录成功');
|
|
||||||
// // _that.$store.commit('saveUserInfo', res.data);
|
|
||||||
// // _that.$router.push('/home');
|
|
||||||
// // }).catch(_ => {
|
|
||||||
// // // this.verifyCode();
|
|
||||||
// // this.$router.push('/');
|
|
||||||
// // })
|
|
||||||
// //
|
|
||||||
// // } else {
|
|
||||||
// // this.$router.push('/');
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -544,4 +547,13 @@ export default {
|
|||||||
.ql-font-sans-serif {
|
.ql-font-sans-serif {
|
||||||
font-family: "sans-serif";
|
font-family: "sans-serif";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.setGray{
|
||||||
|
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);
|
||||||
|
-webkit-filter: grayscale(100%);
|
||||||
|
-moz-filter: grayscale(100%);
|
||||||
|
-ms-filter: grayscale(100%);
|
||||||
|
-o-filter: grayscale(100%);
|
||||||
|
filter: grayscale(100%);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ export const PERMISSION = [
|
|||||||
// {name:"水印前缀" ,value: "WATERMARK_PREFIX"}
|
// {name:"水印前缀" ,value: "WATERMARK_PREFIX"}
|
||||||
// ])
|
// ])
|
||||||
export const basMessage = new Esenum({
|
export const basMessage = new Esenum({
|
||||||
mark: {name: "水印前缀", value: "WATERMARK_PREFIX",index:0}
|
mark: {name: "水印前缀", value: "WATERMARK_PREFIX",index:0},
|
||||||
|
gray: {name: "黑白模式", value: "SET_GRAY",index:1}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,23 @@
|
|||||||
<el-button type="primary" @click="save('mark',0)">保存</el-button>
|
<el-button type="primary" @click="save('mark',0)">保存</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row class="inputForm" >
|
||||||
|
<el-col :span="6">
|
||||||
|
<div class="tag-item">
|
||||||
|
<label class="tag-title">黑白模式:</label>
|
||||||
|
<el-switch
|
||||||
|
v-model="formData.grayValue"
|
||||||
|
active-value="1"
|
||||||
|
inactive-value="0"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949">
|
||||||
|
</el-switch>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2" align="right" class="tag-btns">
|
||||||
|
<el-button type="primary" @click="save('gray',1)">保存</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -23,10 +40,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
basMessage,
|
basMessage,
|
||||||
formData:{
|
formData:{
|
||||||
markValue:''
|
markValue:'',
|
||||||
|
grayValue:''
|
||||||
},
|
},
|
||||||
row0:{}
|
row0:{},
|
||||||
|
row1:{}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -38,10 +56,14 @@ export default {
|
|||||||
this.$api.setting.getAllSetting().then(res=>{
|
this.$api.setting.getAllSetting().then(res=>{
|
||||||
if(res.data.length>0){
|
if(res.data.length>0){
|
||||||
res.data.forEach( item=>{
|
res.data.forEach( item=>{
|
||||||
switch (item.configKey){
|
if (item.configKey == this.basMessage['mark'].value){
|
||||||
case this.basMessage['mark'].value :
|
this.formData.markValue=item.configValue
|
||||||
this.formData.markValue=item.configValue
|
this['row'+this.basMessage['mark'].index] = item
|
||||||
this['row'+this.basMessage['mark'].index] = item
|
}
|
||||||
|
|
||||||
|
if (item.configKey == this.basMessage['gray'].value){
|
||||||
|
this.formData.grayValue=item.configValue
|
||||||
|
this['row'+this.basMessage['gray'].index] = item
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@@ -57,6 +79,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$api.setting.saveMarket(param).then(res=>{
|
this.$api.setting.saveMarket(param).then(res=>{
|
||||||
this.$message.success(res.data)
|
this.$message.success(res.data)
|
||||||
|
this.$bus.$emit('getGray')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user