更新
This commit is contained in:
parent
3afc321b16
commit
65c8f3c157
@ -42,6 +42,14 @@ export function addUser(data) {
|
||||
})
|
||||
}
|
||||
// 新增用户
|
||||
export function addFolder(data) {
|
||||
return request({
|
||||
url: '/inspectionStaff/addFolder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 新增用户
|
||||
export function permissionAssign(data) {
|
||||
return request({
|
||||
url: '/system/permission/assign-user-role',
|
||||
|
@ -49,7 +49,8 @@
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading">导出
|
||||
<el-button type="warning" icon="el-icon-download" size="mini" @click="handleExport"
|
||||
:loading="exportLoading">导出
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
@ -238,24 +239,27 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="查看附件" v-if="this.form.id">
|
||||
<div @click="addFolder">点击查看附件</div>
|
||||
</el-form-item>
|
||||
<!-- 导入附件-->
|
||||
<el-row style="display: flex; justify-content: center;">
|
||||
<el-upload
|
||||
class="upload-demo"
|
||||
:action="imageUpload.url"
|
||||
:on-preview="handlePreview"
|
||||
:on-remove="handleRemove"
|
||||
:before-remove="beforeRemove"
|
||||
multiple
|
||||
:limit="3"
|
||||
:on-exceed="handleExceed"
|
||||
:headers="imageUpload.headers"
|
||||
:on-success="handleFileSuccessAttachments"
|
||||
:file-list="fileList">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||
</el-upload>
|
||||
</el-row>
|
||||
<!-- <el-row style="display: flex; justify-content: center;">-->
|
||||
<!-- <el-upload-->
|
||||
<!-- class="upload-demo"-->
|
||||
<!-- :action="imageUpload.url"-->
|
||||
<!-- :on-preview="handlePreview"-->
|
||||
<!-- :on-remove="handleRemove"-->
|
||||
<!-- :before-remove="beforeRemove"-->
|
||||
<!-- multiple-->
|
||||
<!-- :limit="3"-->
|
||||
<!-- :on-exceed="handleExceed"-->
|
||||
<!-- :headers="imageUpload.headers"-->
|
||||
<!-- :on-success="handleFileSuccessAttachments"-->
|
||||
<!-- :file-list="fileList">-->
|
||||
<!-- <el-button size="small" type="primary">点击上传</el-button>-->
|
||||
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>-->
|
||||
<!-- </el-upload>-->
|
||||
<!-- </el-row>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -372,7 +376,7 @@ import {
|
||||
listUser,
|
||||
resetUserPwd,
|
||||
getDriverLicenseType,
|
||||
updateUser, getPost, permissionAssign
|
||||
updateUser, getPost, permissionAssign, addFolder
|
||||
} from "@/views/inspection/staff/api/staff";
|
||||
import Treeselect from "@riophae/vue-treeselect";
|
||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
||||
@ -563,6 +567,16 @@ export default {
|
||||
}
|
||||
);
|
||||
},
|
||||
addFolder() {
|
||||
if (!this.form.folderId) {
|
||||
addFolder(this.form.id).then(response => {
|
||||
this.form.folderId = response.data
|
||||
this.$router.push({path: '/jc/shop/partner/file/file', query: {"folderId": this.form.folderId}})
|
||||
})
|
||||
} else {
|
||||
this.$router.push({path: '/jc/shop/partner/file/file', query: {"folderId": this.form.folderId}})
|
||||
}
|
||||
},
|
||||
// 查询驾驶证类型
|
||||
getDriverLicenseType() {
|
||||
getDriverLicenseType().then(response => {
|
||||
@ -777,7 +791,7 @@ export default {
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
importTemplate().then(response => {
|
||||
this.$download.excel(response, '设备导入模板.xls');
|
||||
this.$download.excel(response, '员工导入模板.xls');
|
||||
});
|
||||
},
|
||||
// 文件上传中处理
|
||||
|
@ -50,3 +50,11 @@ export function delEquInfo(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 删除equInfo
|
||||
export function addFolder(data) {
|
||||
return request({
|
||||
url: '/system/equInfo/addFolder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -182,6 +182,9 @@
|
||||
placeholder="请选择下次检定时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="查看附件" v-if="this.form.id">
|
||||
<div @click="lookFile">点击查看附件</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -279,7 +282,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {listEquInfo, getEquInfo, delEquInfo, addEquInfo, updateEquInfo, importTemplate} from "./api/device";
|
||||
import {listEquInfo, getEquInfo, delEquInfo, addEquInfo, updateEquInfo, importTemplate, addFolder} from "./api/device";
|
||||
import {DICT_TYPE} from "@/utils/dict";
|
||||
import {getBaseHeader} from "@/utils/request";
|
||||
|
||||
@ -342,7 +345,8 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {}
|
||||
rules: {},
|
||||
deviceId:null
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -363,6 +367,16 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
lookFile(){
|
||||
if (!this.form.folderId) {
|
||||
addFolder(this.form.id).then(response => {
|
||||
this.form.folderId = response.data
|
||||
this.$router.push({path: '/jc/shop/partner/file/file', query: {"folderId": this.form.folderId}})
|
||||
})
|
||||
}else {
|
||||
this.$router.push({path: '/jc/shop/partner/file/file', query: {"folderId": this.form.folderId}})
|
||||
}
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = "设备导入";
|
||||
@ -446,6 +460,7 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
this.deviceId= row.id
|
||||
getEquInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
|
@ -275,6 +275,10 @@ export default {
|
||||
// this.queryParams.params["beginWarnTime"] = this.daterangeWarnTime[0];
|
||||
// this.queryParams.params["endWarnTime"] = this.daterangeWarnTime[1];
|
||||
// }
|
||||
if (this.$route.query.folderId){
|
||||
this.queryParams.fatherId = this.$route.query.folderId
|
||||
this.fatherId = this.$route.query.folderId
|
||||
}
|
||||
listByPermission(this.queryParams).then(response => {
|
||||
this.inspectionFileList = response.data;
|
||||
this.queryParams.fatherId = response.data[0].fatherId;
|
||||
|
Loading…
Reference in New Issue
Block a user