|
@@ -144,20 +144,23 @@
|
|
<el-input v-model="form.remark" type="textarea" autocomplete="off" rows="5" style="margin: 20px 0;" />
|
|
<el-input v-model="form.remark" type="textarea" autocomplete="off" rows="5" style="margin: 20px 0;" />
|
|
<div>
|
|
<div>
|
|
<el-upload
|
|
<el-upload
|
|
|
|
+ ref="upload"
|
|
class="upload-demo"
|
|
class="upload-demo"
|
|
multiple
|
|
multiple
|
|
- capture
|
|
|
|
- accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, audio/mpeg, application/vnd.ms-excel"
|
|
|
|
- :on-change="handleChange"
|
|
|
|
:file-list="fileList"
|
|
:file-list="fileList"
|
|
action="http://star.xiaojukeji.com/upload/img.node"
|
|
action="http://star.xiaojukeji.com/upload/img.node"
|
|
|
|
+ :on-success="handleChange"
|
|
|
|
+ :auto-upload="false"
|
|
>
|
|
>
|
|
<!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
|
|
<!-- action="http://page-daily.kuaidadi.com/upload/img.node" 线下 -->
|
|
<!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
|
|
<!-- action="http://star.xiaojukeji.com/upload/img.node" 线上 -->
|
|
<!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
|
|
<!-- action="https://jsonplaceholder.typicode.com/posts/" 原始地址-->
|
|
- <el-button size="small">点击上传</el-button>
|
|
|
|
|
|
+ <!-- <el-button size="small">点击上传</el-button> -->
|
|
|
|
+ <el-button slot="trigger" size="small" type="primary" @click="createdDis">选取文件</el-button>
|
|
|
|
+ <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload">上传到服务器</el-button>
|
|
</el-upload>
|
|
</el-upload>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- accept="image/jpeg, image/png, image/gif, audio/mp4, video/mp4, application/pdf, audio/mpeg, text/plain, application/vnd.ms-excel, application/vnd.ms-works, application/msword" -->
|
|
<el-form-item class="submit">
|
|
<el-form-item class="submit">
|
|
<el-button size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
|
|
<el-button size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
|
|
<el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
|
|
<el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
|
|
@@ -230,10 +233,8 @@ export default {
|
|
serviceDataRules: {
|
|
serviceDataRules: {
|
|
bugName: [{ required: true, message: '标题不能为空', trigger: 'change' }],
|
|
bugName: [{ required: true, message: '标题不能为空', trigger: 'change' }],
|
|
bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
|
|
bizId: [{ required: true, message: '业务线不能为空', trigger: 'change' }],
|
|
- // bugName: [{ required: true, message: '主题不能为空', trigger: 'change' }],
|
|
|
|
taskId: [{ required: true, message: '任务不能为空', trigger: 'change' }],
|
|
taskId: [{ required: true, message: '任务不能为空', trigger: 'change' }],
|
|
moduleId: [{ required: true, message: '工程模块不能为空', trigger: 'change' }],
|
|
moduleId: [{ required: true, message: '工程模块不能为空', trigger: 'change' }],
|
|
- // projectId: [{ required: true, message: '项目ID不能为空', trigger: 'change' }],
|
|
|
|
bugType: [{ required: true, message: 'bug类型不能为空', trigger: 'change' }],
|
|
bugType: [{ required: true, message: 'bug类型不能为空', trigger: 'change' }],
|
|
reopenTimes: [{ required: true, message: 'reopen不能为空', trigger: 'change' }],
|
|
reopenTimes: [{ required: true, message: 'reopen不能为空', trigger: 'change' }],
|
|
discoveryMethod: [{ required: true, message: '发现方式不能为空', trigger: 'change' }],
|
|
discoveryMethod: [{ required: true, message: '发现方式不能为空', trigger: 'change' }],
|
|
@@ -252,8 +253,12 @@ export default {
|
|
userData: '',
|
|
userData: '',
|
|
businessTypeShow: false,
|
|
businessTypeShow: false,
|
|
moduleTypeShow: false,
|
|
moduleTypeShow: false,
|
|
|
|
+ accessory: '',
|
|
userInformation: localStorage.getItem('username'),
|
|
userInformation: localStorage.getItem('username'),
|
|
- userNames: localStorage.getItem('realname')
|
|
|
|
|
|
+ userNames: localStorage.getItem('realname'),
|
|
|
|
+ fileDbList: [],
|
|
|
|
+ dis: false
|
|
|
|
+ // fileDbList: [{ name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }, { name: '智慧平台.png', url: 'http://pt-starimg.didistatic.com/static/starimg/node/qo4sKioLko1571277086594.png' }]
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -261,16 +266,25 @@ export default {
|
|
this.forkDown()
|
|
this.forkDown()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- handleChange(file, fileList) {
|
|
|
|
|
|
+ createdDis() {
|
|
|
|
+ this.dis = true
|
|
|
|
+ },
|
|
|
|
+ submitUpload() {
|
|
|
|
+ this.$refs.upload.submit()
|
|
|
|
+ this.dis = true
|
|
|
|
+ this.$message({ showClose: true, message: '文件正在上传······', type: 'success' })
|
|
|
|
+ },
|
|
|
|
+ handleChange(response, file, fileList) {
|
|
|
|
+ // setTimeout(function() {
|
|
this.fileDbList = []
|
|
this.fileDbList = []
|
|
this.fileList = fileList.slice(-3)
|
|
this.fileList = fileList.slice(-3)
|
|
for (var a of this.fileList) {
|
|
for (var a of this.fileList) {
|
|
- this.fileDbList.push({ name: a.name, url: 'http' + a.response.url })
|
|
|
|
- }
|
|
|
|
- var arr = []
|
|
|
|
- for (var el of this.fileDbList) {
|
|
|
|
- arr.push({ 'name': el.name, 'url': 'http' + el.response.url })
|
|
|
|
|
|
+ this.fileDbList.push({ 'name': a.name, 'url': 'http:' + a.response.url })
|
|
}
|
|
}
|
|
|
|
+ this.accessory = JSON.stringify(this.fileDbList)
|
|
|
|
+ this.dis = false
|
|
|
|
+ this.$message({ showClose: true, message: '文件上传成功', type: 'success' })
|
|
|
|
+ // }, 500)
|
|
},
|
|
},
|
|
async bugListSelect() {
|
|
async bugListSelect() {
|
|
await bugGetEnum().then(res => {
|
|
await bugGetEnum().then(res => {
|
|
@@ -320,7 +334,6 @@ export default {
|
|
},
|
|
},
|
|
// 业务线取子数据
|
|
// 业务线取子数据
|
|
clickChangePlatform(e) {
|
|
clickChangePlatform(e) {
|
|
- console.log(this.form.taskId)
|
|
|
|
this.platformTypeStr = this.bizOptions.filter(value => value.code === e)[0].child
|
|
this.platformTypeStr = this.bizOptions.filter(value => value.code === e)[0].child
|
|
this.businessTypeStr = []
|
|
this.businessTypeStr = []
|
|
this.moduleStr = []
|
|
this.moduleStr = []
|
|
@@ -371,6 +384,7 @@ export default {
|
|
if (this.$route.query.id && typeof this.form.bizId === 'string') {
|
|
if (this.$route.query.id && typeof this.form.bizId === 'string') {
|
|
form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
|
|
form.bizId = this.bizOptions.filter(value => value.name === form.bizId)[0].code
|
|
}
|
|
}
|
|
|
|
+ form.accessory = this.accessory
|
|
form.reopenTimes = parseInt(form.reopenTimes)
|
|
form.reopenTimes = parseInt(form.reopenTimes)
|
|
form.projectId = this.taskIdStr.filter(value => value.id === this.form.taskId)[0].projectId
|
|
form.projectId = this.taskIdStr.filter(value => value.id === this.form.taskId)[0].projectId
|
|
if (form.assigner) {
|
|
if (form.assigner) {
|