...
|
...
|
@@ -16,7 +16,7 @@ |
|
|
|
|
|
<el-col :span="8">
|
|
|
<el-button type="primary" v-on:click="getList">查询</el-button>
|
|
|
<!-- <el-button type="success" v-on:click="toAddDialog">新增</el-button>-->
|
|
|
<el-button type="success" v-on:click="toAddDialog">新增</el-button>
|
|
|
|
|
|
</el-col>
|
|
|
</el-row>
|
...
|
...
|
@@ -40,7 +40,8 @@ |
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="key"
|
|
|
label="key-ID">
|
|
|
label="key-ID"
|
|
|
show-overflow-tooltip>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="id"
|
...
|
...
|
@@ -86,13 +87,87 @@ |
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<!-- 新增弹框-->
|
|
|
<el-dialog title="收货地址" :visible.sync="dialogFormVisible" style="margin-top: -60px" width="60%">
|
|
|
<el-form :model="formInline" :rules="rules" ref="formInline">
|
|
|
<el-row>
|
|
|
<el-col :offset="2" :span="12">
|
|
|
<el-form-item label="" :label-width="formLabelWidth">
|
|
|
<el-upload
|
|
|
class="upload-demo"
|
|
|
drag
|
|
|
:action="uploadPath"
|
|
|
accept="xml"
|
|
|
:headers="uploadHeaderObj"
|
|
|
:on-success="handleUploadSuccess">
|
|
|
<i class="el-icon-upload"></i>
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传xml文件</em></div>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="10">
|
|
|
<el-form-item label="" :label-width="formLabelWidth">
|
|
|
<el-input v-model="formInline.filePath" disabled style="width: 220px">
|
|
|
<template slot="prepend">路径</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="" :label-width="formLabelWidth" prop="key">
|
|
|
<el-input v-model="formInline.key" style="width: 220px">
|
|
|
<template slot="prepend">key</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="10">
|
|
|
<el-form-item label="" :label-width="formLabelWidth">
|
|
|
<el-input v-model="formInline.category" style="width: 220px">
|
|
|
<template slot="prepend">类别</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="" :label-width="formLabelWidth" prop="name">
|
|
|
<el-input v-model="formInline.name " style="width: 220px">
|
|
|
<template slot="prepend">名称</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="10">
|
|
|
<el-form-item label="" :label-width="formLabelWidth">
|
|
|
<el-input v-model="formInline.tenantId " style="width: 220px">
|
|
|
<template slot="prepend">租户</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<!-- <el-col :span="12">-->
|
|
|
<!-- <el-form-item label="" :label-width="formLabelWidth">-->
|
|
|
<!-- <el-input v-model="" style="width: 220px">-->
|
|
|
<!-- <template slot="prepend">其他</template>-->
|
|
|
<!-- </el-input>-->
|
|
|
<!-- </el-form-item>-->
|
|
|
<!-- </el-col>-->
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer" align="center">
|
|
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
|
|
<el-button type="primary" @click="trans_add">确 定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</el-main>
|
|
|
</el-container>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {deployment, del} from "../../api/technological";
|
|
|
import {deployment, del,upload,create,uploadPath} from "../../api/technological";
|
|
|
|
|
|
|
|
|
export default {
|
...
|
...
|
@@ -105,15 +180,44 @@ |
|
|
pageNum:1,
|
|
|
pageSize:10,
|
|
|
},
|
|
|
uploadPath:uploadPath,
|
|
|
total:0,
|
|
|
tableData: [],
|
|
|
tableloading:false,
|
|
|
formInline:{
|
|
|
filePath :'',
|
|
|
category:'',
|
|
|
key:'',
|
|
|
name:'',
|
|
|
tenantId:'',
|
|
|
variables: {},
|
|
|
// cascade:'true'
|
|
|
},
|
|
|
uploadHeaderObj: {
|
|
|
Authorization: window.sessionStorage.getItem("token"),
|
|
|
},
|
|
|
faceImageUrl:'',
|
|
|
formLabelWidth: '120px',
|
|
|
dialogFormVisible:false,
|
|
|
rules: {
|
|
|
name: [
|
|
|
{ required: true, message: '请输入名称', trigger: 'blur' },
|
|
|
// { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
|
|
],
|
|
|
filePath : [
|
|
|
{ required: true, message: '请上传文件', trigger: 'blur' }
|
|
|
],
|
|
|
key : [
|
|
|
{ required: true, message: '请输入部署key', trigger: 'blur' }
|
|
|
],
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
// 分页
|
|
|
handleSizeChange(val) {
|
|
|
this.queryinfo.pageSize= val
|
...
|
...
|
@@ -146,6 +250,47 @@ |
|
|
|
|
|
})
|
|
|
},
|
|
|
//打开新增
|
|
|
toAddDialog() {
|
|
|
this.dialogFormVisible = true;
|
|
|
},
|
|
|
//上传文件
|
|
|
handleUploadSuccess: function(response, file, fileList){
|
|
|
let res = response.data;
|
|
|
if (response.code !== '200') {
|
|
|
// 关闭加载
|
|
|
return this.$message.error(response.msg);
|
|
|
}
|
|
|
this.$message.success(response.msg);
|
|
|
this.formInline.filePath = res.relativePath
|
|
|
|
|
|
},
|
|
|
//新增功能
|
|
|
trans_add() {
|
|
|
// 进行表单的预验证
|
|
|
this.$refs.formInline.validate(valid => {
|
|
|
// 未通过,表单预校验
|
|
|
if (!valid) return;
|
|
|
create(this.formInline).then((response) => {
|
|
|
let res = response.data;
|
|
|
// 添加失败
|
|
|
if (res.code !== '200') {
|
|
|
// 关闭加载
|
|
|
return this.$message.error(res.msg);
|
|
|
// 隐藏对话框
|
|
|
this.dialogFormVisible = false;
|
|
|
}
|
|
|
// 添加,成功
|
|
|
this.$message.success(res.msg);
|
|
|
// 隐藏对话框
|
|
|
this.dialogFormVisible = false;
|
|
|
// 刷新列表
|
|
|
this.getList();
|
|
|
}).catch(error => {
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
})
|
|
|
},
|
|
|
//删除
|
|
|
remove(index,row){
|
|
|
// 弹框询问是否删除?
|
...
|
...
|
|