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

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

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