Commit 442ef4cd authored by 王晓倩's avatar 王晓倩

管道信息修改回显方法缺失,管道和设备新增修改添加编号

parent e04b77c3
......@@ -31,6 +31,14 @@ export function getAllDevice(data) {
})
}
// 查询管道信息详细
export function getPipe(pipeId) {
return request({
url: '/device/pipe/' + pipeId,
method: 'get'
})
}
// 新增管道信息
export function addPipe(data) {
return request({
......
......@@ -183,7 +183,12 @@
<el-input v-model="form.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
<el-form-item label="设备图片上传" prop="iconUrl">
<FileUpload :fileArr="fileList" @resFun="getFileInfo"/>
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
</el-form-item>
<el-form-item label="联系人" prop="linkman">
<el-input v-model="form.linkman" placeholder="请输入联系人" />
......@@ -213,12 +218,12 @@
<script>
import { listDeviceInfo, getDeviceInfo, delDeviceInfo, addDeviceInfo, updateDeviceInfo, exportDeviceInfo, countDeviceByType } from "@/api/device/deviceInfo";
import FileUpload from '@/components/FileUpload';
import MyFileUpload from '@/components/MyFileUpload';
export default {
name: "DeviceInfo",
components: {
FileUpload,
MyFileUpload,
},
data() {
return {
......@@ -292,6 +297,10 @@ export default {
getFileInfo(res){
this.form.iconUrl = res.url;
},
listRemove(e) {
this.form.url = "";
this.fileList = [];
},
// 取消按钮
cancel() {
this.open = false;
......
......@@ -137,6 +137,9 @@
<el-form-item label="管道名称" prop="pipeName">
<el-input v-model="form.pipeName" placeholder="请输入管道名称" />
</el-form-item>
<el-form-item label="管道编号" prop="pipeCode">
<el-input v-model="form.pipeCode" placeholder="请输入管道编号" />
</el-form-item>
<el-form-item label="所在地址" prop="pipeAddr">
<el-input v-model="form.pipeAddr" placeholder="请输入所在地址" />
</el-form-item>
......@@ -167,7 +170,12 @@
</el-select>
</el-form-item>
<el-form-item label="设备图片上传" prop="iconUrl">
<FileUpload :fileArr="fileList" @resFun="getFileInfo"/>
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
</el-form-item>
<el-form-item label="安装时间" prop="installationTime">
<el-date-picker clearable size="small"
......@@ -190,13 +198,13 @@
</template>
<script>
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe, countPipeLength } from "@/api/device/pipe";
import FileUpload from '@/components/FileUpload';
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe } from "@/api/device/pipe";
import MyFileUpload from '@/components/MyFileUpload';
export default {
name: "Pipe",
components: {
FileUpload
MyFileUpload
},
data() {
return {
......@@ -271,6 +279,10 @@ export default {
getFileInfo(res){
this.form.iconUrl = res.url;
},
listRemove(e) {
this.form.url = "";
this.fileList = [];
},
// 取消按钮
cancel() {
this.open = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment