Commit c64a8fcf by 张超军

Merge branch 'dev_zwpt' of http://47.92.108.28/changchao/founder_vue into dev_zwpt

parents e28aded9 75d0adb9
......@@ -82,7 +82,13 @@ const LOGOS = {_LOGO1, _LOGO2, _LOGO3}
export default {
json(val) {
if (!this.isOpenLog()) return
console.log(formatJson(val))
console.log(TOP_LEFT_CORNER + DOUBLE_DIVIDER)
console.info(formatJson(val))
console.log(BOTTOM_LEFT_CORNER + DOUBLE_DIVIDER)
},
logo() {
Math.random() * 3
},
isOpenLog() {
......@@ -92,11 +98,18 @@ export default {
}
const TOP_LEFT_CORNER = '┌'
const BOTTOM_LEFT_CORNER = '└'
const MIDDLE_CORNER = '├'
const HORIZONTAL_LINE = '│'
const DOUBLE_DIVIDER = '────────────────────────────────────────────────────────'
const SINGLE_DIVIDER = '┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄'
var formatJson = function (json, options) {
var reg = null,
formatted = json,
pad = 0,
PADDING = ' '
PADDING = ' '
options = options || {}
options.newlineAfterColonIfBeforeBraceOrBracket = (options.newlineAfterColonIfBeforeBraceOrBracket === true) ? true : false
options.spaceAfterColon = (options.spaceAfterColon === false) ? false : true
......@@ -106,7 +119,6 @@ var formatJson = function (json, options) {
json = JSON.parse(json)
json = JSON.stringify(json)
}
console.log('json', json)
reg = /([\{\}])/g
json = json.replace(reg, '\r\n$1\r\n')
reg = /([\[\]])/g
......@@ -130,7 +142,7 @@ var formatJson = function (json, options) {
(json.split('\r\n')).forEach(function (node, index) {
var i = 0,
indent = 0,
padding = ''
padding = HORIZONTAL_LINE
if (node.match(/\{$/) || node.match(/\[$/)) {
indent = 1
......@@ -141,7 +153,6 @@ var formatJson = function (json, options) {
} else {
indent = 0
}
for (i = 0; i < pad; i++) {
padding += PADDING
}
......
......@@ -17,17 +17,17 @@ export default {
localStorage.setItem(_USER_INFO_KEY, JSON.stringify(userInfo))
},
isStRole() {// 是否省厅角色
let userInfo = this.getUser()
// console.log('用户信息:', userInfo)
let username = userInfo.username
// console.log('用户名称:', username)
if (username === '123123') {// 省级 123123,市级 321321
return true
} else {
return false
}
},
// isStRole() {// 是否省厅角色
// let userInfo = this.getUser()
// // console.log('用户信息:', userInfo)
// let username = userInfo.username
// // console.log('用户名称:', username)
// if (username === '123123') {// 省级 123123,市级 321321
// return true
// } else {
// return false
// }
// },
}
......
......@@ -47,15 +47,15 @@ export default {
let parseStr = function (keyArrs, content) {
if (!keyArrs) {
PrintLog('解析关键字', '解析关键字为空', _TAG)
if (isOpenLogger()) PrintLog('解析关键字', '解析关键字为空', _TAG)
return []
}
if (!content || content === '' || content === 'null') {
PrintLog('解析内容', '解析内容为空', _TAG)
if (isOpenLogger()) PrintLog('解析内容', '解析内容为空', _TAG)
return []
}
PrintLog('解析关键字', keyArrs, _TAG)
PrintLog('解析内容', content, _TAG)
if (isOpenLogger()) PrintLog('解析关键字', keyArrs, _TAG)
if (isOpenLogger()) PrintLog('解析内容', content, _TAG)
let arrs = []
let temp = content
......@@ -79,6 +79,10 @@ let parseStr = function (keyArrs, content) {
if (arrs.length === 0) {
arrs.push(content)
}
PrintLog('解析结果', arrs, _TAG)
if (isOpenLogger()) PrintLog('解析结果', arrs, _TAG)
return arrs
}
let isOpenLogger = function () {
return false
}
......@@ -221,7 +221,7 @@ export default {
routeChangeType: 'change',
// 人像信息
rxInfoEnlarge: {},
isStRole: false,
// isStRole: false,
}
},
mounted() {
......@@ -256,7 +256,7 @@ export default {
self.rxInfoEnlarge = rxInfoEnlarge
})
this.isStRole = user.isStRole()
// this.isStRole = user.isStRole()
},
updated() {
this.menuActive = this.$route.name
......
......@@ -49,6 +49,10 @@ export default {
props: {
params: {
type: Object
},
isSt: {
type: Boolean,
default: true,
}
},
data() {
......@@ -79,6 +83,7 @@ export default {
SHYX: {value: '05', name: '审核有效'},
YSB: {value: '06', name: '已上报'},
},
parentRuleForm: [],
}
},
created() {
......@@ -89,6 +94,10 @@ export default {
_that.init()
},
methods: {
updateParentRuleForm(val) {
let _that = this
_that.parentRuleForm = val
},
getShState() {
let _that = this
if (_that.isStRole && _that.shInfo.shzt === '0') {
......@@ -113,12 +122,12 @@ export default {
}
}
},
getUserName() { // 省级 123123,市级 321321
getLevel() { // 市级 0 省级 1 字段名:level
let _that = this
if (_that.isStRole) {
return '123123'
return 1
} else {
return '321321'
return 0
}
},
getSbName() {
......@@ -136,7 +145,8 @@ export default {
},
init() {
var _that = this
_that.isStRole = user.isStRole()
_that.isStRole = _that.isSt
console.log('bzxxsfOpt-isSt', _that.isSt)
_that.initShItem()
},
/**
......@@ -225,10 +235,15 @@ export default {
_path = 'fhxxLL/' + _that.shInfo.id
break
}
console.log('ruleForm @@@@@@@@@@@@@@@@@@@@@@@', _that.parentRuleForm)
if (_path) {
let query = {
isFromSh: 'true',
level: _that.isStRole ? 1 : 0, // 市级 0 省级 1 字段名:level
isSh: isSh,
formData: JSON.stringify(_that.parentRuleForm),
shxx: JSON.stringify(_that.shInfo)
}
let routeUrl = _that.$router.resolve({
......@@ -339,10 +354,7 @@ export default {
ruleForm.fhzt = fhzt
ruleForm.shzt = shzt
ruleForm.des = desc
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
ruleForm.username = username
ruleForm.level = _that.getLevel()
PrintLog(TITLE + '请求参数', ruleForm)
......@@ -368,10 +380,7 @@ export default {
ruleForm.id = _that.shInfo.id
ruleForm.status = zgzt
ruleForm.des = desc
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
ruleForm.username = username
// ruleForm.username = _that.getUserName()
ruleForm.level = _that.getLevel()
PrintLog(TITLE + '请求参数', ruleForm)
// PrintLog(TITLE + '接口', 'updateJrzg')
......@@ -398,10 +407,7 @@ export default {
ruleForm.querytype = _that.shInfo.querytype
ruleForm.ids = ids
ruleForm.status = '3'
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
ruleForm.username = username
// ruleForm.username = _that.getUserName()
ruleForm.level = _that.getLevel()
PrintLog(TITLE + '请求参数', ruleForm, _that.TAG)
// PrintLog(TITLE + '接口', '/api/hit/insertBeach', _that.TAG)
......
......@@ -110,13 +110,13 @@
v-clipboard:error="onFztmError"
v-if="isSt? roleArr.includes('G-3-1') : roleArr.includes('G-2-1')"
>
复制条码
</div>
<!-- <div class="fztm btn" v-clipboard:copy="fztm_ytmh" @click="">-->
<!-- 删除-->
<!-- </div>-->
<!-- <div class="fztm btn" v-clipboard:copy="fztm_ytmh" @click="">-->
<!-- 删除-->
<!-- </div>-->
<div class="fztm btn" @click="onSbxxListener">
{{ sbBtnName }}
......@@ -281,7 +281,8 @@
<el-table-column prop="prop" label="操作" :width="czWidth" fixed="right" style="background: white">
<template slot-scope="scope">
<bzxxsf-opt :ref="getShxxOpt(scope.row.id)" :params="scope.row" @refresh="bzxxsfOptRefresh"
<bzxxsf-opt :ref="getShxxOpt(scope.row.id)" :params="scope.row" :is-st="isStRole"
@refresh="bzxxsfOptRefresh"
@commitaction="openActionDes"
></bzxxsf-opt>
</template>
......@@ -429,7 +430,7 @@ export default {
},
created() {
let _that = this
_that.isStRole = user.isStRole()
_that.isStRole = _that.isSt
if (_that.isStRole) {
_that.sbBtnName = '上报公安部'
} else {
......@@ -439,8 +440,7 @@ export default {
// _that.initTestData()
_that.getData()
console.log('isSt', _that.isSt)
console.log('bzxxsH-isSt', _that.isSt)
},
computed: {
roleArr() {
......@@ -522,12 +522,12 @@ export default {
}
}
},
getUserName() { // 省级 123123,市级 321321
getLevel() { // 市级 0 省级 1 字段名:level
let _that = this
if (_that.isStRole) {
return '123123'
return 1
} else {
return '321321'
return 0
}
},
getShBtns() {
......@@ -693,10 +693,7 @@ export default {
_that.ruleForm.querytype = 2
}
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
_that.ruleForm.username = username
// _that.ruleForm.username = _that.getUserName()
_that.ruleForm.level = _that.getLevel()
PrintLog('查询审核列表' + '请求参数', JSON.stringify(_that.ruleForm), _that.TAG)
PrintLog('查询审核列表' + '接口', '/api/hit/queryAllSh', _that.TAG)
......@@ -705,7 +702,7 @@ export default {
.then(res => {
PrintLog('查询审核列表' + '返回结果', res, _that.TAG)
if (res.data.code === 0) {
logger.test(res.data.ret.rows)
logger.json(res.data)
_that.tableDate = res.data.ret.rows
_that.total = res.data.ret.total
_that.totalPage = Math.ceil(_that.total / _that.pageSize)
......@@ -769,10 +766,10 @@ export default {
ruleForm.querytype = _that.ruleForm.querytype
ruleForm.ids = ids
ruleForm.status = '3'
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
ruleForm.username = username
// ruleForm.username = _that.getUserName()
// let userInfo = JSON.parse(localStorage.getItem('userInfo'))
// let username = userInfo.username
// ruleForm.username = username
ruleForm.level = _that.getLevel()
PrintLog(TITLE + '请求参数', ruleForm, _that.TAG)
PrintLog(TITLE + '接口', '/api/hit/insertBeach', _that.TAG)
......@@ -817,6 +814,19 @@ export default {
PrintLog('fztm_ytmh', _that.fztm_ytmh)
}
},
watch: {
ruleForm() {
let _that = this
if (this.tableDate && _that.tableDate.length > 0) {
_that.tableDate.forEach(item => {
var shxxOpt = _that.getShxxOpt(item.id)
if (_that.$refs[shxxOpt]) {
_that.$refs[shxxOpt].updateParentRuleForm(_that.ruleForm)
}
})
}
}
},
}
const initRuleFrom = {
......
......@@ -261,6 +261,7 @@ export default {
bzbz: '',
},
isFromSh: false,
curLevel: -1,
isSh: false,
shxx: '',
// 比中人姓名
......@@ -297,6 +298,10 @@ export default {
if (this.$route.query.isSh) {
this.isSh = this.$route.query.isSh
}
if (this.$route.query.level) {
this.curLevel = this.$route.query.level
}
if (this.$route.query.shxx) {
this.shxx = JSON.parse(this.$route.query.shxx)
}
......@@ -550,11 +555,7 @@ export default {
ruleForm.fhzt = fhzt
ruleForm.shzt = shzt
ruleForm.des = _that.fhyj
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
ruleForm.username = username
ruleForm.level = _that.curLevel
PrintLog(TITLE + '请求参数', ruleForm)
// PrintLog(TITLE + '接口', 'udateShzt')
......@@ -562,7 +563,14 @@ export default {
bzxxSh(_that, ruleForm).then(res => {
PrintLog(TITLE + '返回结果', res, _that.TAG)
if (res.data.code === 0) {
_that.$router.go(-1)//返回上一层
// _that.$router.go(-1)//返回上一层
let _path = _that.curLevel === '0' ? '/dsBzxxsh' : '/stBzxxsh' // 市级 0 省级 1 字段名:level
_that.$router.replace({
path: _path,
query: {
formData: _that.formData
}
})
}
}).catch(err => {
PrintLog(TITLE + '异常', err, _that.TAG)
......
......@@ -271,6 +271,7 @@ export default {
bzbz: ''
},
isFromSh: false,
curLevel: -1,
isSh: false,
shxx: '',
// 比中人姓名
......@@ -307,6 +308,9 @@ export default {
if (this.$route.query.isSh) {
this.isSh = this.$route.query.isSh
}
if (this.$route.query.level) {
this.curLevel = this.$route.query.level
}
if (this.$route.query.shxx) {
this.shxx = JSON.parse(this.$route.query.shxx)
}
......@@ -603,11 +607,7 @@ export default {
ruleForm.fhzt = fhzt
ruleForm.shzt = shzt
ruleForm.des = _that.fhyj
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
ruleForm.username = username
ruleForm.level = _that.curLevel
PrintLog(TITLE + '请求参数', ruleForm)
// PrintLog(TITLE + '接口', 'udateShzt')
......@@ -615,7 +615,13 @@ export default {
bzxxSh(_that, ruleForm).then(res => {
PrintLog(TITLE + '返回结果', res, _that.TAG)
if (res.data.code === 0) {
_that.$router.go(-1)//返回上一层
let _path = _that.curLevel === '0' ? '/dsBzxxsh' : '/stBzxxsh' // 市级 0 省级 1 字段名:level
_that.$router.replace({
path: _path,
query: {
formData: _that.formData
}
})
}
}).catch(err => {
PrintLog(TITLE + '异常', err, _that.TAG)
......
......@@ -883,6 +883,7 @@ export default {
nysj: '',
},
isFromSh: false,
curLevel: -1,
isSh: false,
shxx: '',
// 比中人姓名
......@@ -925,6 +926,9 @@ export default {
if (this.$route.query.isSh) {
this.isSh = this.$route.query.isSh
}
if (this.$route.query.level) {
this.curLevel = this.$route.query.level
}
if (this.$route.query.shxx) {
this.shxx = JSON.parse(this.$route.query.shxx)
}
......@@ -1201,11 +1205,7 @@ export default {
ruleForm.fhzt = fhzt
ruleForm.shzt = shzt
ruleForm.des = _that.fhyj
let userInfo = JSON.parse(localStorage.getItem('userInfo'))
let username = userInfo.username
ruleForm.username = username
ruleForm.level = _that.curLevel
PrintLog(TITLE + '请求参数', ruleForm)
// PrintLog(TITLE + '接口', 'udateShzt')
......@@ -1213,7 +1213,13 @@ export default {
bzxxSh(_that, ruleForm).then(res => {
PrintLog(TITLE + '返回结果', res, _that.TAG)
if (res.data.code === 0) {
_that.$router.go(-1)//返回上一层
let _path = _that.curLevel === '0' ? '/dsBzxxsh' : '/stBzxxsh' // 市级 0 省级 1 字段名:level
_that.$router.replace({
path: _path,
query: {
formData: _that.formData
}
})
}
}).catch(err => {
PrintLog(TITLE + '异常', err, _that.TAG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment