|
@@ -5,8 +5,8 @@
|
|
|
<el-input v-model="queryParams.fName" placeholder="请输入仓库名称" clearable size="small"
|
|
|
@keyup.enter.native="handleQuery" />
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="仓库属性" prop="fProperties">
|
|
|
- <el-select v-model="queryParams.fProperties" placeholder="仓库属性" clearable size="small">
|
|
|
+ <el-form-item label="土地性质" prop="fProperties">
|
|
|
+ <el-select v-model="queryParams.fProperties" placeholder="土地性质" clearable size="small">
|
|
|
<el-option v-for="dict in fPropertiesOptions" :key="dict.dictValue" :label="dict.dictLabel"
|
|
|
:value="dict.dictValue" />
|
|
|
</el-select>
|
|
@@ -48,8 +48,10 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="deptList" row-key="fId" :default-expand-all="false" lazy
|
|
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" :load="getTreeLoad" ref="table">
|
|
|
- <el-table-column prop="fName" label="仓库名称" width="310"></el-table-column>
|
|
|
- <el-table-column prop="fProperties" label="仓库属性" width="100" :formatter="formatFProperties"></el-table-column>
|
|
|
+ <el-table-column prop="fName" label="仓库名称" width="250"></el-table-column>
|
|
|
+ <el-table-column prop="orderNum" label="排序" width="50"></el-table-column>
|
|
|
+ <el-table-column prop="fProperties" label="土地性质" width="100" :formatter="formatFProperties"></el-table-column>
|
|
|
+ <el-table-column prop="landNature" label="仓库属性" width="100" :formatter="landNature"></el-table-column>
|
|
|
<el-table-column prop="fType" label="仓库类型" width="100" :formatter="formatfType"></el-table-column>
|
|
|
<el-table-column prop="fGoodsType" label="货物类型" width="100" :formatter="formatfGoodsType"></el-table-column>
|
|
|
<el-table-column prop="fCoverArea" label="占地面积" width="100"></el-table-column>
|
|
@@ -82,7 +84,6 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="remark" label="备注" width="100"></el-table-column>
|
|
|
- <el-table-column prop="orderNum" label="排序" width="50"></el-table-column>
|
|
|
<el-table-column prop="fStatus" label="状态" :formatter="statusFormat" width="50"></el-table-column>
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="170">
|
|
|
<template slot-scope="scope">
|
|
@@ -111,11 +112,11 @@
|
|
|
:show-overflow-tooltip="true" />
|
|
|
<el-table-column label="监控项目" :width="200" prop="projectId" header-align="center" align="center"
|
|
|
:show-overflow-tooltip="true">
|
|
|
- <template slot-scope="scope">
|
|
|
+ <!-- <template slot-scope="scope">
|
|
|
<span>
|
|
|
{{ scope.row.projectId | projectIdFormat(projectIdOptions) }}
|
|
|
</span>
|
|
|
- </template>
|
|
|
+ </template> -->
|
|
|
|
|
|
</el-table-column>
|
|
|
<el-table-column label="设备序列号" :width="200" prop="deviceName" header-align="center" align="center"
|
|
@@ -184,7 +185,7 @@
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
- <el-form-item label="仓库属性" prop="fProperties" label-width="82px">
|
|
|
+ <el-form-item label="土地性质" prop="fProperties" label-width="82px">
|
|
|
<el-select v-model="form.fProperties" multiple collapse-tags style="width:100%">
|
|
|
<el-option v-for="(item, index) in fPropertiesOptions" :key="index.dictValue" :label="item.dictLabel"
|
|
|
:value="item.dictValue" />
|
|
@@ -192,6 +193,14 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
+ <el-form-item label="仓库属性" prop="landNature" label-width="82px">
|
|
|
+ <el-select v-model="form.landNature" clearable style="width:100%">
|
|
|
+ <el-option v-for="(item, index) in landNatureOptions" :key="index.dictValue" :label="item.dictLabel"
|
|
|
+ :value="item.dictValue" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
<el-form-item label="仓库类型" prop="fType" label-width="82px">
|
|
|
<el-select v-model="form.fType" multiple ollapse-tags style="width:100%">
|
|
|
<el-option v-for="(item, index) in fTypeOptions" :key="index.dictValue" :label="item.dictLabel"
|
|
@@ -297,7 +306,6 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<!-- <up-load :relevantAttachments="relevantAttachments" :createBy="username"></up-load> -->
|
|
|
-
|
|
|
<div style="margin-top: 20px;border: 1px solid #cccccc;padding: 5px;border-radius: 10px">
|
|
|
<el-upload :headers="headers" :action="uploadImgUrl" :on-success="onSuccess" list-type="picture-card"
|
|
|
:file-list="fileList" accept=".jpeg,.jpg,.png,.svg,.webp" :limit="100" :on-preview="handlePictureCardPreview"
|
|
@@ -308,7 +316,40 @@
|
|
|
<img width="100%" :src="dialogImageUrl" alt="">
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
+ <div style="margin-top: 10px;">
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button type="primary" icon="el-icon-plus" size="mini" @click="addRow2(ctnpriceItemsList)">添加</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <el-table v-loading="loading" :data="ctnpriceItemsList">
|
|
|
+ <el-table-column label="编号" align="center" prop="sort">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="联系人" align="center" prop="contacts">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.contacts" placeholder="联系人" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="电话" align="center" prop="tel">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.tel" placeholder="电话" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="备注" align="center" prop="remark">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input v-model="scope.row.remark" placeholder="备注" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-delete"
|
|
|
+ @click.native.prevent="deleteRow(scope.$index, ctnpriceItemsList)">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <upload-Contract :relevantAttachments="relevantAttachments" :createBy="username"></upload-Contract>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
@@ -318,11 +359,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild, lazyListDept } from "@/api/basicdata/dept";
|
|
|
+import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild, lazyListDept, monitorUrl } from "@/api/basicdata/dept";
|
|
|
import { list } from "@/api/monitor/monitorList";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+import uploadContract from "@/views/Warehousing/components/upLoadContract";
|
|
|
import Vue from 'vue'
|
|
|
import upLoad from "@/views/Warehousing/components/upLoad";
|
|
|
import Cookies from "js-cookie";
|
|
@@ -386,9 +428,12 @@ export default {
|
|
|
components: {
|
|
|
Treeselect,
|
|
|
upLoad,
|
|
|
+ uploadContract
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ ctnpriceItemsList: [],
|
|
|
+ relevantAttachments: [],
|
|
|
headers: {
|
|
|
Authorization: "Bearer " + getToken(),
|
|
|
},
|
|
@@ -398,7 +443,7 @@ export default {
|
|
|
list: [],
|
|
|
dialogImageUrl: '',
|
|
|
uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
|
|
|
- //仓库属性
|
|
|
+ //土地性质
|
|
|
fPropertiesOptions: [],
|
|
|
//仓库类型
|
|
|
fTypeOptions: [],
|
|
@@ -471,11 +516,13 @@ export default {
|
|
|
relevantAttachments: [],
|
|
|
username: null,
|
|
|
projectIdOptions: [],
|
|
|
+ landNatureOptions: [],
|
|
|
+ accessToken: null,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
// 'form.fProperties'(newValue) {
|
|
|
- // // 当仓库属性值发生变化时触发
|
|
|
+ // // 当土地性质值发生变化时触发
|
|
|
// // 将多选的属性值转换为逗号分隔的字符串
|
|
|
// },
|
|
|
// 'form.fType'(newValue){
|
|
@@ -490,10 +537,13 @@ export default {
|
|
|
this.getDicts("monitor_project").then((response) => {
|
|
|
this.projectIdOptions = response.data;
|
|
|
});
|
|
|
- //仓库属性
|
|
|
+ //土地性质
|
|
|
this.getDicts("warehouse_properties").then((response) => {
|
|
|
this.fPropertiesOptions = response.data;
|
|
|
});
|
|
|
+ this.getDicts("warehouse_landNature").then((response) => {
|
|
|
+ this.landNatureOptions = response.data;
|
|
|
+ });
|
|
|
//仓库类型
|
|
|
this.getDicts("warehouse_type").then((response) => {
|
|
|
this.fTypeOptions = response.data;
|
|
@@ -516,20 +566,31 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ deleteRow(index, rows) {
|
|
|
+ rows.splice(index, 1);
|
|
|
+ },
|
|
|
+ addRow2(list) {
|
|
|
+ let obj = {
|
|
|
+ sort: list.length + 1,
|
|
|
+ type: 'CK'
|
|
|
+ }
|
|
|
+ list.push(obj);
|
|
|
+ },
|
|
|
handleView(row) {
|
|
|
this.dialogVideoList = true;
|
|
|
this.loading = true;
|
|
|
let data = {
|
|
|
fWarehouseId: row.parentId,
|
|
|
- libraryPositionId: row.fId
|
|
|
+ // libraryPositionId: row.parentId
|
|
|
}
|
|
|
list(data).then(response => {
|
|
|
+ console.log(response.rows)
|
|
|
this.list = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
- //仓库属性回显
|
|
|
+ //土地性质回显
|
|
|
formatFProperties(row, index) {
|
|
|
// console.log(this.fPropertiesOptions[index]);
|
|
|
let name = ""
|
|
@@ -579,26 +640,16 @@ export default {
|
|
|
this.pictureEist = fileList
|
|
|
},
|
|
|
rowView(row) {
|
|
|
- Axios.post("/prod-api/api/LiveBroadcast/getAccessToken").then(res => {
|
|
|
- Axios.post(`/prod-api/api/LiveBroadcast/getToken?productCode=1640070936703286&token=${res.data.data.access_token}`).then(res2 => {
|
|
|
- console.log(res2)
|
|
|
- Axios({
|
|
|
- method: 'POST',
|
|
|
- url: '/prod-api/api/LiveBroadcast/videoWeb',
|
|
|
- params: {
|
|
|
- deviceSerial: row.deviceSerial,
|
|
|
- projectId: row.projectId,
|
|
|
- channelNo: row.code,
|
|
|
- token: res.data.data.access_token,
|
|
|
- Authorization: res2.data.data.data.Authorization
|
|
|
- }
|
|
|
- })
|
|
|
- .then(response => {
|
|
|
- this.dialogVideo = true
|
|
|
- this.iframeSrc = response.data.data.data.previewUrl
|
|
|
- this.start()
|
|
|
- });
|
|
|
- })
|
|
|
+
|
|
|
+ const data = {
|
|
|
+ deviceSerial: row.deviceSerial,
|
|
|
+ projectId: row.projectId,
|
|
|
+ };
|
|
|
+ monitorUrl(data).then(res => {
|
|
|
+ this.dialogVideo = true
|
|
|
+ console.log(res)
|
|
|
+ this.iframeSrc = res.msg
|
|
|
+ this.start()
|
|
|
})
|
|
|
},
|
|
|
videoClose() {
|
|
@@ -706,6 +757,8 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.form.fLocation = this.form.fLocation + ''
|
|
|
this.form.fCharg = this.form.fCharg + ''
|
|
|
+ this.relevantAttachments = response.data["attach"] ? response.data["attach"] : [];
|
|
|
+ this.ctnpriceItemsList = response.data["ctnpriceItemsList"] ? response.data["ctnpriceItemsList"] : [];
|
|
|
// this.relevantAttachments = this.form.annexList ? this.form.annexList : [];
|
|
|
if (this.form.fProperties != null) {
|
|
|
this.form.fProperties = this.form.fProperties.split(",");
|
|
@@ -769,7 +822,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
this.form.fPhotoUrl = JSON.stringify(this.form.fPhotoUrl)
|
|
|
- updateDept(this.form).then(response => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ attach: this.relevantAttachments,
|
|
|
+ ctnpriceItemsList: this.ctnpriceItemsList
|
|
|
+ }
|
|
|
+ updateDept(obj).then(response => {
|
|
|
this.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -800,7 +858,12 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
console.log(this.form.fProperties, this.form.fType, this.form.fGoodsType);
|
|
|
- addDept(this.form).then(response => {
|
|
|
+ let obj = {
|
|
|
+ ...this.form,
|
|
|
+ attach: this.relevantAttachments,
|
|
|
+ ctnpriceItemsList: this.ctnpriceItemsList
|
|
|
+ }
|
|
|
+ addDept(obj).then(response => {
|
|
|
this.msgSuccess("新增成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|