fanzhen1226

This commit is contained in:
fanzhen123
2019-12-26 21:36:33 +08:00
parent ddfe0028d6
commit 3218f04277
19 changed files with 339 additions and 84 deletions

View File

@@ -248,7 +248,7 @@ class computedFunc {
let listArrs = JSON.parse(JSON.stringify(listArr))
let lineArrs = JSON.parse(JSON.stringify(lineArr))
console.log(listArrs, lineArrs)
console.log(this.restur, 'this.restur')
console.log(this.restur, 'this.resturkkkkk')
listArrs.push(0) // 必选第一项
if (this.restur.tableLine.length < listArrs.length) {
listArrs = this.restur.tableLine.map((item, index) => {
@@ -269,6 +269,7 @@ class computedFunc {
})
})
// this.selectData.tableLine = this.restur.tableLine
console.log(JSON.parse(JSON.stringify(this.restur.countData)), '12222')
let datart = JSON.parse(JSON.stringify(this.restur.countData))
let csd1 = datart.map((itemCol, indexCol) => {
let newArr = {}
@@ -359,6 +360,7 @@ class computedFunc {
}
// 处理非地区数据转置后的数据,返回可渲染的数据格式
comTransAreabefore () {
console.log(this.transBeforeData, 'this.transBeforeData100025')
// 表头数据处理
this.restur.tableLine.push({
labelId: 'table_line0',
@@ -389,6 +391,7 @@ class computedFunc {
}
// 处理地区数据转置后的数据,返回可渲染的数据格式
comTransAreaAfter () {
console.log(this.transBeforeData, 'this.transBeforeDataname')
// 表头数据处理
this.restur.tableLine.push({
labelId: 'table_line0',
@@ -401,11 +404,11 @@ class computedFunc {
})
})
// 将数据转置
this.comTransAllData(this.transBeforeData.transBeforeAreaData)
// 总数据处理
this.transBeforeData.timeArr.forEach((itemName, indexName) => {
console.log(itemName, 'itemName')
var tableLine = {}
this.transData[indexName].forEach((dataList, dataKey) => {
this.transBeforeData.transBeforeAreaData[indexName].forEach((dataList, dataKey) => {
// console.log(dataKey)
if (dataKey === 0) {
tableLine['table_line0'] = itemName
@@ -414,6 +417,7 @@ class computedFunc {
})
this.restur.countData.push(tableLine)
})
console.log(this.restur, 'kkk999')
return this.restur
}
// 地区数据对于维度转化的处理 时间======指标
@@ -478,6 +482,7 @@ class computedFunc {
})
this.restur.countData.push(tableLine)
})
console.log(this.restur, 'this.restur')
return this.restur
}
// 地区数据对于维度转化的处理 地区======指标

View File

@@ -50,14 +50,20 @@ export default {
console.log(res, '高级查询数据展示')
// 请求接口完成 请求成功
if (res.data.code === 200) {
alert('添加成功')
this.$alert('添加成功', '温馨提示', {
confirmButtonText: '确定'
})
// alert('添加成功')
this.$store.state.addCollectState = false
}
}).catch((fail) => {
console.log(fail)
})
} else {
alert('您添加的收藏名称不能为空!请重新填写!')
// alert('您添加的收藏名称不能为空!请重新填写!')
this.$alert('您添加的收藏名称不能为空!请重新填写!', '温馨提示', {
confirmButtonText: '确定'
})
}
}
}

View File

@@ -433,6 +433,7 @@ export default {
},
indStatic (newValue, oldValue) {
console.log(newValue, 'newValue1212')
console.log(this.transBefore, 'this.transBefore111000')
if (this.transBefore) {
this.chartsShow()
}
@@ -548,6 +549,8 @@ export default {
}
})
}
// 调接口拿到所有当前分类下的所有的指标、地区、时间
this.getInfor(val.id)
}
},
immediate: true,
@@ -643,6 +646,24 @@ export default {
}
},
methods: {
// 获取所有当前分类下的所有的指标、地区、时间
getInfor (classifyId) {
this.$axios({
method: 'GET',
url: 'data/data/classify-detail',
params: {
id: classifyId
}
}).then(res => {
console.log(res, '获取分类下的地区、指标、时间')
// 请求接口完成 请求成功
if (res.data.code === 200) {
this.$store.state.dataArealabelTime = res.data.data
}
}).catch((fail) => {
console.log(fail)
})
},
// 非地区数据转置
wrongAreaTrans () {
if (this.transState) { // 当时间在表头上的时候
@@ -675,6 +696,7 @@ export default {
this.tableLine = objDatasAfter.tableLine
this.tableData = objDatasAfter.countData
console.log(objDatasAfter, 'objDatasAfter2')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
console.log(this.transBefore, 'this.transBeforethis.transBeforethis.transBefore')
let objCompAfter = new ComputedData(this.transBefore)
@@ -682,24 +704,28 @@ export default {
this.tableLine = comTransAreabeforeLabelTime.tableLine
this.tableData = comTransAreabeforeLabelTime.countData
console.log(comTransAreabeforeLabelTime, 'comTransAreabeforeLabelTime')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeTimeLabel = objCompAfter.comTransAreabeforeTimeLabel()
this.tableLine = comTransAreabeforeTimeLabel.tableLine
this.tableData = comTransAreabeforeTimeLabel.countData
console.log(comTransAreabeforeTimeLabel, 'comTransAreabeforeTimeLabel')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeAreaLabel = objCompAfter.comTransAreabeforeAreaLabel()
this.tableLine = comTransAreabeforeAreaLabel.tableLine
this.tableData = comTransAreabeforeAreaLabel.countData
console.log(comTransAreabeforeAreaLabel, 'comTransAreabeforeAreaLabel')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeLabelArea = objCompAfter.comTransAreabeforeLabelArea()
this.tableLine = comTransAreabeforeLabelArea.tableLine
this.tableData = comTransAreabeforeLabelArea.countData
console.log(comTransAreabeforeLabelArea, 'comTransAreabeforeLabelArea')
this.objCompBefore = objCompAfter
}
} else { // 当指标名称在表头上
console.log(this.$store.state.SelecttDimension, '2020')
@@ -709,6 +735,7 @@ export default {
this.tableLine = objDatasAfterB.tableLine
this.tableData = objDatasAfterB.countData
console.log(objDatasAfterB, 'objDatasAfterB')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
this.objCompBefore = new ComputedData(this.transBefore)
var objDatasBeforeB = this.objCompBefore.comTransAreabefore()
@@ -721,24 +748,28 @@ export default {
this.tableLine = comTransAreabeforeTimeLabelB.tableLine
this.tableData = comTransAreabeforeTimeLabelB.countData
console.log(comTransAreabeforeTimeLabelB, 'comTransAreabeforeTimeLabelB')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeLabelTimeB = objCompAfter.comTransAreabeforeLabelTime()
this.tableLine = comTransAreabeforeLabelTimeB.tableLine
this.tableData = comTransAreabeforeLabelTimeB.countData
console.log(comTransAreabeforeLabelTimeB, 'comTransAreabeforeLabelTimeB')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeLabelAreaB = objCompAfter.comTransAreabeforeLabelArea()
this.tableLine = comTransAreabeforeLabelAreaB.tableLine
this.tableData = comTransAreabeforeLabelAreaB.countData
console.log(comTransAreabeforeLabelAreaB, 'comTransAreabeforeLabelAreaB')
this.objCompBefore = objCompAfter
} else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
let objCompAfter = new ComputedData(this.transBefore)
var comTransAreabeforeAreaLabelB = objCompAfter.comTransAreabeforeAreaLabel()
this.tableLine = comTransAreabeforeAreaLabelB.tableLine
this.tableData = comTransAreabeforeAreaLabelB.countData
console.log(comTransAreabeforeAreaLabelB, 'comTransAreabeforeAreaLabelB')
this.objCompBefore = objCompAfter
}
}
},
@@ -750,6 +781,7 @@ export default {
this.wrongAreaTrans()
} else { // 地区数据转置
this.areaTrans()
console.log(10000)
}
},
// 指标解释
@@ -875,6 +907,8 @@ export default {
chartsShow () {
// 改变值行值
console.log(this.$route.query.type, '1010111')
console.log(this.indStatic, 'this.indStatic')
console.log(this.objCompBefore, 'this.objCompBefore')
switch (this.indStatic) {
case 1:
if (this.pieStatic) {
@@ -883,8 +917,27 @@ export default {
// 存input行选中的值
this.lineInputVal = [0, 1, 2, 3]// 初始化选中4个
}
console.log('k11111111111')
this.objCompBefore.inputSelectData(this.listInputVal, this.lineInputVal)
this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataVerticalMapRow()) : (this.echartsDatarts = this.objCompBefore.dataVerticalMapCol())
// if (this.$route.query.type !== 'area') { // 非地区数据
// } else { // 地区数据
// if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'dq') {
// this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataVerticalMapColAreaDQSJ()) : (this.echartsDatarts = this.objCompBefore.dataVerticalMapRowAreaSJDQ())
// console.log('地区-时间')
// } else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'sj') {
// this.rowColIndex === 0 ? (this.echartsDatarts = this.objCompBefore.dataVerticalMapRowAreaSJDQ()) : (this.echartsDatarts = this.objCompBefore.dataVerticalMapColAreaDQSJ())
// console.log('时间-地区')
// } else if (this.$store.state.SelecttDimension.row === 'sj' && this.$store.state.SelecttDimension.col === 'zb') {
// console.log('指标-时间')
// } else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'sj') {
// console.log('时间-指标')
// } else if (this.$store.state.SelecttDimension.row === 'zb' && this.$store.state.SelecttDimension.col === 'dq') {
// console.log('地区-指标')
// } else if (this.$store.state.SelecttDimension.row === 'dq' && this.$store.state.SelecttDimension.col === 'zb') {
// console.log('指标-地区')
// }
// }
this.pieStatic = false
break
case 2:

View File

@@ -8,7 +8,10 @@
>
<img :src="item.url" alt />
</div>
<div class="chart_right" v-if="$store.state.SelecttDimension.row === 'sj' && $store.state.SelecttDimension.col === 'dq'">
<div
class="chart_right"
v-if="(($store.state.SelecttDimension.row === 'sj' && $store.state.SelecttDimension.col === 'dq')||($store.state.SelecttDimension.row === 'sj' && $store.state.SelecttDimension.col === 'zb'))&&!$store.state.areaDimensionState"
>
<!-- 指标地区cut -->
<!-- <div class="chart_right_area" v-if="$route.query.type!=='area'">
{{stateChangeSDF?'指标':'地区'}}
@@ -255,33 +258,32 @@ export default {
areaDimensionStateS (newVal) {
if (newVal) {
if (this.$store.state.noSelecttDimension === 'sj') {
this.optionsDimension = this.$store.state.transBefore.timeArr.map((item, index) => {
this.optionsDimension = this.$store.state.dataArealabelTime.timeArr.map((item, index) => {
return {
value: item,
label: item
}
})
this.valueDimension = [this.optionsDimension[0].value]
} else if (this.$store.state.noSelecttDimension === 'dq') {
this.optionsDimension = this.$store.state.transBefore.areaName.map((item, index) => {
this.optionsDimension = this.$store.state.dataArealabelTime.areaArr.map((item, index) => {
return {
value: item,
label: item
}
})
this.valueDimension = [this.optionsDimension[0].value]
} else if (this.$store.state.noSelecttDimension === 'zb') {
this.optionsDimension = this.$store.state.transBefore.termsName.map((item, index) => {
this.optionsDimension = this.$store.state.dataArealabelTime.quotaArr.map((item, index) => {
return {
value: item,
label: item
}
})
this.valueDimension = [this.optionsDimension[0].value]
}
this.valueDimension = this.$store.newSelectChangeData
// 告诉父组件数据渲染完
this.$emit('emmitStateAd', false)
}
console.log(this.valueDimension, 'this.valueDimension')
}
},
methods: {
@@ -341,14 +343,6 @@ export default {
console.log(res, '下拉筛选条件')
// 请求接口完成 请求成功
if (res.data.code === 200) {
// console.log(Object.keys(res.data.data.list))
// console.log(Object.values(res.data.data.list))
// this.cityDataTime = Object.keys(res.data.data.list).map((item, index) => {
// return { 'id': '110000', 'name': Object.values(res.data.data.list)[index], 'parentId': '100000', 'shortName': '北京', 'cityCode': '', indexID: item }
// })
// // 默认选中第一个
// this.cityDefaultNameTime = this.cityDataTime[0].name
// this.$store.state.selectData = this.cityDataTime[0].indexID
this.cityDataTime = Object.keys(res.data.data.list).map((item, index) => {
return { name: Object.values(res.data.data.list)[index], extendData: item }
})
@@ -426,7 +420,10 @@ export default {
case 'monthly':
if (this.timeUsrr[this.timeUsrr.length - 2] < 2 && this.timeUsrr.length < 7 && /^[0-9]+$/.test(this.timeUsrr)) {
if (this.timeUsrr[this.timeUsrr.length - 2] === 1 && this.timeUsrr[this.timeUsrr.length - 1] > 2) {
alert('您查询的时间格式有误,请重新输入!')
// alert('您查询的时间格式有误,请重新输入!')
this.$alert('您查询的时间格式有误,请重新输入!', '温馨提示', {
confirmButtonText: '确定'
})
} else {
this.$store.state.selectData = this.timeUsrr
console.log(this.$store.state.selectData, '时间')
@@ -436,7 +433,10 @@ export default {
this.childFuncChangeDown()
}
} else {
alert('您查询的时间格式有误请重新输入111')
// alert('您查询的时间格式有误请重新输入111')
this.$alert('您查询的时间格式有误,请重新输入!', '温馨提示', {
confirmButtonText: '确定'
})
}
break
case 'quarter':
@@ -447,7 +447,10 @@ export default {
this.timeUsrr = ''
this.childFuncChangeDown()
} else {
alert('您查询的时间格式有误请重新输入111')
// alert('您查询的时间格式有误请重新输入111')
this.$alert('您查询的时间格式有误,请重新输入!', '温馨提示', {
confirmButtonText: '确定'
})
}
break
case 'year':
@@ -457,15 +460,24 @@ export default {
this.timeUsrr = ''
this.childFuncChangeDown()
} else {
alert('您查询的时间格式有误请重新输入111')
// alert('您查询的时间格式有误请重新输入111')
this.$alert('您查询的时间格式有误,请重新输入!', '温馨提示', {
confirmButtonText: '确定'
})
}
break
case 'area':
this.$store.state.selectData = this.timeUsrr
this.$parent.changeBrother()
this.timeUsrr = ''
this.childFuncChangeDown()
break
}
} else {
alert('您查询的时间格式有误,请重新输入!')
// alert('您查询的时间格式有误,请重新输入!')
this.$alert('您查询的时间格式有误,请重新输入!', '温馨提示', {
confirmButtonText: '确定'
})
}
},
// 选中

View File

@@ -91,12 +91,18 @@ export default {
// 确定维度转换
trueChange () {
if (this.rowVal === this.colVal) {
alert('维度转换格式错误!行列相同')
// alert('维度转换格式错误!行列相同')
this.$alert('维度转换格式错误!行列相同', '温馨提示', {
confirmButtonText: '确定'
})
} else {
this.trueChangeArea(false)
}
},
trueChangeArea (dataState) {
this.$store.newSelectChangeData = null
console.log(dataState, 'dataState')
console.log(this.$store.state.noChangeData.areaName, 'this.$store.state.noChangeData.areaName')
/* eslint-disable*/
console.log(this.arrValue[this.colVal], 'this.$store.state.noChangeDatathis.$store.state.noChangeDatathis.$store.state.noChangeData')
console.log(this.arrValue[this.rowVal], 'this.$store.state.noChangeDatathis.$store.state.noChangeDatathis.$store.state.noChangeData')
@@ -163,16 +169,19 @@ export default {
transBefore.termsName = res.data.data.termsName
transBefore.areaName = this.$store.state.transBefore.areaName
transBefore.termsExplain = res.data.data.termsExplain
this.$store.newSelectChangeData = res.data.data.areaName
} else if ((this.arrValue[this.colVal] === 'sj' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'sj')) {
transBefore.timeArr = res.data.data.timeArr.map((item, index) => { return item.toString() })
transBefore.termsName = this.$store.state.transBefore.termsName
transBefore.areaName = res.data.data.areaName
transBefore.termsExplain = this.$store.state.transBefore.termsExplain
this.$store.newSelectChangeData = res.data.data.termsName
} else if ((this.arrValue[this.colVal] === 'zb' && this.arrValue[this.rowVal] === 'dq') || (this.arrValue[this.colVal] === 'dq' && this.arrValue[this.rowVal] === 'zb')) {
transBefore.timeArr = this.$store.state.transBefore.timeArr.map((item, index) => { return item.toString() })
transBefore.termsName = res.data.data.termsName
transBefore.areaName = res.data.data.areaName
transBefore.termsExplain = res.data.data.termsExplain
this.$store.newSelectChangeData = res.data.data.timeArr.map((item, index) => { return item.toString() })
}
transBefore.tableExplain = res.data.data.tableExplain
transBefore.transBeforeTermsData = res.data.data.transBeforeTermsData
@@ -192,6 +201,7 @@ export default {
}
// 关闭窗口
this.$store.state.dimensionState = false
this.$store.state.areaDimensionState = true
}).catch((fail) => {
console.log(fail, 2369)
})

View File

@@ -145,6 +145,7 @@ export default {
watch: {
echartsDatarts: {
handler (newVal, oldVal) {
console.log(newVal, 'newVal10000')
if (newVal !== undefined) {
this.option = JSON.parse(JSON.stringify(newVal))
this.$nextTick(() => {

View File

@@ -198,7 +198,10 @@ export default {
index === ind ? (this.fontComput += '#' + item.text + '#') : ''
})
} else {
alert('请选择指标!')
// alert('请选择指标!')
this.$alert('请选择指标!', '温馨提示', {
confirmButtonText: '确定',
})
}
},
@@ -494,7 +497,10 @@ export default {
}
} else {
alert('您输入的表达式正确,请重新输入!')
// alert('您输入的表达式正确,请重新输入!')
this.$alert('您输入的表达式正确,请重新输入!', '温馨提示', {
confirmButtonText: '确定',
})
}
}
},

View File

@@ -33,7 +33,10 @@ export default {
input.select()
document.execCommand('copy')
document.body.removeChild(input)
alert('已经复制到粘贴板!')
this.$alert('已经复制到粘贴板!', '温馨提示', {
confirmButtonText: '确定'
})
// alert('已经复制到粘贴板!')
}
}
}

View File

@@ -161,13 +161,25 @@ export default {
if (status) {
// 调接口上传,成功后关闭窗口
if (this.username === '') {
alert('用户名不能为空!')
// alert('用户名不能为空!')
this.$alert('用户名不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.userpwd === '') {
alert('密码不能为空!')
// alert('密码不能为空!')
this.$alert('密码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.useryzm === '') {
alert('验证码不能为空!')
// alert('验证码不能为空!')
this.$alert('验证码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.useryzm.toLocaleLowerCase() !== this.imgIdentify) {
alert('验证码输入不正确请重新输入!')
this.$alert('验证码输入不正确请重新输入!', '温馨提示', {
confirmButtonText: '确定'
})
// alert('验证码输入不正确请重新输入!')
} else {
// 调接口判断密码是否输入正确,改变登录状态
this.$axios({
@@ -180,7 +192,10 @@ export default {
}).then(res => {
console.log(res)
// 请求接口完成注册 请求成功
alert(res.data.message)
this.$alert(res.data.message, '温馨提示', {
confirmButtonText: '确定'
})
// alert(res.data.message)
if (res.data.code === 200) {
this.showWinStatic = !this.showWinStatic
this.$auth.auth = this.showWinStatic
@@ -269,7 +284,10 @@ export default {
}
}).then(res => {
console.log(res)
alert(res.data.message)
this.$alert(res.data.message, '温馨提示', {
confirmButtonText: '确定'
})
// alert(res.data.message)
// 请求接口完成注册 请求成功
if (res.data.code === 200) {
console.log(this.$route.path, 'this.$router.path')

View File

@@ -98,7 +98,10 @@ export default {
// 确定维度转换
trueChange () {
if (this.rowVal === this.colVal) {
alert('维度转换格式错误!行列相同')
this.$alert('维度转换格式错误!行列相同', '温馨提示', {
confirmButtonText: '确定'
})
// alert('维度转换格式错误!行列相同')
} else if (this.$store.state.SelecttDimension.col === this.arrValue[this.rowVal]) {
this.$store.state.noAreadimensionState = false
} else {

View File

@@ -246,7 +246,10 @@ export default {
state: false
})
} else {
alert('无法添加筛选条件!筛选条件不正确!')
this.$alert('无法添加筛选条件!筛选条件不正确!', '温馨提示', {
confirmButtonText: '确定'
})
// alert('无法添加筛选条件!筛选条件不正确!')
}
},
// 删除筛选条件
@@ -257,7 +260,10 @@ export default {
return item.state === false
})
} else {
alert('请选择您需要删除的筛选条件!')
// alert('请选择您需要删除的筛选条件!')
this.$alert('请选择您需要删除的筛选条件!', '温馨提示', {
confirmButtonText: '确定'
})
}
},
// 筛选左侧数据
@@ -608,7 +614,10 @@ export default {
}
}
} else {
alert('筛选条件不能为空')
// alert('筛选条件不能为空')
this.$alert('筛选条件不能为空', '温馨提示', {
confirmButtonText: '确定',
})
}
},
// 数组合并去重排序

View File

@@ -71,7 +71,10 @@ axios.interceptors.request.use(config => {
axios.interceptors.response.use(data => {
// console.log(localStorage.getItem('token'))
if (localStorage.getItem('token') && data.data.code === 403) {
alert('您没有查看此分类下数据的权限!')
Vue.prototype.$alert('您没有查看此分类下数据的权限!', '温馨提示', {
confirmButtonText: '确定'
})
// alert('您没有查看此分类下数据的权限!')
}
// let daraRes = []
// if(data.data.code===200){

View File

@@ -110,7 +110,10 @@ RouterObj.beforeEach((to, from, next) => {
if (to.name === 'personalCenter' || to.name === 'datasweb') {
console.log(localStorage.getItem('token'), 'localStorage.getItem()')
if (!localStorage.getItem('token')) {
alert('您没有该账号的登陆权限,请重新登录后再次操作!')
// alert('您没有该账号的登陆权限,请重新登录后再次操作!')
this.$alert('您没有该账号的登陆权限,请重新登录后再次操作!', '温馨提示', {
confirmButtonText: '确定'
})
// 权限通过时赋值
console.log(Vue.prototype.$auth, 'Vue.prototype.$auth')
Vue.prototype.$auth.auth = true

View File

@@ -72,7 +72,15 @@ export default new Vuex.Store({
col: 'dq'
},
// 左侧当前展开
openOpenLeft: null
openOpenLeft: null,
// 所有的地区、指标、时间
dataArealabelTime: {
timeArr: [],
areaArr: [],
quotaArr: []
},
// 维度转换当前选中
newSelectChangeData: null
},
mutations: {},
actions: {

View File

@@ -585,7 +585,10 @@ export default {
if (this.$route.query.type === 'area') {
this.cutStateSeach = 'map'
} else {
alert('地图功能对非地区数据无效!')
// alert('地图功能对非地区数据无效!')
this.$alert('地图功能对非地区数据无效!', '温馨提示', {
confirmButtonText: '确定'
})
}
this.$store.state.advancedSearchState = false
break
@@ -632,7 +635,10 @@ export default {
// 调用接口查询高级查询的数据
console.log(this.$store.state.advanceData)
if (this.$store.state.advanceData.length < 4) {
alert('筛选数据数据不能少于4条')
// alert('筛选数据数据不能少于4条')
this.$alert('筛选数据数据不能少于4条', '温馨提示', {
confirmButtonText: '确定'
})
return
}
this.$axios({
@@ -861,13 +867,19 @@ export default {
data: this.$store.state.transBefore
}]))
}
alert('默认数据已保存!')
this.$alert('默认数据已保存!', '温馨提示', {
confirmButtonText: '确定'
})
// alert('默认数据已保存!')
break
case '恢复默认':// 将分类id 和 分类数据从本地删除
if (JSON.parse(localStorage.getItem('classFiyData'))) {
let arrtsBGY = JSON.parse(localStorage.getItem('classFiyData'))
if (!arrtsBGY.find(item => item.id === this.defaultDataRight.id)) {
alert('默认数据已恢复!')
// alert('默认数据已恢复!')
this.$alert('默认数据已恢复!', '温馨提示', {
confirmButtonText: '确定'
})
} else {
arrtsBGY = arrtsBGY.filter((item, index) => {
return item.id !== this.defaultDataRight.id
@@ -875,7 +887,10 @@ export default {
localStorage.setItem('classFiyData', JSON.stringify(arrtsBGY))
}
} else {
alert('默认数据已恢复!')
// alert('默认数据已恢复!')
this.$alert('默认数据已恢复!', '温馨提示', {
confirmButtonText: '确定'
})
}
this.$router.go(0)
break
@@ -1183,11 +1198,13 @@ export default {
stateDFGHJ (val) {
this.stateDataGetVal = val
this.labelAreaState = false
// 恢复最初的选择
},
// 地区数据下拉发生变化
statertfResu (val) {
console.log(val, '1010110')
this.downLaSelectArea = val
this.indStatic = 0
},
// 重置清除空行空列状态
statertyui (val) {

View File

@@ -72,7 +72,7 @@
@keyup.enter="blurUpset(item.id,item.name)"
/>
</div>
<div :title="item.database">{{item.database}}</div>
<div :title="item.database" @click="jumpSearch(item)">{{item.database}}</div>
<div>{{item.birthTime}}</div>
<div class="handle">
<div @click="editName(index)">编辑</div>/
@@ -247,11 +247,20 @@ export default {
if (status) {
// 调接口上传,成功后关闭窗口
if (this.userpwd === '') {
alert('密码不能为空!')
// alert('密码不能为空!')
this.$alert('密码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.userpwdQR === '') {
alert('确认密码不能为空!')
// alert('确认密码不能为空!')
this.$alert('确认密码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.userpwd !== this.userpwdQR) {
alert('密码与确认密码不一致!')
// alert('密码与确认密码不一致!')
this.$alert('密码与确认密码不一致!', '温馨提示', {
confirmButtonText: '确定'
})
} else {
// 调接口判断密码是否输入正确,改变登录状态
this.$axios({
@@ -264,7 +273,10 @@ export default {
}).then(res => {
console.log(res)
// 请求接口完成 请求成功
alert(res.data.message)
this.$alert(res.data.message, '温馨提示', {
confirmButtonText: '确定'
})
// alert(res.data.message)
if (res.data.code === 200) {
this.showWinStatic = !this.showWinStatic
}
@@ -301,7 +313,10 @@ export default {
// 请求接口完成 请求成功
// alert(res.data.message)
if (res.data.code === 200) {
alert('修改成功!')
// alert('修改成功!')
this.$alert('修改成功!', '温馨提示', {
confirmButtonText: '确定'
})
console.log('文本框失去焦点')
// 调用接口修改数据
this.collect.forEach((item, index) => {
@@ -327,7 +342,10 @@ export default {
// 请求接口完成 请求成功
// alert(res.data.message)
if (res.data.code === 200) {
alert('删除成功!')
// alert('删除成功!')
this.$alert('删除成功!', '温馨提示', {
confirmButtonText: '确定'
})
this.getCollectData()
}
}).catch((fail) => {
@@ -419,6 +437,17 @@ export default {
currentChange (val) {
this.getCollectData(val)
console.log(val, '1010110')
},
// 跳转至查询页面
jumpSearch (listCount) {
console.log(listCount)
this.$route.push(
{
path: '/datasweb',
type: listCount.f,
defaultLeftId: listCount.classify_id
}
)
}
},
// 自定义指令v-*
@@ -836,11 +865,11 @@ export default {
color: #333333;
border-bottom: 0.0625rem solid #bdbdbd;
& > div:nth-child(1) {
width: 18rem;
width: 6rem;
// border: 1px solid red;
}
& > div:nth-child(n + 2) {
width: 12rem;
width: 14rem;
// border: 1px solid red;
}
& > div {
@@ -869,7 +898,7 @@ export default {
cursor: pointer;
}
& > div:nth-child(1) {
width: 18rem;
width: 6rem;
// border: 1px solid red;
overflow: hidden;
text-overflow: ellipsis;
@@ -885,7 +914,7 @@ export default {
-webkit-box-orient: vertical;
}
& > div:nth-child(n + 2) {
width: 12rem;
width: 14rem;
}
& > div {
display: flex;

View File

@@ -82,27 +82,60 @@ export default {
// 立即注册
registerD () {
if (this.registerData.username === '') {
alert('用户名称不能为空!')
// alert('用户名称不能为空!')
this.$alert('用户名称不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.userIphone === '') {
alert('电话号码不能为空!')
// alert('电话号码不能为空!')
this.$alert('电话号码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.userMail === '') {
alert('邮箱地址不能为空!')
// alert('邮箱地址不能为空!')
this.$alert('邮箱地址不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.password === '') {
alert('设置密码不能为空!')
// alert('设置密码不能为空!')
this.$alert('设置密码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.passwordQR === '') {
alert('确认密码不能为空!')
// alert('确认密码不能为空!')
this.$alert('确认密码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.organizationName === '') {
alert('机构名称不能为空!')
// alert('机构名称不能为空!')
this.$alert('机构名称不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.organizationSite === '') {
alert('机构地址不能为空!')
// alert('机构地址不能为空!')
this.$alert('机构地址不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.department === '') {
alert('所属部门不能为空!')
// alert('所属部门不能为空!')
this.$alert('所属部门不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (!(/^1(?:3\d|4[4-9]|5[0-35-9]|6[67]|7[013-8]|8\d|9\d)\d{8}$/.test(this.registerData.userIphone))) { // 验证手机号
alert('您输入的手机号码有误!')
// alert('您输入的手机号码有误!')
this.$alert('您输入的手机号码有误!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (!(/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.registerData.userMail))) { // 验证邮箱
alert('您输入的邮箱地址有误!')
// alert('您输入的邮箱地址有误!')
this.$alert('您输入的邮箱地址有误!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.registerData.password !== this.registerData.passwordQR) {
alert('您输入的设置密码与确认密码不一致!')
// alert('您输入的设置密码与确认密码不一致!')
this.$alert('您输入的设置密码与确认密码不一致!', '温馨提示', {
confirmButtonText: '确定'
})
} else {
this.$axios({
method: 'POST',
@@ -120,7 +153,10 @@ export default {
}).then(res => {
console.log(res)
// 请求接口完成注册 请求成功
alert(res.data.message)
// alert(res.data.message)
this.$alert(res.data.message, '温馨提示', {
confirmButtonText: '确定'
})
if (res.data.code === 200) {
this.$router.push({ path: '/' })
}

View File

@@ -144,19 +144,40 @@ export default {
// 留言板
upoloadMessage () {
if (this.leave.name === '') {
alert('姓名不能为空!')
// alert('姓名不能为空!')
this.$alert('姓名不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.leave.mail === '') {
alert('邮箱不能为空!')
// alert('邮箱不能为空!')
this.$alert('邮箱不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.leave.iphone === '') {
alert('电话号码不能为空!')
// alert('电话号码不能为空!')
this.$alert('电话号码不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.leave.title === '') {
alert('标题不能为空!')
// alert('标题不能为空!')
this.$alert('标题不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (this.leave.cont === '') {
alert('留言内容不能为空!')
// alert('留言内容不能为空!')
this.$alert('留言内容不能为空!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (!(/^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(this.leave.mail))) {
alert('您输入的邮箱地址不正确,请重新填写!')
// alert('您输入的邮箱地址不正确,请重新填写!')
this.$alert('您输入的邮箱地址不正确,请重新填写!', '温馨提示', {
confirmButtonText: '确定'
})
} else if (!(/^1[3456789]\d{9}$/.test(this.leave.iphone))) {
alert('您输入的电话号码不正确,请重新填写!')
// alert('您输入的电话号码不正确,请重新填写!')
this.$alert('您输入的电话号码不正确,请重新填写!', '温馨提示', {
confirmButtonText: '确定'
})
} else {
this.$axios({
method: 'POST',
@@ -172,7 +193,10 @@ export default {
console.log(res, '留言板')
// 请求接口完成 请求成功
if (res.data.code === 200) {
alert(res.data.message)
this.$alert(res.data.message, '温馨提示', {
confirmButtonText: '确定'
})
// alert(res.data.message)
this.leave.name = ''
this.leave.mail = ''
this.leave.iphone = ''

View File

@@ -53,7 +53,10 @@
></el-pagination>
</div>
</div>
<div v-if="pageConfiguration.countSize===0" style="height:20rem;width:100%;display:flex;align-items:center;justify-content:center;font-size:1.56rem;">哎呦没有搜到结果呦再试一遍吧</div>
<div
v-if="pageConfiguration.countSize===0"
style="height:20rem;width:100%;display:flex;align-items:center;justify-content:center;font-size:1.56rem;"
>哎呦没有搜到结果呦再试一遍吧</div>
</div>
</div>
</section>
@@ -212,8 +215,11 @@ export default {
this.searchData = arrts
this.pageConfiguration.countSize = parseInt(res.data.data.total)
console.log(this.pageConfiguration)
}else{
alert(res.data.message)
} else {
// alert(res.data.message)
this.$alert(res.data.message, '温馨提示', {
confirmButtonText: '确定',
})
}
}).catch((fail) => {
console.log(fail)
@@ -238,8 +244,11 @@ export default {
})
arrts.push({ 'id': '-全部-', 'name': '-全部-', 'parentId': '100000', 'shortName': '北京', 'cityCode': '' })
this.cityData = arrts
}else{
alert(res.data.message)
} else {
// alert(res.data.message)
this.$alert(res.data.message, '温馨提示', {
confirmButtonText: '确定',
})
}
}).catch((fail) => {
console.log(fail)