|
@@ -168,7 +168,57 @@
|
|
|
<div class="btn btn-primary btn-info" @click="submitByFile()">确认提交</div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ <el-dialog
|
|
|
+ title="您添加的项目"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="80%"
|
|
|
+ :before-close="handleDialogClose"
|
|
|
+ center>
|
|
|
+ <span>
|
|
|
+ <el-table
|
|
|
+ :data="tableData"
|
|
|
+ style="width: auto">
|
|
|
+ <el-table-column
|
|
|
+ prop="date"
|
|
|
+ label="项目名称">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="项目测试平台">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="项目联系人">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="联系方式">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="项目测试类型">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="项目需求描述">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="测试报告内容">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="address"
|
|
|
+ label="测试报告结论">
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="handleDialogClose">取消</el-button>
|
|
|
+ <el-button type="primary" @click="ensureSubmitExcel">确认</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
</el-tab-pane>
|
|
|
+
|
|
|
</el-tabs>
|
|
|
|
|
|
</div>
|
|
@@ -187,6 +237,7 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
userId: 0,
|
|
|
+ dialogVisible: false,
|
|
|
isModifyMode: true,
|
|
|
serviceType: ServiceType,
|
|
|
platform: PlatformType,
|
|
@@ -208,6 +259,7 @@ export default {
|
|
|
price: '',
|
|
|
datetime: ''
|
|
|
},
|
|
|
+ projectList: [],
|
|
|
excelFile: {},
|
|
|
rules: {
|
|
|
// name: [
|
|
@@ -254,6 +306,23 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
+ 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 弄'
|
|
|
+ }]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -292,12 +361,14 @@ export default {
|
|
|
headers: {'Content-Type': 'multipart/form-data'},
|
|
|
}
|
|
|
formData.append('file', this.excelFile)
|
|
|
- Http.upload(Apis.PROJECT.ADD_PROJECT_BY_EXCEL, formData, config).then((res) => {
|
|
|
- console.log(res)
|
|
|
- notify('success', '项目添加成功')
|
|
|
- }).catch(error => {
|
|
|
- notify('error', error.data.msg)
|
|
|
- })
|
|
|
+ this.showDialog()
|
|
|
+ // Http.upload(Apis.PROJECT.ADD_PROJECT_BY_EXCEL, formData, config).then((res) => {
|
|
|
+ // console.log(res)
|
|
|
+ // this.projectList = res.data
|
|
|
+ // notify('success', '项目添加成功')
|
|
|
+ // }).catch(error => {
|
|
|
+ // notify('error', error)
|
|
|
+ // })
|
|
|
},
|
|
|
// cancelModify () {
|
|
|
// this.isModifyMode = false
|
|
@@ -352,7 +423,26 @@ export default {
|
|
|
}).catch(error => {
|
|
|
notify('error', error.data.msg)
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleDialogClose (done) {
|
|
|
+ this.$confirm('确认退出?退出前请记录下登录账号和密码,否则无法找回!!!')
|
|
|
+ .then(_ => {
|
|
|
+ //done()
|
|
|
+ this.hideDialog()
|
|
|
+ })
|
|
|
+ .catch(_ => {
|
|
|
+ })
|
|
|
+ },
|
|
|
+ ensureSubmitExcel () {
|
|
|
+
|
|
|
+ },
|
|
|
+ showDialog () {
|
|
|
+ this.dialogVisible = true
|
|
|
+ },
|
|
|
+ hideDialog () {
|
|
|
+ this.dialogVisible = false
|
|
|
+ this.resetForm()
|
|
|
+ },
|
|
|
},
|
|
|
created: function () {
|
|
|
}
|