Browse Source

项目分类

dev
jiangyy 4 years ago
parent
commit
7b00cda535
  1. 15
      epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/classifyList.vue
  2. 64
      epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/projectDetail.vue
  3. 17
      epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/projectList.vue

15
epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/classifyList.vue

@ -195,11 +195,11 @@ export default {
}, },
async getAgencylist () { async getAgencylist () {
const url = '/gov/org/customeragency/orgtree' const url = '/gov/org/customeragency/agencygridtree'
// const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist' // const url = 'http://yapi.elinkservice.cn/mock/102/gov/org/agency/agencylist'
const params = { const params = {
customerId: this.customerId // customerId: this.customerId
} }
const { data, code, msg } = await requestPost(url, params) const { data, code, msg } = await requestPost(url, params)
if (code === 0) { if (code === 0) {
@ -217,8 +217,8 @@ export default {
}, },
async loadTable () { async loadTable () {
if (this.validate()) { if (this.validate()) {
// const url = '/data/report/screenproject/selectprojectcategory' const url = '/data/report/screen/project/selectprojectcategory'
const url = 'http://yapi.elinkservice.cn/mock/102/data/report/screenproject/selectprojectcategory' // const url = 'http://yapi.elinkservice.cn/mock/102/data/report/screen/project/selectprojectcategory'
if (this.staticType === 'end') { if (this.staticType === 'end') {
this.tableParams.startTime = '' this.tableParams.startTime = ''
@ -309,7 +309,10 @@ export default {
validate () { validate () {
if (this.staticType === 'Interval' && (!this.tableParams.endTime || !this.tableParams.startTime)) {
this.$message.info("请选择起止日期")
return false
}
if (this.staticType === 'end' && !this.tableParams.endTime) { if (this.staticType === 'end' && !this.tableParams.endTime) {
this.$message.info("请选择结束日期") this.$message.info("请选择结束日期")
return false return false
@ -333,7 +336,7 @@ export default {
console.log(title) console.log(title)
const url = "/data/report/screenproject/selectprojectcategory/export" const url = "/data/report/screen/project/selectprojectcategory/export"
console.log(this.tableParams) console.log(this.tableParams)

64
epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/projectDetail.vue

@ -1,5 +1,6 @@
<template> <template>
<div> <div>
<div v-show="showDetail">
<el-card shadow="never" <el-card shadow="never"
class="aui-card--fill"> class="aui-card--fill">
<div class="mod-demo__demo}"> <div class="mod-demo__demo}">
@ -71,10 +72,11 @@
</div> </div>
<div class="detail"> <div class="detail">
<el-upload class="upload-demo" <el-upload class="upload-demo"
:disabled="true"
action="" action=""
:on-preview="handleFileDownload" :on-preview="handleFileDownload"
:limit="50" :limit="50"
:file-list="fileList"> :file-list="item.attachments">
</el-upload> </el-upload>
<!-- <attachment-list list="{{item.attachments}}" /> --> <!-- <attachment-list list="{{item.attachments}}" /> -->
@ -86,8 +88,18 @@
</div> </div>
</el-card> </el-card>
</div>
<div v-show="!showDetail">
<el-button class="btn_close"
@click="closePic()"
type="primary">返回</el-button>
<img :src="previewPath"
alt=""
style="width:100%;height:100%" />
<!-- <vedio :src="previewPath"></vedio> -->
</div> </div>
</div>
</template> </template>
<script> <script>
@ -103,6 +115,7 @@ export default {
return { return {
projectId: "",//id projectId: "",//id
formData: {}, formData: {},
showDetail: true,
// //
labelWidth: '100px', labelWidth: '100px',
@ -121,15 +134,7 @@ export default {
reportAddress: "",// reportAddress: "",//
processList: [],// processList: [],//
}, },
fileList: [ previewPath: ''
// {
// name: 'food.jpeg',
// url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
// }, {
// name: 'food2.jpeg',
// url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'
// }
],
} }
}, },
@ -138,6 +143,12 @@ export default {
}, },
methods: { methods: {
setShowDetail () {
if (!this.showDetail) {
this.showDetail = true
}
},
async initData (projectId) { async initData (projectId) {
this.startLoading() this.startLoading()
this.projectId = projectId this.projectId = projectId
@ -162,7 +173,9 @@ export default {
this.info = data[0] this.info = data[0]
// info = copyKeyHave(info, data[0]); // info = copyKeyHave(info, data[0]);
this.info.processList.forEach(element => { this.info.processList.forEach(element => {
//close; responseclosed_case退returntransfercreated //close; responseclosed_case退returntransfercreated
if (element.operation === 'close') { if (element.operation === 'close') {
element.operationShow = '关闭' element.operationShow = '关闭'
@ -177,13 +190,39 @@ export default {
} else if (element.operation === 'created') { } else if (element.operation === 'created') {
element.operationShow = '创建项目' element.operationShow = '创建项目'
} }
element.attachments.forEach(attachItem => {
attachItem.name = attachItem.fileName
attachItem.url = attachItem.attachmentUrl
attachItem.type = attachItem.attachmentType
attachItem.format = attachItem.attachmentFormat
});
}); });
} }
}, },
//
handleFileDownload (file) {
// if (file.format === 'jpg' || file.format === 'png' || file.format === 'gif') {
// this.showDetail = false
// this.previewPath = file.url
// } else {
var a = document.createElement('a');
var event = new MouseEvent('click');
a.download = file.name;
a.target = "_blank"//
a.href = file.url;
a.dispatchEvent(event);
// }
},
closePic () {
this.showDetail = true
},
// //
startLoading () { startLoading () {
loading = Loading.service({ loading = Loading.service({
@ -369,5 +408,10 @@ export default {
} }
} }
} }
.btn_close {
display: flex;
justify-content: flex-end;
margin-bottom: 10px;
}
</style> </style>

17
epmet-oper-web/src/views/modules/workPc/projectClassifyStatic/projectList.vue

@ -10,7 +10,10 @@
<div> <div>
<el-form-item style="margin-left:10px"> <el-form-item style="margin-left:10px">
<el-button @click="handleBack()" <el-button @click="handleBack()"
type="primary">返回</el-button> size="mini"
icon="el-icon-back"
type="warning"
plain>返回</el-button>
</el-form-item> </el-form-item>
<el-form-item label="所属组织" <el-form-item label="所属组织"
@ -239,8 +242,8 @@ export default {
async loadTable () { async loadTable () {
if (this.validate()) { if (this.validate()) {
// const url = '/data/report/screenproject/selectcategoryprojectlist' const url = '/data/report/screen/project/selectcategoryprojectlist'
const url = 'http://yapi.elinkservice.cn/mock/102/data/report/screenproject/selectcategoryprojectlist' // const url = 'http://yapi.elinkservice.cn/mock/102/data/report/screen/project/selectcategoryprojectlist'
if (this.staticType === 'end') { if (this.staticType === 'end') {
this.tableParams.startTime = '' this.tableParams.startTime = ''
@ -267,6 +270,7 @@ export default {
// //
diaClose () { diaClose () {
this.$refs.ref_projectDetail.setShowDetail()
this.diaShow = false this.diaShow = false
}, },
@ -340,7 +344,10 @@ export default {
this.$emit('back') this.$emit('back')
}, },
validate () { validate () {
if (this.staticType === 'Interval' && (!this.tableParams.endTime || !this.tableParams.startTime)) {
this.$message.info("请选择起止日期")
return false
}
if (this.staticType === 'end' && !this.tableParams.endTime) { if (this.staticType === 'end' && !this.tableParams.endTime) {
this.$message.info("请选择结束日期") this.$message.info("请选择结束日期")
return false return false
@ -363,7 +370,7 @@ export default {
} }
console.log(title) console.log(title)
const url = "/data/report/screenproject/selectcategoryprojectlist/export" const url = "/data/report/screen/project/selectcategoryprojectlist/export"
app.ajax.exportFilePost( app.ajax.exportFilePost(
url, url,

Loading…
Cancel
Save