|
@@ -144,24 +144,46 @@
|
|
|
<el-input v-model="form.remark" type="textarea" autocomplete="off" rows="5" style="margin: 20px 0;" />
|
|
|
<div>
|
|
|
<el-upload
|
|
|
+ ref="upload"
|
|
|
class="upload-demo"
|
|
|
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"
|
|
|
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://star.xiaojukeji.com/upload/img.node" 线上 -->
|
|
|
<!-- 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>
|
|
|
</div>
|
|
|
- <el-form-item class="submit">
|
|
|
- <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-form-item>
|
|
|
+ <div class="cla">
|
|
|
+ <el-table :data="uptataKey" fit style="width: 100%;">
|
|
|
+ <el-table-column label="" min-width="50">
|
|
|
+ <template slot-scope="scope">{{ scope.row.index }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="" min-width="150">
|
|
|
+ <template slot-scope="scope">{{ scope.row.name }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="" min-width="300">
|
|
|
+ <template slot-scope="scope"><a :href="scope.row.url" style="color:blue;">{{ scope.row.url }}</a></template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column fixed="right" label="" width="50" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button class="deleteSty" @click="handleDelContractList(scope.row)"> x </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+ <el-form-item class="submit">
|
|
|
+ <el-button :disabled="dis" size="mini" type="primary" @click="createFormData(form)">提 交</el-button>
|
|
|
+ <el-button class="move-button" size="mini" @click="$router.go(-1)">取 消</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<!-- <div style="flex:1">
|
|
|
<el-form-item v-show="statusShow" label="问题原因和修复方法" :label-width="formLabelWidth"><el-input v-model="form.reasonsAndSolutionForTheProblem" type="textarea" placeholder="问题原因和修复方法" rows="4" style="width:77.2%;" /></el-form-item>
|
|
@@ -219,6 +241,8 @@ export default {
|
|
|
moduleStr: [],
|
|
|
stageStr: [],
|
|
|
fileList: [],
|
|
|
+ uptataKey: [],
|
|
|
+ // uptataKey: [{ 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' }],
|
|
|
serviceTypeEnumList: [],
|
|
|
clientTypeEnumList: [],
|
|
|
bugLevelStr: [],
|
|
@@ -248,7 +272,9 @@ export default {
|
|
|
businessTypeShow: false,
|
|
|
moduleTypeShow: false,
|
|
|
userInformation: localStorage.getItem('username'),
|
|
|
- userNames: localStorage.getItem('realname')
|
|
|
+ userNames: localStorage.getItem('realname'),
|
|
|
+ accessory: '',
|
|
|
+ dis: false
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -256,8 +282,23 @@ export default {
|
|
|
this.taskIdGet()
|
|
|
},
|
|
|
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) {
|
|
|
+ this.fileDbList = []
|
|
|
this.fileList = fileList.slice(-3)
|
|
|
+ for (var a of this.fileList) {
|
|
|
+ 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' })
|
|
|
},
|
|
|
async _initBegin() {
|
|
|
await bugGetEnum().then(res => {
|
|
@@ -279,6 +320,13 @@ export default {
|
|
|
})
|
|
|
bugGet(this.$route.query.id).then(res => {
|
|
|
this.form = res.data
|
|
|
+ var str = res.data.accessory
|
|
|
+ if (str !== '') {
|
|
|
+ var obj = JSON.parse(str.split('{}')[0])
|
|
|
+ for (var a of obj) {
|
|
|
+ this.uptataKey.push(a)
|
|
|
+ }
|
|
|
+ }
|
|
|
this.platformTypeStr = this.bizOptions.filter(value => value.code === this.form.bizId)[0].child
|
|
|
if (this.form.clientType) {
|
|
|
this.businessTypeShow = true
|
|
@@ -348,17 +396,26 @@ export default {
|
|
|
}
|
|
|
}))
|
|
|
},
|
|
|
+ handleDelContractList(val) {
|
|
|
+ for (var i = 0; i <= this.uptataKey.length; i++) {
|
|
|
+ if (val.name === this.uptataKey[i].name) {
|
|
|
+ this.uptataKey.splice(i, 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ console.log(this.uptataKey)
|
|
|
+ },
|
|
|
// 提交表单并且返回刷新
|
|
|
createFormData(form) {
|
|
|
this.$refs.form.validate((valid) => {
|
|
|
if (valid) {
|
|
|
- form.reopenTimes = parseInt(form.reopenTimes)
|
|
|
if (form.assigner) {
|
|
|
form.assigner = form.assigner.join(',')
|
|
|
}
|
|
|
if (form.currentHandler) {
|
|
|
form.currentHandler = form.currentHandler.join(',')
|
|
|
}
|
|
|
+ form.reopenTimes = parseInt(form.reopenTimes)
|
|
|
+ form.accessory = this.accessory
|
|
|
this.userData = { id: '', ename: this.userInformation, name: this.userNames }
|
|
|
this.objData = { bugBaseInfo: form, user: this.userData }
|
|
|
bugUpdate(this.objData).then(res => {
|
|
@@ -377,6 +434,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style>
|
|
|
+ .cla .el-table td {
|
|
|
+ padding:0px;
|
|
|
+ }
|
|
|
+ .deleteSty {
|
|
|
+ cursor: pointer;
|
|
|
+ border: none;
|
|
|
+ }
|
|
|
+</style>
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
.set-background
|