fix:协议管理页面无法预览附件图片
This commit is contained in:
parent
b9dd07af15
commit
5d7df9f110
|
|
@ -104,7 +104,11 @@
|
|||
prop="contractCode"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column label="附件图片" align="center" prop="fileName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="附件图片" align="center" prop="fileName" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
<span @click="openImg(scope.row.fileUrl)" style="color: #02A7F0;">{{ scope.row.fileName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="签订日期" align="center" prop="signTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="往来单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column
|
||||
|
|
@ -563,7 +567,7 @@ export default {
|
|||
getAgreementInfoId(param).then(response => {
|
||||
this.form = response.data;
|
||||
if (response.data.leaseDay == null) {
|
||||
this.form.leaseDay = undefined
|
||||
this.form.leaseDay = undefined;
|
||||
}
|
||||
this.fileList = [];
|
||||
this.checkUrlList = [];
|
||||
|
|
|
|||
|
|
@ -7,13 +7,14 @@
|
|||
<el-input
|
||||
v-model="typeName"
|
||||
placeholder="请输入类型名称"
|
||||
clearable maxlength="50"
|
||||
clearable
|
||||
maxlength="50"
|
||||
size="small"
|
||||
prefix-icon="el-icon-search"
|
||||
style="margin-bottom: 20px"
|
||||
/>
|
||||
</div>
|
||||
<div class="head-container" style="">
|
||||
<div class="head-container" style>
|
||||
<el-tree
|
||||
style="height: 700px;overflow: scroll;"
|
||||
:data="treeOptions"
|
||||
|
|
@ -30,8 +31,14 @@
|
|||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
|
||||
label-width="68px">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="typeName">
|
||||
<el-input
|
||||
v-model="queryParams.typeName"
|
||||
|
|
@ -50,14 +57,7 @@
|
|||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
>新增
|
||||
</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
|
|
@ -68,38 +68,118 @@
|
|||
@click="handleExport"
|
||||
>导出
|
||||
</el-button>
|
||||
</el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" ></right-toolbar>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="typeList" height="600" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center"/>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="typeList"
|
||||
height="600"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="名称" align="center" key="typeName" prop="typeName" />
|
||||
<el-table-column label="计量单位" align="center" key="unitName" prop="unitName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="内部租赁价" align="center" key="leasePrice" prop="leasePrice" :show-overflow-tooltip="true" width="100"/>
|
||||
<el-table-column label="原值" align="center" key="buyPrice" prop="buyPrice" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="丢失赔偿" align="center" key="payPrice" prop="payPrice" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="库管员" align="center" key="keeperUserName" prop="keeperUserName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="管理模式" align="center" key="manageType" prop="manageType" :show-overflow-tooltip="true">
|
||||
<el-table-column
|
||||
label="计量单位"
|
||||
align="center"
|
||||
key="unitName"
|
||||
prop="unitName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="内部租赁价"
|
||||
align="center"
|
||||
key="leasePrice"
|
||||
prop="leasePrice"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="原值"
|
||||
align="center"
|
||||
key="buyPrice"
|
||||
prop="buyPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="丢失赔偿"
|
||||
align="center"
|
||||
key="payPrice"
|
||||
prop="payPrice"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="库管员"
|
||||
align="center"
|
||||
key="keeperUserName"
|
||||
prop="keeperUserName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="管理模式"
|
||||
align="center"
|
||||
key="manageType"
|
||||
prop="manageType"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.manageType=='0'">编码管理</span>
|
||||
<span v-if="scope.row.manageType=='1'">数量管理</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图片" align="center" key="photoName" prop="photoName" :show-overflow-tooltip="true">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="图片"
|
||||
align="center"
|
||||
key="photoName"
|
||||
prop="photoName"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span @click="openImg(scope.row.photoUrl)" style="color: #02A7F0;"> {{ scope.row.photoName }} </span>
|
||||
<span
|
||||
@click="openImg(scope.row.photoUrl)"
|
||||
style="color: #02A7F0;"
|
||||
>{{ scope.row.photoName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="文档资料" align="center" key="documentName" prop="documentName" :show-overflow-tooltip="true">
|
||||
<el-table-column
|
||||
label="文档资料"
|
||||
align="center"
|
||||
key="documentName"
|
||||
prop="documentName"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a :href="uploadUrl+scope.row.documentUrl" style="color: #02A7F0;" :download="scope.row.documentName">{{ scope.row.documentName }}</a>
|
||||
<a
|
||||
:href="uploadUrl+scope.row.documentUrl"
|
||||
style="color: #02A7F0;"
|
||||
:download="scope.row.documentName"
|
||||
>{{ scope.row.documentName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="资产属性" align="center" key="propName" prop="propName" :show-overflow-tooltip="true"/>
|
||||
<el-table-column label="厂家规格型号" align="center" key="facModel" prop="facModel" :show-overflow-tooltip="true" width="120"/>
|
||||
<el-table-column label="备注信息" align="center" key="remark" prop="remark" :show-overflow-tooltip="true"/>
|
||||
|
||||
<el-table-column
|
||||
label="资产属性"
|
||||
align="center"
|
||||
key="propName"
|
||||
prop="propName"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="厂家规格型号"
|
||||
align="center"
|
||||
key="facModel"
|
||||
prop="facModel"
|
||||
:show-overflow-tooltip="true"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="备注信息"
|
||||
align="center"
|
||||
key="remark"
|
||||
prop="remark"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
|
|
@ -112,24 +192,19 @@
|
|||
type="success"
|
||||
icon="el-icon-edit"
|
||||
@click="handleConfig(scope.row)"
|
||||
>配置
|
||||
</el-button>
|
||||
>配置</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改
|
||||
</el-button>
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
|
||||
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -140,17 +215,28 @@
|
|||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/> -->
|
||||
/>-->
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改用户配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="850px" append-to-body :close-on-click-modal="false">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="850px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="所属上级" prop="parentId">
|
||||
<treeselect v-model="form.parentId" :options="treeOptions" :show-count="true" placeholder="请选择所属上级分类"/>
|
||||
<treeselect
|
||||
v-model="form.parentId"
|
||||
:options="treeOptions"
|
||||
:show-count="true"
|
||||
placeholder="请选择所属上级分类"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -169,7 +255,7 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="名称" prop="typeName">
|
||||
<el-input v-model="form.typeName" placeholder="请输入名称" maxlength="30"/>
|
||||
<el-input v-model="form.typeName" placeholder="请输入名称" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -185,30 +271,38 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="内部租赁价" prop="leasePrice">
|
||||
<el-input v-model="form.leasePrice" type="number" placeholder="请输入租赁价格" maxlength="10"/>
|
||||
<el-input
|
||||
v-model="form.leasePrice"
|
||||
type="number"
|
||||
placeholder="请输入租赁价格"
|
||||
maxlength="10"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="外部租赁价" prop="rentPrice">
|
||||
<el-input v-model="form.rentPrice" type="number" placeholder="请输入外部租赁价" maxlength="30"/>
|
||||
<el-input
|
||||
v-model="form.rentPrice"
|
||||
type="number"
|
||||
placeholder="请输入外部租赁价"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="原值" prop="buyPrice">
|
||||
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30"/>
|
||||
<el-input v-model="form.buyPrice" type="number" placeholder="请输入原值" maxlength="30" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="计量单位" prop="unitName">
|
||||
<el-input v-model="form.unitName" placeholder="请输入计量单位" maxlength="20"/>
|
||||
<el-input v-model="form.unitName" placeholder="请输入计量单位" maxlength="20" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
|
|
@ -223,10 +317,10 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
||||
<el-col :span="12">
|
||||
<el-form-item label="库管员" prop="keeperUserId">
|
||||
<el-select v-model="form.keeperUserId" filterable placeholder="请选择库管员" >
|
||||
<el-select v-model="form.keeperUserId" filterable placeholder="请选择库管员">
|
||||
<el-option
|
||||
v-for="keeper in keeperList"
|
||||
:key="keeper.userId"
|
||||
|
|
@ -252,39 +346,44 @@
|
|||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="文档资料" prop="field101">
|
||||
<el-upload ref="field101"
|
||||
<el-upload
|
||||
ref="field101"
|
||||
:file-list="field101fileList"
|
||||
action="#" :limit='1' accept=".docx,.pdf"
|
||||
action="#"
|
||||
:limit="1"
|
||||
accept=".docx, .pdf"
|
||||
:http-request="(obj) => fileUpLoad(obj,'fileUrl')"
|
||||
:on-exceed="exceedFile"
|
||||
|
||||
>
|
||||
>
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="图片" prop="photoName">
|
||||
<el-upload
|
||||
<el-upload
|
||||
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
|
||||
action="#"
|
||||
action="#"
|
||||
:file-list="fileList"
|
||||
list-type="picture-card"
|
||||
:show-file-list="false"
|
||||
accept=".png,.jpg,.jpeg"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove">
|
||||
:on-remove="handleRemove"
|
||||
>
|
||||
<!-- <el-button size="small" type="primary" icon="el-icon-upload">上传</el-button> -->
|
||||
<img v-if="imageUrl" :src="uploadUrl+imageUrl" style="width: 140px;height: 140px;" class="avatar">
|
||||
<img
|
||||
v-if="imageUrl"
|
||||
:src="uploadUrl+imageUrl"
|
||||
style="width: 140px;height: 140px;"
|
||||
class="avatar"
|
||||
/>
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
|
|
@ -293,24 +392,35 @@
|
|||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible">
|
||||
<img width="100%" height="650px" :src="dialogImageUrl" alt="">
|
||||
<img width="100%" height="650px" :src="dialogImageUrl" alt />
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 配置弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="configOpen" width="650px" append-to-body :close-on-click-modal="false">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="configOpen"
|
||||
width="650px"
|
||||
append-to-body
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form ref="cform" :model="cform" :rules="crules" label-width="110px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="调整前价格">
|
||||
<el-input v-model="leasePrice" placeholder="调整前价格" disabled></el-input>
|
||||
<el-input v-model="leasePrice" placeholder="调整前价格" disabled></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="调整后价格" prop="leasePrice">
|
||||
<el-input-number v-model="cform.leasePrice" style="width: 100%;" controls-position="right" :min="0" maxlength="10"></el-input-number>
|
||||
<el-input-number
|
||||
v-model="cform.leasePrice"
|
||||
style="width: 100%;"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
maxlength="10"
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
|
@ -333,7 +443,6 @@
|
|||
<el-button @click="cancelConfig">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -349,20 +458,25 @@ import {
|
|||
deptTreeSelect
|
||||
} from "@/api/system/user";
|
||||
|
||||
import {getToken} from "@/utils/auth";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
import {getListByMaType, getMaTypeList,getMaType, addMaType, updateMaType, delMaType} from "@/api/store/tools";
|
||||
import {
|
||||
getListByMaType,
|
||||
getMaTypeList,
|
||||
getMaType,
|
||||
addMaType,
|
||||
updateMaType,
|
||||
delMaType
|
||||
} from "@/api/store/tools";
|
||||
import { getUserByRoleList } from "@/api/system/user";
|
||||
import { getProLists } from "@/api/base/base";
|
||||
import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
|
||||
import {
|
||||
getInfo
|
||||
} from "@/api/login";
|
||||
import { imgUpLoad, fileUpLoad } from "@/api/system/upload";
|
||||
import { getInfo } from "@/api/login";
|
||||
export default {
|
||||
name: "ToolsType",
|
||||
// dicts: ['sys_normal_disable', 'sys_user_sex'],
|
||||
components: {Treeselect},
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
|
|
@ -403,13 +517,13 @@ export default {
|
|||
roleOptions: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
chosenTypeId:'',
|
||||
leasePrice:'',
|
||||
chosenTypeId: "",
|
||||
leasePrice: "",
|
||||
uploadHeader: process.env.VUE_APP_BASE_API,
|
||||
imageUrl:'',
|
||||
imageName:'',
|
||||
fileList:[],
|
||||
field101fileList:[],
|
||||
imageUrl: "",
|
||||
imageName: "",
|
||||
fileList: [],
|
||||
field101fileList: [],
|
||||
//上传地址
|
||||
// uploadUrl:'http://192.168.0.14:21624/system',//线上服务器地址+system
|
||||
// uploadUrl:'http://112.29.103.165:21624/system',//线上服务器地址+system
|
||||
|
|
@ -419,26 +533,31 @@ export default {
|
|||
children: "children",
|
||||
label: "label"
|
||||
},
|
||||
|
||||
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
typeName: undefined,
|
||||
typeName: undefined
|
||||
// phonenumber: undefined,
|
||||
// status: undefined,
|
||||
// typeId: undefined
|
||||
},
|
||||
|
||||
|
||||
// 表单校验
|
||||
rules: {
|
||||
typeName: [
|
||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
||||
{min: 2, max: 20, message: '设备名称长度必须介于 2 和 20 之间', trigger: 'blur'}
|
||||
{ required: true, message: "设备名称不能为空", trigger: "blur" },
|
||||
{
|
||||
min: 2,
|
||||
max: 20,
|
||||
message: "设备名称长度必须介于 2 和 20 之间",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
parentId: [
|
||||
{required: true, message: "所属上级不能为空", trigger: "blur"}
|
||||
],
|
||||
{ required: true, message: "所属上级不能为空", trigger: "blur" }
|
||||
]
|
||||
// password: [
|
||||
// {required: true, message: "用户密码不能为空", trigger: "blur"},
|
||||
// {min: 5, max: 20, message: '用户密码长度必须介于 5 和 20 之间', trigger: 'blur'}
|
||||
|
|
@ -456,22 +575,22 @@ export default {
|
|||
// message: "请输入正确的手机号码",
|
||||
// trigger: "blur"
|
||||
// }
|
||||
// ]
|
||||
// ]
|
||||
},
|
||||
companyId:undefined,
|
||||
dialogImageUrl: '',
|
||||
companyId: undefined,
|
||||
dialogImageUrl: "",
|
||||
dialogVisible: false,
|
||||
configOpen: false,
|
||||
cform: {
|
||||
price: "",
|
||||
afterPrice: "",
|
||||
useDate: "",
|
||||
useDate: ""
|
||||
},
|
||||
crules: {
|
||||
crules: {
|
||||
leasePrice: [
|
||||
{required: true, message: "调整后价格不能为空", trigger: "blur"},
|
||||
{ required: true, message: "调整后价格不能为空", trigger: "blur" }
|
||||
// { min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
|
||||
],
|
||||
]
|
||||
// effTime: [
|
||||
// {required: true, message: "开始日期不能为空", trigger: "blur"}
|
||||
// ],
|
||||
|
|
@ -485,29 +604,26 @@ export default {
|
|||
}
|
||||
},
|
||||
created() {
|
||||
this.getInfo()
|
||||
this.getInfo();
|
||||
this.getList();
|
||||
this.getTreeData();
|
||||
this.getUserList()
|
||||
this.getPropData()
|
||||
|
||||
this.getUserList();
|
||||
this.getPropData();
|
||||
},
|
||||
methods: {
|
||||
getInfo(){
|
||||
getInfo() {
|
||||
getInfo().then(res => {
|
||||
this.companyId = res.user.companyId
|
||||
})
|
||||
this.companyId = res.user.companyId;
|
||||
});
|
||||
},
|
||||
/** 查询用户列表--库管员,维修员 */
|
||||
getUserList() {
|
||||
getUserByRoleList({roleId:'101'}).then(response => {
|
||||
getUserByRoleList({ roleId: "101" }).then(response => {
|
||||
this.keeperList = response.data;
|
||||
}
|
||||
);
|
||||
getUserByRoleList({roleId:'102'}).then(response => {
|
||||
});
|
||||
getUserByRoleList({ roleId: "102" }).then(response => {
|
||||
this.repairUserList = response.data;
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
/** 查询新增页面-上级类型下拉树结构 */
|
||||
getTreeData() {
|
||||
|
|
@ -515,21 +631,20 @@ export default {
|
|||
this.treeOptions = response.data;
|
||||
});
|
||||
},
|
||||
/** 查询资产属性下拉 */
|
||||
getPropData() {
|
||||
/** 查询资产属性下拉 */
|
||||
getPropData() {
|
||||
getProLists().then(response => {
|
||||
this.propList = response.rows;
|
||||
this.propList = response.rows;
|
||||
});
|
||||
},
|
||||
/** 查询列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getListByMaType(this.queryParams).then(response => {
|
||||
this.typeList = response.data;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
this.typeList = response.data;
|
||||
// this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 筛选节点 - 左侧树
|
||||
filterNode(value, data) {
|
||||
|
|
@ -549,14 +664,14 @@ export default {
|
|||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
photoUrl:"",
|
||||
photoName:"",
|
||||
documentUrl:"",
|
||||
documentName:""
|
||||
photoUrl: "",
|
||||
photoName: "",
|
||||
documentUrl: "",
|
||||
documentName: ""
|
||||
};
|
||||
this.imageUrl = ''
|
||||
this.fileList = []
|
||||
this.field101fileList = []
|
||||
this.imageUrl = "";
|
||||
this.fileList = [];
|
||||
this.field101fileList = [];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
|
|
@ -581,8 +696,8 @@ export default {
|
|||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
|
|
@ -590,25 +705,24 @@ export default {
|
|||
const typeId = row.typeId || this.ids;
|
||||
getMaType(typeId).then(response => {
|
||||
this.form = response.data;
|
||||
if(this.form.documentUrl){
|
||||
if (this.form.documentUrl) {
|
||||
let file = {
|
||||
name:this.form.documentName,
|
||||
type:this.form.documentUrl,
|
||||
}
|
||||
this.field101fileList.push(file)
|
||||
}else{
|
||||
this.field101fileList=[]
|
||||
name: this.form.documentName,
|
||||
type: this.form.documentUrl
|
||||
};
|
||||
this.field101fileList.push(file);
|
||||
} else {
|
||||
this.field101fileList = [];
|
||||
}
|
||||
|
||||
|
||||
this.imageUrl = this.form.photoUrl
|
||||
this.imageUrl = this.form.photoUrl;
|
||||
this.open = true;
|
||||
this.title = "修改";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
console.log(this.form)
|
||||
submitForm: function() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.typeId != undefined) {
|
||||
|
|
@ -617,7 +731,6 @@ export default {
|
|||
this.open = false;
|
||||
this.getList();
|
||||
this.getTreeData();
|
||||
|
||||
});
|
||||
} else {
|
||||
this.form.companyId = this.companyId;
|
||||
|
|
@ -634,13 +747,16 @@ export default {
|
|||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const typeIds = row.typeId;
|
||||
this.$modal.confirm('是否确认删除数据项?').then(function () {
|
||||
return delMaType(typeIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
});
|
||||
this.$modal
|
||||
.confirm("是否确认删除数据项?")
|
||||
.then(function() {
|
||||
return delMaType(typeIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
//配置操作
|
||||
handleConfig(row) {
|
||||
|
|
@ -648,54 +764,56 @@ export default {
|
|||
this.chosenTypeId = row.typeId;
|
||||
this.leasePrice = row.leasePrice;
|
||||
// this.cform.leasePrice = row.leasePrice;
|
||||
this.$set(this.cform,'leasePrice',row.leasePrice)
|
||||
this.$set(this.cform, "leasePrice", row.leasePrice);
|
||||
this.configOpen = true;
|
||||
this.title = "租赁价格调整"
|
||||
this.title = "租赁价格调整";
|
||||
},
|
||||
submitConfig(){
|
||||
submitConfig() {
|
||||
let param = {
|
||||
typeId:this.chosenTypeId,
|
||||
effTime:this.cform.effTime,
|
||||
leasePrice:this.cform.leasePrice,
|
||||
}
|
||||
console.log(param)
|
||||
typeId: this.chosenTypeId,
|
||||
effTime: this.cform.effTime,
|
||||
leasePrice: this.cform.leasePrice
|
||||
};
|
||||
console.log(param);
|
||||
this.$refs["cform"].validate(valid => {
|
||||
if (valid) {
|
||||
updateMaType(param).then(response => {
|
||||
this.$modal.msgSuccess("调整成功");
|
||||
this.configOpen = false;
|
||||
this.getList();
|
||||
this.getTreeData();
|
||||
});
|
||||
this.$modal.msgSuccess("调整成功");
|
||||
this.configOpen = false;
|
||||
this.getList();
|
||||
this.getTreeData();
|
||||
});
|
||||
}
|
||||
});
|
||||
// this.configOpen = false;
|
||||
},
|
||||
cancelConfig(){
|
||||
cancelConfig() {
|
||||
this.configOpen = false;
|
||||
},
|
||||
// 图片上传
|
||||
imgUpLoad(param,name,index) {
|
||||
console.log(param,'image')
|
||||
param.type = 'ma'
|
||||
imgUpLoad(param).then(res => {
|
||||
if(res.code == 200) {
|
||||
this.form.photoUrl = res.data.fileUrl;
|
||||
this.form.photoName = res.data.fileName;
|
||||
this.imageUrl = res.data.fileUrl;
|
||||
this.imageName = res.data.fileName;
|
||||
}else{
|
||||
// this.$msgError(res.msg)
|
||||
this.$modal.msgError(res.msg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
// this.$msgError(error)
|
||||
this.$modal.msgError(error);
|
||||
})
|
||||
imgUpLoad(param, name, index) {
|
||||
console.log(param, "image");
|
||||
param.type = "ma";
|
||||
imgUpLoad(param)
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
this.form.photoUrl = res.data.fileUrl;
|
||||
this.form.photoName = res.data.fileName;
|
||||
this.imageUrl = res.data.fileUrl;
|
||||
this.imageName = res.data.fileName;
|
||||
} else {
|
||||
// this.$msgError(res.msg)
|
||||
this.$modal.msgError(res.msg);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
// this.$msgError(error)
|
||||
this.$modal.msgError(error);
|
||||
});
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
console.log("success");
|
||||
},
|
||||
handleAvatarSuccess(res,file) {
|
||||
console.log("success")
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
this.imageUrl = "";
|
||||
|
|
@ -704,37 +822,40 @@ export default {
|
|||
},
|
||||
//图片点击查看
|
||||
handlePictureCardPreview(file) {
|
||||
console.log(file)
|
||||
console.log(file);
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
//图片查看
|
||||
openImg(url){
|
||||
openImg(url) {
|
||||
this.dialogImageUrl = this.uploadUrl + url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
//文件上传
|
||||
fileUpLoad(param,name,index) {
|
||||
console.log(param,'fileUpLoad')
|
||||
param.type = 'ma'
|
||||
imgUpLoad(param).then(res => {
|
||||
if(res.code == 200) {
|
||||
this.form.documentUrl = res.data.fileUrl;
|
||||
this.form.documentName = res.data.fileName;
|
||||
this.field101fileList[0] = param.file
|
||||
console.log(this.field101fileList)
|
||||
}else{
|
||||
// this.$msgError(res.msg)
|
||||
this.$modal.msgError(res.msg);
|
||||
}
|
||||
}).catch((error) => {
|
||||
// this.$msgError(error)
|
||||
this.$modal.msgError(error);
|
||||
})
|
||||
fileUpLoad(param, name, index) {
|
||||
console.log(param, "fileUpLoad");
|
||||
param.type = "ma";
|
||||
imgUpLoad(param)
|
||||
.then(res => {
|
||||
if (res.code == 200) {
|
||||
this.form.documentUrl = res.data.fileUrl;
|
||||
this.form.documentName = res.data.fileName;
|
||||
this.field101fileList[0] = param.file;
|
||||
console.log(this.field101fileList);
|
||||
} else {
|
||||
// this.$msgError(res.msg)
|
||||
this.$modal.msgError(res.msg);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
// this.$msgError(error)
|
||||
this.$modal.msgError(error);
|
||||
});
|
||||
},
|
||||
exceedFile(files, fileList) {
|
||||
this.$message.warning(
|
||||
`只能选择 1 个文件导入,共选择了 ${files.length + fileList.length} 个文件`
|
||||
`只能选择 1 个文件导入,共选择了 ${files.length +
|
||||
fileList.length} 个文件`
|
||||
);
|
||||
},
|
||||
|
||||
|
|
@ -743,7 +864,7 @@ export default {
|
|||
// this.download('system/user/export', {
|
||||
// ...this.queryParams
|
||||
// }, `user_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ module.exports = {
|
|||
// target: `http://10.40.92.8:8080`, //超
|
||||
// target: `http://10.40.92.253:8080`,//韩
|
||||
// target: `http://10.40.92.209:8080`,//川/
|
||||
target: `http://10.40.92.153:8080`, //帅
|
||||
// target: `http://10.40.92.153:8080`, //帅
|
||||
target: `http://10.40.92.14:8080`, //福
|
||||
|
||||
//******** 注意事项 ********* */
|
||||
//1.全局替换qrUrl二维码扫码提供的网址-发布服务器的地址;
|
||||
|
|
|
|||
Loading…
Reference in New Issue