|
|
|
@ -178,12 +178,12 @@
|
|
|
|
|
<!-- 对话框(添加 / 修改) -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
|
|
<el-upload class="upload-demo" drag :limit="1" :action="uploadUrl" :file-list="fileList" :headers="headers"
|
|
|
|
|
:on-success="handleSuccess" name="multipartFile" :multiple="false" :accept="imgType">
|
|
|
|
|
:on-success="handleSuccess" name="multipartFile" :multiple="false" :accept="imgType" v-show="uploadDisabled">
|
|
|
|
|
<i class="el-icon-upload"></i>
|
|
|
|
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
|
|
|
|
</el-upload>
|
|
|
|
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="98px" style="margin-top: 20px">
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="98px" style="margin-top: 20px" :disabled="this.title === '查看资产档案'">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="业务实体名称" prop="company">
|
|
|
|
@ -196,7 +196,7 @@
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="部门名称" prop="deptName">
|
|
|
|
|
<treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :clearable="true"
|
|
|
|
|
placeholder="请选择归属部门" :normalizer="normalizer" />
|
|
|
|
|
placeholder="请选择归属部门" :normalizer="normalizer" :disabled="treeDisabled" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
@ -345,6 +345,8 @@ export default {
|
|
|
|
|
Authorization: "Bearer " + getAccessToken(),
|
|
|
|
|
"tenant-id": getTenantId(),
|
|
|
|
|
}, // 设置上传的请求头
|
|
|
|
|
uploadDisabled: undefined,
|
|
|
|
|
treeDisabled: undefined,
|
|
|
|
|
fileList: [], // 文件列表
|
|
|
|
|
// 部门树选项
|
|
|
|
|
deptOptions: undefined,
|
|
|
|
@ -402,7 +404,14 @@ export default {
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {},
|
|
|
|
|
rules: {
|
|
|
|
|
company: [
|
|
|
|
|
{ required: true, message: "业务实体不能为空", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
assetCode: [
|
|
|
|
|
{ required: true, message: "资产编号不能为空", trigger: "change" },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
organizationList: [],
|
|
|
|
|
siteOptions: [], //归档位置数据
|
|
|
|
|
siteArray: [], //归档位置选中值
|
|
|
|
@ -573,11 +582,15 @@ export default {
|
|
|
|
|
this.fileList = [];
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.optType = "add";
|
|
|
|
|
this.treeDisabled = false;
|
|
|
|
|
this.uploadDisabled = true;
|
|
|
|
|
this.title = "添加资产档案";
|
|
|
|
|
},
|
|
|
|
|
/** 查看按钮操作 */
|
|
|
|
|
handleView(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.treeDisabled = true;
|
|
|
|
|
this.uploadDisabled = false;
|
|
|
|
|
this.optType = "view";
|
|
|
|
|
const id = row.id;
|
|
|
|
|
getElectronicAssets(id).then((response) => {
|
|
|
|
@ -590,6 +603,8 @@ export default {
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const id = row.id;
|
|
|
|
|
this.treeDisabled = false;
|
|
|
|
|
this.uploadDisabled = true;
|
|
|
|
|
this.optType = "edit";
|
|
|
|
|
getElectronicAssets(id).then((response) => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|