监管端bug修复:13342、10223、10225、12438、12688、12868
parent
b276638aa8
commit
6dbdc96268
|
@ -32,7 +32,7 @@
|
|||
style="width: 100%;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="6">
|
||||
<el-form-item label-width="10px">
|
||||
<el-button v-waves type="primary" icon="el-icon-search" @click="getQuery">
|
||||
搜索
|
||||
|
@ -40,6 +40,9 @@
|
|||
<el-button v-waves type="success" icon="el-icon-refresh" native-type="reset" @click="goKeyReset">
|
||||
重置
|
||||
</el-button>
|
||||
<el-button v-waves type="info" icon="el-icon-download" @click="exportData">
|
||||
导出数据
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -78,6 +81,9 @@
|
|||
<el-button type="primary" icon="el-icon-check" @click="batchRedemption">批量兑换</el-button>
|
||||
<el-button type="success" icon="el-icon-folder-checked" @click="redeemAll">全选兑换</el-button>
|
||||
</div>
|
||||
<div style="margin-left: auto; margin-bottom: 7px; font-size: 14px; margin-right: 5px;color: rgb(96, 98, 102)">
|
||||
<span>合计:奖励总得分: {{ totalScores }} ,已兑换分数: {{ userdScores }} ,未兑换奖励数: {{ totalScores - userdScores }}</span>
|
||||
</div>
|
||||
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList"/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -95,9 +101,12 @@ export default {
|
|||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
config: config,
|
||||
total: 0,
|
||||
varList: [],
|
||||
treeData: [],
|
||||
totalScores: 0,
|
||||
userdScores: 0,
|
||||
normalizer(node) {
|
||||
return {
|
||||
id: node.id,
|
||||
|
@ -168,6 +177,8 @@ export default {
|
|||
this.listLoading = false
|
||||
this.varList = data.varList
|
||||
this.total = data.page.totalResult
|
||||
this.totalScores = data.allAmounttoScore.totalScores
|
||||
this.userdScores = data.allAmounttoScore.userdScores
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
|
@ -243,6 +254,38 @@ export default {
|
|||
},
|
||||
goBack() {
|
||||
this.$parent.activeName = 'List'
|
||||
},
|
||||
// 导出数据
|
||||
exportData() {
|
||||
this.$confirm('确定要导出到excel吗?', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
console.log('开始')
|
||||
this.listLoading = false
|
||||
let pageData = ''
|
||||
if (this.searchForm.KEYWORDS) {
|
||||
pageData += '&KEYWORDS=' + this.searchForm.KEYWORDS
|
||||
}
|
||||
if (this.searchForm.DEPARTMENT_ID) {
|
||||
pageData += '&DEPARTMENT_ID=' + this.searchForm.DEPARTMENT_ID
|
||||
}
|
||||
if (this.searchForm.dates[0]) {
|
||||
pageData += '&START_TIME=' + this.searchForm.dates[0] + ' 00:00:00'
|
||||
}
|
||||
if (this.searchForm.dates[1]) {
|
||||
pageData += '&END_TIME=' + this.searchForm.dates[1] + ' 23:59:59'
|
||||
}
|
||||
if (this.$parent.CORPINFO_ID) {
|
||||
pageData += '&CORPINFO_ID=' + this.$parent.CORPINFO_ID
|
||||
}
|
||||
window.open(this.config.httpurl + 'evaluationscore/excelAll?' + pageData)
|
||||
}).catch(() => {
|
||||
console.log('报错')
|
||||
this.listLoading = false
|
||||
})
|
||||
this.listLoading = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
<el-col :span="8">
|
||||
<el-form-item label="辖区单位">
|
||||
<Treeselect
|
||||
v-if="updateValue"
|
||||
:multiple="true"
|
||||
:flat="true"
|
||||
:default-expand-level="0"
|
||||
|
@ -48,6 +49,8 @@
|
|||
no-options-text="暂无数据"
|
||||
no-children-text="暂无数据"
|
||||
style="width: 100%;"
|
||||
@select="handleSelect"
|
||||
@deselect="handleRemove"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
@ -443,6 +446,7 @@ export default {
|
|||
directives: { waves },
|
||||
data() {
|
||||
return {
|
||||
updateValue: true,
|
||||
selectUsers: [], // 防止报错,参数无用
|
||||
chooseUserList: [],
|
||||
punishThePerson: [],
|
||||
|
@ -1315,6 +1319,52 @@ export default {
|
|||
this.form.UNITS_PHONE = item.PHONENUM
|
||||
}
|
||||
})
|
||||
},
|
||||
// 将树节点的子节点全部添加到数组中
|
||||
pullSelectedNodes(selectedItems) {
|
||||
if (selectedItems.nodes && selectedItems.nodes.length > 0) {
|
||||
for (let i = 0; i < selectedItems.nodes.length; i++) {
|
||||
if (!this.form.JURISDICTION_UNIT.includes(selectedItems.nodes[i].id)) {
|
||||
this.form.JURISDICTION_UNIT.push(selectedItems.nodes[i].id)
|
||||
}
|
||||
this.pullSelectedNodes(selectedItems.nodes[i])
|
||||
}
|
||||
}
|
||||
},
|
||||
// 选择项时触发的事件
|
||||
handleSelect(selectedItems) {
|
||||
// 选择父节点时同时勾选全部子节点
|
||||
if (!this.form.JURISDICTION_UNIT.includes(selectedItems.id)) {
|
||||
this.form.JURISDICTION_UNIT.push(selectedItems.id)
|
||||
}
|
||||
this.pullSelectedNodes(selectedItems)
|
||||
this.onClick()
|
||||
},
|
||||
// 将选中项的子节点全部移除
|
||||
removeSelectedNodes(selectedItems) {
|
||||
if (selectedItems.nodes && selectedItems.nodes.length > 0) {
|
||||
for (let i = 0; i < selectedItems.nodes.length; i++) {
|
||||
if (this.form.JURISDICTION_UNIT.includes(selectedItems.nodes[i].id)) {
|
||||
this.form.JURISDICTION_UNIT.splice(this.form.JURISDICTION_UNIT.indexOf(selectedItems.nodes[i].id), 1)
|
||||
}
|
||||
this.removeSelectedNodes(selectedItems.nodes[i])
|
||||
}
|
||||
}
|
||||
},
|
||||
// 移除选中项时触发的事件
|
||||
handleRemove(selectedItems) {
|
||||
// 移除选中项时同时移除全部子节点
|
||||
if (this.form.JURISDICTION_UNIT.includes(selectedItems.id)) {
|
||||
this.form.JURISDICTION_UNIT.splice(this.form.JURISDICTION_UNIT.indexOf(selectedItems.id), 1)
|
||||
}
|
||||
this.removeSelectedNodes(selectedItems)
|
||||
this.onClick()
|
||||
},
|
||||
onClick() {
|
||||
this.updateValue = false
|
||||
this.$nextTick(() => {
|
||||
this.updateValue = true
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -298,7 +298,8 @@ export default {
|
|||
'x': 117.91412,
|
||||
'y': 38.35902
|
||||
},
|
||||
CORP_INFO_ID: '016d19225e9d4ece863cce8a256a3e72'
|
||||
// CORP_INFO_ID: '016d19225e9d4ece863cce8a256a3e72'
|
||||
CORP_INFO_ID: 'f8da1790b1034058ae2efefd69af3284'
|
||||
},
|
||||
{
|
||||
'id': '00003',
|
||||
|
|
|
@ -531,8 +531,8 @@ export default {
|
|||
this.getDict()
|
||||
await this.getDictTreeData()
|
||||
await this.getDictInspectDept()
|
||||
await this.handleEdit(this.$parent.INSPECTION_ID)
|
||||
await this.getHiddenReginTreeList()
|
||||
this.handleEdit(this.$parent.INSPECTION_ID)
|
||||
loading.close()
|
||||
},
|
||||
mounted() {
|
||||
|
@ -547,36 +547,39 @@ export default {
|
|||
|
||||
// 修改
|
||||
handleEdit(ID) {
|
||||
requestFN(
|
||||
'/safetyenvironmental/goEdit',
|
||||
{
|
||||
INSPECTION_ID: ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.form = Object.assign(this.form, data.pd) // copy obj
|
||||
if (this.form.INSPECTION_TYPE_OTHER) {
|
||||
this.switchInspectionType = 'value'
|
||||
} else {
|
||||
this.switchInspectionType = 'select'
|
||||
}
|
||||
for (let i = 0; i < this.form.inspectorList.length; i++) {
|
||||
this.INSPECTOR_List.push([])
|
||||
this.getInspectorList(this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i)
|
||||
}
|
||||
for (let i = 0; i < this.form.hiddenList.length; i++) {
|
||||
const formData = { fileHdImgList: [], fileVideoList: [] }
|
||||
this.hdFile.push(formData)
|
||||
}
|
||||
this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点
|
||||
if (this.switchInspectionType === 'select') {
|
||||
this.$refs['tree_InspectionType'].handleNodeClick({ id: this.form.INSPECTION_TYPE })
|
||||
return new Promise((resolve) => {
|
||||
requestFN(
|
||||
'/safetyenvironmental/goEdit',
|
||||
{
|
||||
INSPECTION_ID: ID
|
||||
}
|
||||
this.$refs['deptTree_Inspected'].handleNodeClick({ id: this.form.INSPECTED_DEPARTMENT_ID })
|
||||
this.getUserList(this.form.INSPECTED_DEPARTMENT_ID)
|
||||
console.info(this.form)
|
||||
).then((data) => {
|
||||
this.form = Object.assign(this.form, data.pd) // copy obj
|
||||
if (this.form.INSPECTION_TYPE_OTHER) {
|
||||
this.switchInspectionType = 'value'
|
||||
} else {
|
||||
this.switchInspectionType = 'select'
|
||||
}
|
||||
for (let i = 0; i < this.form.inspectorList.length; i++) {
|
||||
this.INSPECTOR_List.push([])
|
||||
this.getInspectorList(this.form.inspectorList[i].INSPECTION_DEPARTMENT_ID, i)
|
||||
}
|
||||
for (let i = 0; i < this.form.hiddenList.length; i++) {
|
||||
const formData = { fileHdImgList: [], fileVideoList: [] }
|
||||
this.hdFile.push(formData)
|
||||
}
|
||||
this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点
|
||||
if (this.switchInspectionType === 'select') {
|
||||
this.$refs['tree_InspectionType'].handleNodeClick({ id: this.form.INSPECTION_TYPE })
|
||||
}
|
||||
this.$refs['deptTree_Inspected'].handleNodeClick({ id: this.form.INSPECTED_DEPARTMENT_ID })
|
||||
this.getUserList(this.form.INSPECTED_DEPARTMENT_ID)
|
||||
console.info(this.form)
|
||||
resolve()
|
||||
})
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
}).catch((e) => {
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
changeSwitch(type) {
|
||||
|
@ -1080,8 +1083,11 @@ export default {
|
|||
return new Promise((resolve) => {
|
||||
this.treeLoading = true
|
||||
requestFN(
|
||||
'/hiddenRegion/listAll',
|
||||
{}
|
||||
'/hiddenRegion/gerRegionList',
|
||||
{
|
||||
parentId: '0',
|
||||
DEPARTMENT_ID: this.form.INSPECTED_DEPARTMENT_ID
|
||||
}
|
||||
).then((data) => {
|
||||
this.treeLoading = false
|
||||
this.hiddenPartList = JSON.parse(data.zTreeNodes)
|
||||
|
|
Loading…
Reference in New Issue