|
@@ -178,11 +178,24 @@
|
|
<span>{{scope.row.name}}</span>
|
|
<span>{{scope.row.name}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="platform" label="项目测试平台">
|
|
|
|
|
|
+ <el-table-column prop="platform" label="领域类型">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-for="item in JSON.parse(scope.row.platform)" :key="item">
|
|
|
|
- <el-tag type="success">{{item}}</el-tag>
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span>{{scope.row.fieldType}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="name" label="应用类型">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.applicationType}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="platform" label="测试类型">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.type}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="platform" label="委托单位">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.entrustUnit}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="linkMan" label="项目联系人">
|
|
<el-table-column prop="linkMan" label="项目联系人">
|
|
@@ -195,33 +208,31 @@
|
|
<span>{{scope.row.linkManMobile}}</span>
|
|
<span>{{scope.row.linkManMobile}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="type" label="项目测试类型">
|
|
|
|
|
|
+ <el-table-column prop="description" label="项目需求描述">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span v-for="item in JSON.parse(scope.row.type)" :key="item">
|
|
|
|
- <el-tag type="success">{{item}}</el-tag>
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span>{{scope.row.description}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="description" label="项目需求描述">
|
|
|
|
|
|
+ <el-table-column prop="description" label="计价标准">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{scope.row.description}}</span>
|
|
|
|
|
|
+ <span>{{scope.row.valuationStandard}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="description" label="测试报告内容">
|
|
<el-table-column prop="description" label="测试报告内容">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{scope.row.description}}</span>
|
|
|
|
|
|
+ <span>{{scope.row.crowdTestReportForProject.content}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="description" label="测试报告结论">
|
|
<el-table-column prop="description" label="测试报告结论">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{scope.row.description}}</span>
|
|
|
|
|
|
+ <span>{{scope.row.crowdTestReportForProject.conclusion}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</span>
|
|
</span>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="handleDialogClose">取消</el-button>
|
|
<el-button @click="handleDialogClose">取消</el-button>
|
|
- <el-button type="primary" @click="ensureSubmitExcel">确认</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="hindDialog">确认</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
@@ -233,434 +244,438 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import Http from '@/js/http.js'
|
|
|
|
-import Apis from '@/js/api.js'
|
|
|
|
-import {notify} from '@/constants/index'
|
|
|
|
-import {
|
|
|
|
- getAllPlatformTypes,
|
|
|
|
- getAllServiceTypes,
|
|
|
|
- getGreenChannelAddProjectExcelTemplateFile,
|
|
|
|
- storageGet
|
|
|
|
-} from '@/js/index'
|
|
|
|
|
|
+ import Http from '@/js/http.js'
|
|
|
|
+ import Apis from '@/js/api.js'
|
|
|
|
+ import {notify} from '@/constants/index'
|
|
|
|
+ import {
|
|
|
|
+ getAllPlatformTypes,
|
|
|
|
+ getAllServiceTypes,
|
|
|
|
+ getGreenChannelAddProjectExcelTemplateFile,
|
|
|
|
+ storageGet
|
|
|
|
+ } from '@/js/index'
|
|
|
|
|
|
-export default {
|
|
|
|
- name: 'ProjectAdd',
|
|
|
|
- data () {
|
|
|
|
- return {
|
|
|
|
- userId: 0,
|
|
|
|
- user: {},
|
|
|
|
- loading: false,
|
|
|
|
- dialogVisible: false,
|
|
|
|
- isModifyMode: true,
|
|
|
|
- serviceType: [],
|
|
|
|
- platforms: [],
|
|
|
|
- isFormSubmit: true,
|
|
|
|
- downloadFile: '',
|
|
|
|
- project: {
|
|
|
|
- name: '',
|
|
|
|
- description: '',
|
|
|
|
- contactName: '',
|
|
|
|
- contactPhone: '',
|
|
|
|
- platform: [],
|
|
|
|
- type: [],
|
|
|
|
- requireDoc: [],
|
|
|
|
- requireDocUrl: '',
|
|
|
|
- file: [],
|
|
|
|
- fileUrl: '',
|
|
|
|
- excelFile: [],
|
|
|
|
- excelFileUrl: '',
|
|
|
|
- price: '',
|
|
|
|
- datetime: ''
|
|
|
|
- },
|
|
|
|
- projectList: [
|
|
|
|
- {
|
|
|
|
- 'projectDetails': {
|
|
|
|
- 'id': 'PROJECT-2019081319025',
|
|
|
|
- 'name': '网易云测试',
|
|
|
|
- 'contactName': '孙加辉',
|
|
|
|
- 'contactPhone': '13628972489',
|
|
|
|
- 'type': [
|
|
|
|
- 1
|
|
|
|
- ],
|
|
|
|
- 'platform': [
|
|
|
|
- 1,
|
|
|
|
- 0
|
|
|
|
- ],
|
|
|
|
- 'desc': '无',
|
|
|
|
- 'doc': '',
|
|
|
|
- 'file': '',
|
|
|
|
- 'resource': 1,
|
|
|
|
- 'location': {
|
|
|
|
- 'provinceCode': '江苏',
|
|
|
|
- 'cityCode': '南京'
|
|
|
|
- },
|
|
|
|
- 'institution': 1,
|
|
|
|
- 'datetime': '2019-08-13T11:14:08.192+0000',
|
|
|
|
- 'price': 30000.0,
|
|
|
|
- 'budget': 30000.0,
|
|
|
|
- 'usage': null
|
|
|
|
- },
|
|
|
|
- 'taskList': [
|
|
|
|
- {
|
|
|
|
- 'id': 'TASK-LDSM-2019081319013',
|
|
|
|
- 'projectId': 'PROJECT-2019081319025',
|
|
|
|
- 'title': '网易云测试-安全漏洞扫描',
|
|
|
|
- 'description': null,
|
|
|
|
- 'quotePrice': 30000.0,
|
|
|
|
- 'fixedPrice': 30000.0,
|
|
|
|
- 'resource': 0,
|
|
|
|
- 'location': {
|
|
|
|
- 'provinceCode': '江苏',
|
|
|
|
- 'cityCode': '南京'
|
|
|
|
- },
|
|
|
|
- 'institution': 1,
|
|
|
|
- 'serviceType': 1,
|
|
|
|
- 'status': 5,
|
|
|
|
- 'datetime': '2019-08-13T11:14:08.192+0000'
|
|
|
|
|
|
+ export default {
|
|
|
|
+ name: 'ProjectAdd',
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ userId: 0,
|
|
|
|
+ user: {},
|
|
|
|
+ loading: false,
|
|
|
|
+ dialogVisible: false,
|
|
|
|
+ isModifyMode: true,
|
|
|
|
+ serviceType: [],
|
|
|
|
+ platforms: [],
|
|
|
|
+ isFormSubmit: true,
|
|
|
|
+ downloadFile: '',
|
|
|
|
+ project: {
|
|
|
|
+ name: '',
|
|
|
|
+ description: '',
|
|
|
|
+ contactName: '',
|
|
|
|
+ contactPhone: '',
|
|
|
|
+ platform: [],
|
|
|
|
+ type: [],
|
|
|
|
+ requireDoc: [],
|
|
|
|
+ requireDocUrl: '',
|
|
|
|
+ file: [],
|
|
|
|
+ fileUrl: '',
|
|
|
|
+ excelFile: [],
|
|
|
|
+ excelFileUrl: '',
|
|
|
|
+ price: '',
|
|
|
|
+ datetime: ''
|
|
|
|
+ },
|
|
|
|
+ projectList: [{
|
|
|
|
+ "id": null,
|
|
|
|
+ "name": "广东省农产品商贸交易服务平台",
|
|
|
|
+ "code": "PROJ-2020070820055",
|
|
|
|
+ "userId": 20473,
|
|
|
|
+ "regionalManagerId": 99222,
|
|
|
|
+ "projectDistributionTypeId": 1,
|
|
|
|
+ "fieldType": "KJFW",
|
|
|
|
+ "applicationType": "WEB",
|
|
|
|
+ "type": "GNCS",
|
|
|
|
+ "linkMan": "张三",
|
|
|
|
+ "linkManMobile": "13512345678",
|
|
|
|
+ "description": "本平台提供农产品网上供求信息的发布、在线交易服务等功能,帮助用户快速捕获商机,具备开设网上交易会和网上农博会,为用户提供更广阔的宣传平台。",
|
|
|
|
+ "projectFile": "",
|
|
|
|
+ "requirementFile": "",
|
|
|
|
+ "distributionProvince": "江苏",
|
|
|
|
+ "distributionCity": "南京",
|
|
|
|
+ "valuationStandard": "1200元/(人天)",
|
|
|
|
+ "quotedPrice": 30000.0,
|
|
|
|
+ "fixedPrice": 30000.0,
|
|
|
|
+ "restPrice": null,
|
|
|
|
+ "entrustUnit": "广东省农村信息中心",
|
|
|
|
+ "status": 4,
|
|
|
|
+ "deadTime": "2020-07-08T12:16:34.695+0000",
|
|
|
|
+ "endTime": "2020-07-08T12:16:34.695+0000",
|
|
|
|
+ "isDeleted": 0,
|
|
|
|
+ "joinCount": 1,
|
|
|
|
+ "createTime": null,
|
|
|
|
+ "crowdTestTaskList": [{
|
|
|
|
+ "id": null,
|
|
|
|
+ "name": "广东省农产品商贸交易服务平台-GNCS",
|
|
|
|
+ "code": "TASK-GNCS-2020070820008",
|
|
|
|
+ "crowdTestProjectCode": "PROJ-2020070820055",
|
|
|
|
+ "evaluationAgencyId": 1,
|
|
|
|
+ "type": "GNCS",
|
|
|
|
+ "description": "本平台提供农产品网上供求信息的发布、在线交易服务等功能,帮助用户快速捕获商机,具备开设网上交易会和网上农博会,为用户提供更广阔的宣传平台。",
|
|
|
|
+ "requirementFile": "",
|
|
|
|
+ "distributionType": 0,
|
|
|
|
+ "distributionProvince": null,
|
|
|
|
+ "distributionCity": null,
|
|
|
|
+ "quotedPrice": 30000.0,
|
|
|
|
+ "fixedPrice": 30000.0,
|
|
|
|
+ "status": 4,
|
|
|
|
+ "fullStatus": 0,
|
|
|
|
+ "deadTime": "2020-07-08T12:16:34.695+0000",
|
|
|
|
+ "endTime": "2020-07-08T12:16:34.695+0000",
|
|
|
|
+ "isDeleted": 0,
|
|
|
|
+ "createTime": null,
|
|
|
|
+ "participantCount": 1,
|
|
|
|
+ "acceptedCount": 1,
|
|
|
|
+ "participantHasCommittedCount": 1,
|
|
|
|
+ "acceptedUserList": [{
|
|
|
|
+ "id": null,
|
|
|
|
+ "taskCode": "TASK-GNCS-2020070820008",
|
|
|
|
+ "userId": 20473,
|
|
|
|
+ "quotedPrice": 0.0,
|
|
|
|
+ "hasReport": 1,
|
|
|
|
+ "distributionType": 1,
|
|
|
|
+ "isAccepted": 1,
|
|
|
|
+ "acceptTime": null,
|
|
|
|
+ "isCommitted": 1,
|
|
|
|
+ "user": null,
|
|
|
|
+ "commitTaskTime": "2020-07-08T12:16:34.695+0000",
|
|
|
|
+ "commitReportTime": "2020-07-08T12:16:34.695+0000",
|
|
|
|
+ "crowdTestReportList": [{
|
|
|
|
+ "id": null,
|
|
|
|
+ "name": "广东省农产品商贸交易服务平台-GNCS测试报告",
|
|
|
|
+ "code": "REPORT-2020070820089",
|
|
|
|
+ "userId": 20473,
|
|
|
|
+ "dependencyCode": "TASK-GNCS-2020070820008",
|
|
|
|
+ "type": "测试报告",
|
|
|
|
+ "scope": 1,
|
|
|
|
+ "testObject": null,
|
|
|
|
+ "description": null,
|
|
|
|
+ "content": "对平台的供求信息发布、在线交易、网上上交易会等模块进行了功能性测试,所有测试项均符合项目需求规格说明书的要求",
|
|
|
|
+ "file": null,
|
|
|
|
+ "conclusion": "通过",
|
|
|
|
+ "isDeleted": 0,
|
|
|
|
+ "createTime": null
|
|
|
|
+ }]
|
|
|
|
+ }]
|
|
|
|
+ }],
|
|
|
|
+ "crowdTestReportForProject": {
|
|
|
|
+ "id": null,
|
|
|
|
+ "name": "广东省农产品商贸交易服务平台测试报告",
|
|
|
|
+ "code": "REPORT-2020070820090",
|
|
|
|
+ "userId": null,
|
|
|
|
+ "dependencyCode": "PROJ-2020070820055",
|
|
|
|
+ "type": "GNCS",
|
|
|
|
+ "scope": 0,
|
|
|
|
+ "testObject": "广东省农产品商贸交易服务平台",
|
|
|
|
+ "description": "本平台提供农产品网上供求信息的发布、在线交易服务等功能,帮助用户快速捕获商机,具备开设网上交易会和网上农博会,为用户提供更广阔的宣传平台。",
|
|
|
|
+ "content": "对平台的供求信息发布、在线交易、网上上交易会等模块进行了功能性测试,所有测试项均符合项目需求规格说明书的要求",
|
|
|
|
+ "file": null,
|
|
|
|
+ "conclusion": "通过",
|
|
|
|
+ "isDeleted": 0,
|
|
|
|
+ "createTime": null
|
|
|
|
+ }
|
|
|
|
+ }],
|
|
|
|
+ excelFile: {},
|
|
|
|
+ rules: {
|
|
|
|
+ // name: [
|
|
|
|
+ // {required: true, message: '请输入报告名称', trigger: 'blur'}
|
|
|
|
+ // // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
|
|
|
|
+ // ],
|
|
|
|
+ // abstract: [
|
|
|
|
+ // {
|
|
|
|
+ // required: true,
|
|
|
|
+ // message: '请输入摘要信息',
|
|
|
|
+ // trigger: 'change'
|
|
|
|
+ // }
|
|
|
|
+ // ],
|
|
|
|
+ // type: [
|
|
|
|
+ // {required: true, message: '请选择报告类型', trigger: 'change'}
|
|
|
|
+ // ],
|
|
|
|
+ // conclusion: [
|
|
|
|
+ // {required: true, message: '请输入报告结论', trigger: 'blur'}
|
|
|
|
+ // ]
|
|
|
|
+ },
|
|
|
|
+ pickerOptions: {
|
|
|
|
+ shortcuts: [
|
|
|
|
+ {
|
|
|
|
+ text: '今天',
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ picker.$emit('pick', new Date())
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '昨天',
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const date = new Date()
|
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24)
|
|
|
|
+ picker.$emit('pick', date)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ text: '一周前',
|
|
|
|
+ onClick(picker) {
|
|
|
|
+ const date = new Date()
|
|
|
|
+ date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
|
+ picker.$emit('pick', date)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ tableData: [{
|
|
|
|
+ date: '2016-05-02',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1518 弄'
|
|
|
|
+ }, {
|
|
|
|
+ date: '2016-05-04',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1517 弄'
|
|
|
|
+ }, {
|
|
|
|
+ date: '2016-05-01',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1519 弄'
|
|
|
|
+ }, {
|
|
|
|
+ date: '2016-05-03',
|
|
|
|
+ name: '王小虎',
|
|
|
|
+ address: '上海市普陀区金沙江路 1516 弄'
|
|
|
|
+ }]
|
|
}
|
|
}
|
|
- ],
|
|
|
|
- 'reportList': null
|
|
|
|
},
|
|
},
|
|
- {
|
|
|
|
- 'projectDetails': {
|
|
|
|
- 'id': 'PROJECT-2019081319026',
|
|
|
|
- 'name': '网易测试',
|
|
|
|
- 'contactName': '孙加辉',
|
|
|
|
- 'contactPhone': '0797-8877663',
|
|
|
|
- 'type': [
|
|
|
|
- 4,
|
|
|
|
- 3
|
|
|
|
- ],
|
|
|
|
- 'platform': [
|
|
|
|
- 2
|
|
|
|
- ],
|
|
|
|
- 'desc': '无',
|
|
|
|
- 'doc': '',
|
|
|
|
- 'file': '',
|
|
|
|
- 'resource': 1,
|
|
|
|
- 'location': {
|
|
|
|
- 'provinceCode': '江苏',
|
|
|
|
- 'cityCode': '南京'
|
|
|
|
|
|
+ mounted() {
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.init()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ init() {
|
|
|
|
+ this.setServiceType()
|
|
|
|
+ this.setPlatformType()
|
|
|
|
+ this.setUserInfo()
|
|
|
|
+ this.setTemplateExcel()
|
|
},
|
|
},
|
|
- 'institution': 1,
|
|
|
|
- 'datetime': '2019-08-13T11:14:08.194+0000',
|
|
|
|
- 'price': 30000.0,
|
|
|
|
- 'budget': 30000.0,
|
|
|
|
- 'usage': null
|
|
|
|
- },
|
|
|
|
- 'taskList': [
|
|
|
|
- {
|
|
|
|
- 'id': 'TASK-GNCS-2019081319006',
|
|
|
|
- 'projectId': 'PROJECT-2019081319026',
|
|
|
|
- 'title': '网易测试-功能测试',
|
|
|
|
- 'description': null,
|
|
|
|
- 'quotePrice': 30000.0,
|
|
|
|
- 'fixedPrice': 30000.0,
|
|
|
|
- 'resource': 0,
|
|
|
|
- 'location': {
|
|
|
|
- 'provinceCode': '江苏',
|
|
|
|
- 'cityCode': '南京'
|
|
|
|
- },
|
|
|
|
- 'institution': 1,
|
|
|
|
- 'serviceType': 4,
|
|
|
|
- 'status': 5,
|
|
|
|
- 'datetime': '2019-08-13T11:14:08.194+0000'
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- 'reportList': null
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- excelFile: {},
|
|
|
|
- rules: {
|
|
|
|
- // name: [
|
|
|
|
- // {required: true, message: '请输入报告名称', trigger: 'blur'}
|
|
|
|
- // // { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" }
|
|
|
|
- // ],
|
|
|
|
- // abstract: [
|
|
|
|
- // {
|
|
|
|
- // required: true,
|
|
|
|
- // message: '请输入摘要信息',
|
|
|
|
- // trigger: 'change'
|
|
|
|
- // }
|
|
|
|
- // ],
|
|
|
|
- // type: [
|
|
|
|
- // {required: true, message: '请选择报告类型', trigger: 'change'}
|
|
|
|
- // ],
|
|
|
|
- // conclusion: [
|
|
|
|
- // {required: true, message: '请输入报告结论', trigger: 'blur'}
|
|
|
|
- // ]
|
|
|
|
- },
|
|
|
|
- pickerOptions: {
|
|
|
|
- shortcuts: [
|
|
|
|
- {
|
|
|
|
- text: '今天',
|
|
|
|
- onClick (picker) {
|
|
|
|
- picker.$emit('pick', new Date())
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- text: '昨天',
|
|
|
|
- onClick (picker) {
|
|
|
|
- const date = new Date()
|
|
|
|
- date.setTime(date.getTime() - 3600 * 1000 * 24)
|
|
|
|
- picker.$emit('pick', date)
|
|
|
|
|
|
+ //加载数据
|
|
|
|
+ loadData: function () {
|
|
|
|
+ },
|
|
|
|
+ modifyInfo() {
|
|
|
|
+ this.isModifyMode = true
|
|
|
|
+ },
|
|
|
|
+ submitInfo() {
|
|
|
|
+ //this.isModifyMode = false
|
|
|
|
+ this.showLoading()
|
|
|
|
+ const newProject = {
|
|
|
|
+ userId: this.user.userVO.id,
|
|
|
|
+ name: this.project.name,
|
|
|
|
+ description: this.project.description,
|
|
|
|
+ contactName: this.project.contactName,
|
|
|
|
+ contactPhone: this.project.contactPhone,
|
|
|
|
+ platform: this.project.platform,
|
|
|
|
+ type: this.project.type,
|
|
|
|
+ doc: this.project.requireDocUrl,
|
|
|
|
+ file: this.project.fileUrl,
|
|
|
|
+ price: this.project.price,
|
|
|
|
+ datetime: this.project.datetime
|
|
|
|
+ }
|
|
|
|
+ Http.post(Apis.PROJECT.ADD_PROJECT, newProject).then((res) => {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ this.createProjectByFormSuccessConfirm()
|
|
|
|
+ console.log(res)
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ notify('error', error.data)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // cancelModify () {
|
|
|
|
+ // this.isModifyMode = false
|
|
|
|
+ // },
|
|
|
|
+ handleRemove(file, fileList) {
|
|
|
|
+ console.log(file, fileList)
|
|
|
|
+ },
|
|
|
|
+ handleExceed(files, fileList) {
|
|
|
|
+ this.$message.warning(
|
|
|
|
+ `当前限制选择 1 个文件,本次选择了 ${
|
|
|
|
+ files.length
|
|
|
|
+ } 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
|
|
|
+ )
|
|
|
|
+ },
|
|
|
|
+ beforeRemove(file, fileList) {
|
|
|
|
+ //return this.$confirm(`确定移除 ${file.name}?`)
|
|
|
|
+ },
|
|
|
|
+ beforeFileUpload() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ uploadProjectCreateExcelFile(param) {
|
|
|
|
+ this.showLoading()
|
|
|
|
+ const formData = new FormData()
|
|
|
|
+ let config = {
|
|
|
|
+ //添加请求头
|
|
|
|
+ headers: {'Content-Type': 'multipart/form-data'},
|
|
|
|
+ }
|
|
|
|
+ formData.append('file', param.file)
|
|
|
|
+ Http.upload(Apis.PROJECT.ADD_PROJECT_BY_EXCEL_PRE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
|
+ console.log(res)
|
|
|
|
+ this.projectList = res.data
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ this.showDialog()
|
|
|
|
+ //notify('success', '项目添加成功')
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ console.log("打印错误信息!!!");
|
|
|
|
+ console.log(error);
|
|
|
|
+ console.log(error.data);
|
|
|
|
+ notify('error', error)
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ uploadRequireDoc(param) {
|
|
|
|
+ const formData = new FormData()
|
|
|
|
+ let config = {
|
|
|
|
+ //添加请求头
|
|
|
|
+ headers: {'Content-Type': 'multipart/form-data'},
|
|
|
|
+ }
|
|
|
|
+ formData.append('file', param.file)
|
|
|
|
+ Http.upload(Apis.FILE.REQUIREMENT_FILE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
|
+ console.log('上传成功')
|
|
|
|
+ this.project.requireDocUrl = res.data
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ notify('success', '上传成功')
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ notify('error', error.data)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ uploadApkFile(param) {
|
|
|
|
+ const formData = new FormData()
|
|
|
|
+ let config = {
|
|
|
|
+ //添加请求头
|
|
|
|
+ headers: {'Content-Type': 'multipart/form-data'},
|
|
|
|
+ }
|
|
|
|
+ formData.append('file', param.file)
|
|
|
|
+ Http.upload(Apis.FILE.APK.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
|
+ console.log('上传成功')
|
|
|
|
+ this.project.fileUrl = res.data
|
|
|
|
+ console.log(res)
|
|
|
|
+ notify('success', '上传成功')
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ notify('error', error.data)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleDialogClose(done) {
|
|
|
|
+ this.hideDialog()
|
|
|
|
+ this.project.excelFile = []
|
|
|
|
+ // this.$confirm('确认退出?退出前请记录下登录账号和密码,否则无法找回!!!')
|
|
|
|
+ // .then(_ => {
|
|
|
|
+ // //done()
|
|
|
|
+ // this.hideDialog()
|
|
|
|
+ // })
|
|
|
|
+ // .catch(_ => {
|
|
|
|
+ // })
|
|
|
|
+ },
|
|
|
|
+ hindDialog(){
|
|
|
|
+ this.hideDialog()
|
|
|
|
+ },
|
|
|
|
+ ensureSubmitExcel() {
|
|
|
|
+ this.hideDialog()
|
|
|
|
+ this.showLoading()
|
|
|
|
+ this.project.excelFile = []
|
|
|
|
+ Http.post(Apis.PROJECT.ADD_PROJECT_BY_EXCEL, this.projectList).then((res) => {
|
|
|
|
+ notify('success', '添加成功')
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ notify('error', error.data)
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ showDialog() {
|
|
|
|
+ this.dialogVisible = true
|
|
|
|
+ },
|
|
|
|
+ hideDialog() {
|
|
|
|
+ this.dialogVisible = false
|
|
|
|
+ //this.resetForm()
|
|
|
|
+ },
|
|
|
|
+ setServiceType() {
|
|
|
|
+ getAllServiceTypes().then((res) => {
|
|
|
|
+ this.serviceType = res
|
|
|
|
+ }).catch((error) => {
|
|
|
|
+ notify('error', '获取服务类型出错')
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ setPlatformType() {
|
|
|
|
+ this.platforms = getAllPlatformTypes()
|
|
|
|
+ },
|
|
|
|
+ createProjectByFormSuccessConfirm() {
|
|
|
|
+ this.$confirm('项目创建成功,是否跳转至主页?', '提示', {
|
|
|
|
+ confirmButtonText: '跳转至主页',
|
|
|
|
+ cancelButtonText: '继续创建项目',
|
|
|
|
+ type: 'success'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.$router.push({
|
|
|
|
+ name: 'Home',
|
|
|
|
+ // params: {projectId: projectId, taskId: taskId}
|
|
|
|
+ })
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'success',
|
|
|
|
+ // message: '删除成功!'
|
|
|
|
+ // });
|
|
|
|
+ }).catch(() => {
|
|
|
|
+ this.resetForm()
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'info',
|
|
|
|
+ // message: '已取消删除'
|
|
|
|
+ // });
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ resetForm() {
|
|
|
|
+ this.project = {
|
|
|
|
+ name: '',
|
|
|
|
+ description: '',
|
|
|
|
+ contactName: '',
|
|
|
|
+ contactPhone: '',
|
|
|
|
+ platform: [],
|
|
|
|
+ type: [],
|
|
|
|
+ requireDoc: [],
|
|
|
|
+ requireDocUrl: '',
|
|
|
|
+ file: [],
|
|
|
|
+ fileUrl: '',
|
|
|
|
+ excelFile: [],
|
|
|
|
+ excelFileUrl: '',
|
|
|
|
+ price: '',
|
|
|
|
+ datetime: ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ setUserInfo() {
|
|
|
|
+ this.user = storageGet('user')
|
|
|
|
+ },
|
|
|
|
+ setTemplateExcel() {
|
|
|
|
+ this.showLoading()
|
|
|
|
+ getGreenChannelAddProjectExcelTemplateFile(this.setTemplateExcelSuccess, this.setTemplateExcelFail)
|
|
|
|
+ },
|
|
|
|
+ setTemplateExcelSuccess(res) {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ this.downloadFile = res.fileUrl
|
|
|
|
+ },
|
|
|
|
+ setTemplateExcelFail(error) {
|
|
|
|
+ this.hideLoading()
|
|
|
|
+ notify('error', '加载模板文件失败:' + error.data)
|
|
|
|
+ },
|
|
|
|
+ showLoading() {
|
|
|
|
+ this.loading = true
|
|
|
|
+ },
|
|
|
|
+ hideLoading() {
|
|
|
|
+ this.loading = false
|
|
}
|
|
}
|
|
- },
|
|
|
|
- {
|
|
|
|
- text: '一周前',
|
|
|
|
- onClick (picker) {
|
|
|
|
- const date = new Date()
|
|
|
|
- date.setTime(date.getTime() - 3600 * 1000 * 24 * 7)
|
|
|
|
- picker.$emit('pick', date)
|
|
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ serviceType(val) {
|
|
|
|
+ this.serviceType = val
|
|
}
|
|
}
|
|
- }
|
|
|
|
- ]
|
|
|
|
- },
|
|
|
|
- tableData: [{
|
|
|
|
- date: '2016-05-02',
|
|
|
|
- name: '王小虎',
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-04',
|
|
|
|
- name: '王小虎',
|
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-01',
|
|
|
|
- name: '王小虎',
|
|
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
|
|
|
- }, {
|
|
|
|
- date: '2016-05-03',
|
|
|
|
- name: '王小虎',
|
|
|
|
- address: '上海市普陀区金沙江路 1516 弄'
|
|
|
|
- }]
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- mounted () {
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.init()
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
- init () {
|
|
|
|
- this.setServiceType()
|
|
|
|
- this.setPlatformType()
|
|
|
|
- this.setUserInfo()
|
|
|
|
- this.setTemplateExcel()
|
|
|
|
- },
|
|
|
|
- //加载数据
|
|
|
|
- loadData: function () {
|
|
|
|
- },
|
|
|
|
- modifyInfo () {
|
|
|
|
- this.isModifyMode = true
|
|
|
|
- },
|
|
|
|
- submitInfo () {
|
|
|
|
- //this.isModifyMode = false
|
|
|
|
- this.showLoading()
|
|
|
|
- const newProject = {
|
|
|
|
- userId: this.user.userVO.id,
|
|
|
|
- name: this.project.name,
|
|
|
|
- description: this.project.description,
|
|
|
|
- contactName: this.project.contactName,
|
|
|
|
- contactPhone: this.project.contactPhone,
|
|
|
|
- platform: this.project.platform,
|
|
|
|
- type: this.project.type,
|
|
|
|
- doc: this.project.requireDocUrl,
|
|
|
|
- file: this.project.fileUrl,
|
|
|
|
- price: this.project.price,
|
|
|
|
- datetime: this.project.datetime
|
|
|
|
- }
|
|
|
|
- Http.post(Apis.PROJECT.ADD_PROJECT, newProject).then((res) => {
|
|
|
|
- this.hideLoading()
|
|
|
|
- this.createProjectByFormSuccessConfirm()
|
|
|
|
- console.log(res)
|
|
|
|
- }).catch(error => {
|
|
|
|
- this.hideLoading()
|
|
|
|
- notify('error', error.data)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // cancelModify () {
|
|
|
|
- // this.isModifyMode = false
|
|
|
|
- // },
|
|
|
|
- handleRemove (file, fileList) {
|
|
|
|
- console.log(file, fileList)
|
|
|
|
- },
|
|
|
|
- handleExceed (files, fileList) {
|
|
|
|
- this.$message.warning(
|
|
|
|
- `当前限制选择 1 个文件,本次选择了 ${
|
|
|
|
- files.length
|
|
|
|
- } 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
|
|
|
- )
|
|
|
|
- },
|
|
|
|
- beforeRemove (file, fileList) {
|
|
|
|
- //return this.$confirm(`确定移除 ${file.name}?`)
|
|
|
|
- },
|
|
|
|
- beforeFileUpload () {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- uploadProjectCreateExcelFile (param) {
|
|
|
|
- this.showLoading()
|
|
|
|
- const formData = new FormData()
|
|
|
|
- let config = {
|
|
|
|
- //添加请求头
|
|
|
|
- headers: {'Content-Type': 'multipart/form-data'},
|
|
|
|
- }
|
|
|
|
- formData.append('file', param.file)
|
|
|
|
- Http.upload(Apis.PROJECT.ADD_PROJECT_BY_EXCEL_PRE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
|
- console.log(res)
|
|
|
|
- console.log(res.data[0].platform)
|
|
|
|
- console.log(typeof res.data[0].platform)
|
|
|
|
- console.log(typeof JSON.parse(res.data[0].platform))
|
|
|
|
- console.log(JSON.parse(res.data[0].platform))
|
|
|
|
- this.projectList = res.data
|
|
|
|
- this.hideLoading()
|
|
|
|
- this.showDialog()
|
|
|
|
- //notify('success', '项目添加成功')
|
|
|
|
- }).catch(error => {
|
|
|
|
- notify('error', error)
|
|
|
|
- this.hideLoading()
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- uploadRequireDoc (param) {
|
|
|
|
- const formData = new FormData()
|
|
|
|
- let config = {
|
|
|
|
- //添加请求头
|
|
|
|
- headers: {'Content-Type': 'multipart/form-data'},
|
|
|
|
- }
|
|
|
|
- formData.append('file', param.file)
|
|
|
|
- Http.upload(Apis.FILE.REQUIREMENT_FILE.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
|
- console.log('上传成功')
|
|
|
|
- this.project.requireDocUrl = res.data
|
|
|
|
- console.log(res.data)
|
|
|
|
- notify('success', '上传成功')
|
|
|
|
- }).catch(error => {
|
|
|
|
- notify('error', error.data)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- uploadApkFile (param) {
|
|
|
|
- const formData = new FormData()
|
|
|
|
- let config = {
|
|
|
|
- //添加请求头
|
|
|
|
- headers: {'Content-Type': 'multipart/form-data'},
|
|
|
|
- }
|
|
|
|
- formData.append('file', param.file)
|
|
|
|
- Http.upload(Apis.FILE.APK.replace('{userId}', this.user.userVO.id), formData, config).then((res) => {
|
|
|
|
- console.log('上传成功')
|
|
|
|
- this.project.fileUrl = res.data
|
|
|
|
- console.log(res)
|
|
|
|
- notify('success', '上传成功')
|
|
|
|
- }).catch(error => {
|
|
|
|
- notify('error', error.data)
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- handleDialogClose (done) {
|
|
|
|
- this.hideDialog()
|
|
|
|
- this.project.excelFile = []
|
|
|
|
- // this.$confirm('确认退出?退出前请记录下登录账号和密码,否则无法找回!!!')
|
|
|
|
- // .then(_ => {
|
|
|
|
- // //done()
|
|
|
|
- // this.hideDialog()
|
|
|
|
- // })
|
|
|
|
- // .catch(_ => {
|
|
|
|
- // })
|
|
|
|
- },
|
|
|
|
- ensureSubmitExcel () {
|
|
|
|
- this.hideDialog()
|
|
|
|
- this.showLoading()
|
|
|
|
- Http.post(Apis.PROJECT.ADD_PROJECT_BY_EXCEL, this.projectList).then((res) => {
|
|
|
|
- notify('success', '添加成功')
|
|
|
|
- this.hideLoading()
|
|
|
|
- }).catch((error) => {
|
|
|
|
- notify('error', error.data)
|
|
|
|
- this.hideLoading()
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- showDialog () {
|
|
|
|
- this.dialogVisible = true
|
|
|
|
- },
|
|
|
|
- hideDialog () {
|
|
|
|
- this.dialogVisible = false
|
|
|
|
- //this.resetForm()
|
|
|
|
- },
|
|
|
|
- setServiceType () {
|
|
|
|
- getAllServiceTypes().then((res) => {
|
|
|
|
- this.serviceType = res
|
|
|
|
- }).catch((error) => {
|
|
|
|
- notify('error', '获取服务类型出错')
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- setPlatformType () {
|
|
|
|
- this.platforms = getAllPlatformTypes()
|
|
|
|
- },
|
|
|
|
- createProjectByFormSuccessConfirm () {
|
|
|
|
- this.$confirm('项目创建成功,是否跳转至主页?', '提示', {
|
|
|
|
- confirmButtonText: '跳转至主页',
|
|
|
|
- cancelButtonText: '继续创建项目',
|
|
|
|
- type: 'success'
|
|
|
|
- }).then(() => {
|
|
|
|
- this.$router.push({
|
|
|
|
- name: 'Home',
|
|
|
|
- // params: {projectId: projectId, taskId: taskId}
|
|
|
|
- })
|
|
|
|
- // this.$message({
|
|
|
|
- // type: 'success',
|
|
|
|
- // message: '删除成功!'
|
|
|
|
- // });
|
|
|
|
- }).catch(() => {
|
|
|
|
- this.resetForm()
|
|
|
|
- // this.$message({
|
|
|
|
- // type: 'info',
|
|
|
|
- // message: '已取消删除'
|
|
|
|
- // });
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- resetForm () {
|
|
|
|
- this.project = {
|
|
|
|
- name: '',
|
|
|
|
- description: '',
|
|
|
|
- contactName: '',
|
|
|
|
- contactPhone: '',
|
|
|
|
- platform: [],
|
|
|
|
- type: [],
|
|
|
|
- requireDoc: [],
|
|
|
|
- requireDocUrl: '',
|
|
|
|
- file: [],
|
|
|
|
- fileUrl: '',
|
|
|
|
- excelFile: [],
|
|
|
|
- excelFileUrl: '',
|
|
|
|
- price: '',
|
|
|
|
- datetime: ''
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- setUserInfo () {
|
|
|
|
- this.user = storageGet('user')
|
|
|
|
- },
|
|
|
|
- setTemplateExcel () {
|
|
|
|
- this.showLoading()
|
|
|
|
- getGreenChannelAddProjectExcelTemplateFile(this.setTemplateExcelSuccess, this.setTemplateExcelFail)
|
|
|
|
- },
|
|
|
|
- setTemplateExcelSuccess (res) {
|
|
|
|
- this.hideLoading()
|
|
|
|
- this.downloadFile = res.fileUrl
|
|
|
|
- },
|
|
|
|
- setTemplateExcelFail (error) {
|
|
|
|
- this.hideLoading()
|
|
|
|
- notify('error', '加载模板文件失败:' + error.data)
|
|
|
|
- },
|
|
|
|
- showLoading () {
|
|
|
|
- this.loading = true
|
|
|
|
- },
|
|
|
|
- hideLoading () {
|
|
|
|
- this.loading = false
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- watch: {
|
|
|
|
- serviceType (val) {
|
|
|
|
- this.serviceType = val
|
|
|
|
|
|
+ },
|
|
|
|
+ created: function () {
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- },
|
|
|
|
- created: function () {
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|