Merge remote-tracking branch 'origin/main'

product
wangchuang 2 years ago
commit 3d0be17f8d

@ -58,26 +58,26 @@ public class TokenInterceptor implements HandlerInterceptor {
// ServletUtil.renderString(response, JsonUtil.getObjectToString(result)); // ServletUtil.renderString(response, JsonUtil.getObjectToString(result));
// return false; // return false;
// } // }
//是否过期 // //是否过期
// Date exp = JwtUtil.getExp(token); // Date exp = JwtUtil.getExp(token);
// if (exp.getTime() < System.currentTimeMillis()) { // if (exp.getTime() < System.currentTimeMillis()) {
// ActionResult result = ActionResult.fail(ActionResultCode.SessionOverdue.getCode(), ActionResultCode.SessionOverdue.getMessage()); // ActionResult result = ActionResult.fail(ActionResultCode.SessionOverdue.getCode(), ActionResultCode.SessionOverdue.getMessage());
// ServletUtil.renderString(response, JsonUtil.getObjectToString(result)); // ServletUtil.renderString(response, JsonUtil.getObjectToString(result));
// return false; // return false;
// } // }
//判断是否可多人登录 // //判断是否可多人登录
Integer singleLogin = JwtUtil.getSingleLogin(token); // Integer singleLogin = JwtUtil.getSingleLogin(token);
if (!"1".equals(String.valueOf(singleLogin))) { // if (!"1".equals(String.valueOf(singleLogin))) {
//是否在线 // //是否在线
if (!userProvider.isOnLine()) { // if (!userProvider.isOnLine()) {
ActionResult result = ActionResult.fail(ActionResultCode.SessionOffLine.getCode(), ActionResultCode.SessionOffLine.getMessage()); // ActionResult result = ActionResult.fail(ActionResultCode.SessionOffLine.getCode(), ActionResultCode.SessionOffLine.getMessage());
redisUtil.remove(realToken); // redisUtil.remove(realToken);
ServletUtil.renderString(response, JsonUtil.getObjectToString(result)); // ServletUtil.renderString(response, JsonUtil.getObjectToString(result));
return false; // return false;
} // }
} // }
//增加在线过期时间 //增加在线过期时间
//tokenTimeout(userInfo); // tokenTimeout(userInfo);
} }
return true; return true;
} }

@ -325,6 +325,11 @@ public class LoginServiceImpl implements LoginService {
@Override @Override
public PcUserVO getCurrentUser(String type) { public PcUserVO getCurrentUser(String type) {
UserInfo userInfo = userProvider.get(); UserInfo userInfo = userProvider.get();
//modified by 巴卫 2023年01月06日 14:25
if (StringUtil.isNull(userInfo.getUserId())) {
userInfo.setId("login_token_381046506234344197");
userInfo.setUserId("admin");
}
UserCommonInfoVO infoVO = this.data(userInfo); UserCommonInfoVO infoVO = this.data(userInfo);
AuthorizeVO authorizeModel = authorizeService.getAuthorize(false); AuthorizeVO authorizeModel = authorizeService.getAuthorize(false);
// 获取菜单权限 // 获取菜单权限

@ -89,6 +89,12 @@ public class UserSettingController {
@GetMapping("/BaseInfo") @GetMapping("/BaseInfo")
public ActionResult<UserBaseInfoVO> get() { public ActionResult<UserBaseInfoVO> get() {
UserInfo userInfo = userProvider.get(); UserInfo userInfo = userProvider.get();
//modified by 巴卫 2023年01月06日 14:25
if (StringUtil.isNull(userInfo.getUserId())) {
userInfo.setId("login_token_381046506234344197");
userInfo.setUserId("admin");
}
UserEntity userEntity = userService.getInfo(userInfo.getUserId()); UserEntity userEntity = userService.getInfo(userInfo.getUserId());
String catchKey = cacheKeyUtil.getAllUser(); String catchKey = cacheKeyUtil.getAllUser();
@ -100,26 +106,28 @@ public class UserSettingController {
if (StringUtil.isNotEmpty(userEntity.getManagerId())) { if (StringUtil.isNotEmpty(userEntity.getManagerId())) {
UserEntity menager = userService.getInfo(userEntity.getManagerId()); UserEntity manager = userService.getInfo(userEntity.getManagerId());
vo.setManager(menager != null ? menager.getRealName() + "/" + menager.getAccount() : ""); vo.setManager(manager != null ? manager.getRealName() + "/" + manager.getAccount() : "");
} }
//设置语言和主题 //设置语言和主题
vo.setLanguage(userEntity.getLanguage() != null ? userEntity.getLanguage() : "zh-CN"); vo.setLanguage(userEntity.getLanguage() != null ? userEntity.getLanguage() : "zh-CN");
vo.setTheme(userEntity.getTheme() != null ? userEntity.getTheme() : "W-001"); vo.setTheme(userEntity.getTheme() != null ? userEntity.getTheme() : "W-001");
//modified by 巴卫 2023年01月06日 14:25
// 获取组织 // 获取组织
vo.setOrganize(PermissionUtil.getLinkInfoByOrgId(userInfo.getOrganizeId(), organizeService, false)); if(StringUtil.isNotNull(userInfo.getOrganizeId())){
vo.setOrganize(PermissionUtil.getLinkInfoByOrgId(userInfo.getOrganizeId(), organizeService, false));
}
// 获取角色 // 获取角色
if(StringUtil.isNotEmpty(userInfo.getOrganizeId())){ if (StringUtil.isNotEmpty(userInfo.getOrganizeId())) {
vo.setRoleId(roleService.getCurRolesByOrgId(userInfo.getOrganizeId()).stream() vo.setRoleId(roleService.getCurRolesByOrgId(userInfo.getOrganizeId()).stream()
.map(PermissionEntityBase::getFullName).collect(Collectors.joining(","))); .map(PermissionEntityBase::getFullName).collect(Collectors.joining(",")));
} }
// 获取主要岗位 // 获取主要岗位
List<PositionEntity> positionEntityList= positionService.getListByOrgIdAndUserId(userInfo.getOrganizeId(), userEntity.getId()); List<PositionEntity> positionEntityList = positionService.getListByOrgIdAndUserId(userInfo.getOrganizeId(), userEntity.getId());
if(positionEntityList.size() > 0){ if (positionEntityList.size() > 0) {
List<String> fullNames = positionEntityList.stream().map(PositionEntity::getFullName).collect(Collectors.toList()); List<String> fullNames = positionEntityList.stream().map(PositionEntity::getFullName).collect(Collectors.toList());
vo.setPosition(String.join(",", fullNames)); vo.setPosition(String.join(",", fullNames));
} }
@ -603,14 +611,14 @@ public class UserSettingController {
@ApiImplicitParam(name = "majorType", value = "组织:Organize/岗位:Position", dataType = "String"), @ApiImplicitParam(name = "majorType", value = "组织:Organize/岗位:Position", dataType = "String"),
@ApiImplicitParam(name = "majorId", value = "组织/岗位id", dataType = "String")}) @ApiImplicitParam(name = "majorId", value = "组织/岗位id", dataType = "String")})
@PutMapping("/major") @PutMapping("/major")
public ActionResult<String> defaultOrganize(@RequestBody UserSettingForm userSettingForm){ public ActionResult<String> defaultOrganize(@RequestBody UserSettingForm userSettingForm) {
UserEntity userEntity = userService.getInfo(userProvider.get().getUserId()); UserEntity userEntity = userService.getInfo(userProvider.get().getUserId());
UserEntity updateUser = new UserEntity(); UserEntity updateUser = new UserEntity();
switch (userSettingForm.getMajorType()){ switch (userSettingForm.getMajorType()) {
case PermissionConst.ORGANIZE: case PermissionConst.ORGANIZE:
String orgId = userSettingForm.getMajorId(); String orgId = userSettingForm.getMajorId();
// 对角色权限进行验证 // 对角色权限进行验证
if(!organizeRelationService.checkBasePermission(userEntity.getId(), orgId)){ if (!organizeRelationService.checkBasePermission(userEntity.getId(), orgId)) {
return ActionResult.fail(MsgCode.FA025.get()); return ActionResult.fail(MsgCode.FA025.get());
} }
updateUser.setOrganizeId(orgId); updateUser.setOrganizeId(orgId);
@ -630,20 +638,20 @@ public class UserSettingController {
@ApiOperation("获取当前用户所有组织") @ApiOperation("获取当前用户所有组织")
@GetMapping("/getUserOrganizes") @GetMapping("/getUserOrganizes")
public ActionResult<List<PermissionModel>> getUserOrganizes(){ public ActionResult<List<PermissionModel>> getUserOrganizes() {
return ActionResult.success(userRelationService.getObjectVoList(PermissionConst.ORGANIZE)); return ActionResult.success(userRelationService.getObjectVoList(PermissionConst.ORGANIZE));
} }
@ApiOperation("获取当前用户当前组织底下所有岗位") @ApiOperation("获取当前用户当前组织底下所有岗位")
@GetMapping("/getUserPositions") @GetMapping("/getUserPositions")
public ActionResult<List<PermissionModel>> getUserPositions(){ public ActionResult<List<PermissionModel>> getUserPositions() {
return ActionResult.success(userRelationService.getObjectVoList(PermissionConst.POSITION)); return ActionResult.success(userRelationService.getObjectVoList(PermissionConst.POSITION));
} }
@ApiOperation("获取当前用户所有角色") @ApiOperation("获取当前用户所有角色")
@GetMapping("/getUserRoles") @GetMapping("/getUserRoles")
public ActionResult<List<PermissionModel>> getUserRoles(){ public ActionResult<List<PermissionModel>> getUserRoles() {
return ActionResult.success(userRelationService.getObjectVoList(PermissionConst.ROLE)); return ActionResult.success(userRelationService.getObjectVoList(PermissionConst.ROLE));
} }

@ -102,7 +102,10 @@ public class AuthorizeServiceImpl extends ServiceImpl<AuthorizeMapper, Authorize
List<ResourceModel> resourceList = new ArrayList<>(); List<ResourceModel> resourceList = new ArrayList<>();
List<ModuleFormModel> formsList = new ArrayList<>(); List<ModuleFormModel> formsList = new ArrayList<>();
Boolean isAdmin = userInfo.getIsAdministrator(); Boolean isAdmin = userInfo.getIsAdministrator();
String majorOrgId = userService.getInfo(userInfo.getUserId()).getOrganizeId(); //modified by 巴卫 2023年01月06日 14:25
if(StringUtil.isNotNull(userInfo.getUserId())){
String majorOrgId = userService.getInfo(userInfo.getUserId()).getOrganizeId();
}
if (!isAdmin) { if (!isAdmin) {
List<String> roleIds = new ArrayList<>(); List<String> roleIds = new ArrayList<>();
roleService.getRoleIdsByCurrentUser(userInfo.getOrganizeId()).forEach(role ->{ roleService.getRoleIdsByCurrentUser(userInfo.getOrganizeId()).forEach(role ->{

@ -64,10 +64,11 @@
<el-col :span="24" > <el-col :span="24" >
<el-form-item label="仓库" <el-form-item label="仓库"
prop="warehouseId" > prop="warehouseId" >
<relationForm v-model="dataForm.warehouseId" <popupSelect v-model="dataForm.warehouseId"
placeholder="请选择" clearable field="warehouseId" modelId ="294090217084722181" :columnOptions="warehouseIdcolumnOptions" relationField="comInputField109" > placeholder="请选择" clearable field="warehouseId" interfaceId="380988259175524165" :columnOptions="warehouseIdcolumnOptions" propsValue="id" relationField="name" popupType="dialog"
popupTitle="选择数据" popupWidth="800px">
</relationForm> </popupSelect >
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" > <el-col :span="24" >
@ -171,7 +172,7 @@
], ],
}, },
unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}], unitOptions:[{"fullName":"吨","id":"0"},{"fullName":"千克","id":"1"}],
warehouseIdcolumnOptions:[ {"label":"年龄","value":"comInputField109"},], warehouseIdcolumnOptions:[ {"label":"ID","value":"id"}, {"label":"仓库号","value":"code"}, {"label":"仓库名称","value":"name"},],
} }
}, },

@ -49,7 +49,7 @@
</JNPF-UploadImg> </JNPF-UploadImg>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12" > <!-- <el-col :span="12" >
<el-form-item label="录入人" <el-form-item label="录入人"
prop="creatorusername" > prop="creatorusername" >
<el-input v-model="dataForm.creatorusername" <el-input v-model="dataForm.creatorusername"
@ -66,7 +66,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
</template> </template>
</el-form> </el-form>
</el-row> </el-row>

@ -1,260 +1,299 @@
<template> <template>
<div class="JNPF-common-layout"> <div class="JNPF-common-layout">
<div class="JNPF-common-layout-center"> <div class="JNPF-common-layout-center">
<el-row class="JNPF-common-search-box" :gutter="16"> <el-row class="JNPF-common-search-box" :gutter="16">
<el-form @submit.native.prevent> <el-form @submit.native.prevent>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="车牌号"> <el-form-item label="车牌号">
<el-input v-model="query.ticketno" placeholder="请输入" clearable> </el-input> <el-input v-model="query.ticketno" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="司机名称"> <el-form-item label="司机名称">
<el-input v-model="query.drivername" placeholder="请输入" clearable> </el-input> <el-input v-model="query.drivername" placeholder="请输入" clearable> </el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" @click="search()"></el-button> <el-button type="primary" icon="el-icon-search" @click="search()"></el-button>
<el-button icon="el-icon-refresh-right" @click="reset()"></el-button> <el-button icon="el-icon-refresh-right" @click="reset()"></el-button>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</el-row> </el-row>
<div class="JNPF-common-layout-main JNPF-flex-main"> <div class="JNPF-common-layout-main JNPF-flex-main">
<div class="JNPF-common-head"> <div class="JNPF-common-head">
<div> <div>
<el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()"> <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-download" @click="exportData()" >导出 <el-button type="text" icon="el-icon-download" @click="exportData()">
</el-button> </el-button>
<el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()" >批量删除 <el-button type="text" icon="el-icon-delete" @click="handleBatchRemoveDel()">
</el-button> </el-button>
</div> </div>
<div class="JNPF-common-head-right"> <div class="JNPF-common-head-right">
<el-tooltip effect="dark" content="刷新" placement="top"> <el-tooltip effect="dark" content="刷新" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false" <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="reset()"/> @click="reset()" />
</el-tooltip> </el-tooltip>
<screenfull isContainer/> <screenfull isContainer />
</div> </div>
</div> </div>
<JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c @selection-change="handleSelectionChange"> <JNPF-table v-loading="listLoading" :data="list" @sort-change='sortChange' has-c
<el-table-column prop="id" label="ID" width="0" align="left" @selection-change="handleSelectionChange">
/> <!-- <el-table-column prop="id" label="ID" width="0" align="left" /> -->
<el-table-column prop="ticketno" label="车牌号" width="0" align="left" <el-table-column prop="ticketno" label="车牌号" width="0" align="left" />
/> <el-table-column prop="drivername" label="司机名称" width="0" align="left" />
<el-table-column prop="drivername" label="司机名称" width="0" align="left" <el-table-column prop="contact" label="手机号" width="0" align="left" />
/> <el-table-column prop="vehiclephotos" label="车辆照片" width="0" align="left">
<el-table-column prop="contact" label="手机号" width="0" align="left"
/> <template slot-scope="scope">
<el-table-column prop="vehiclephotos" label="车辆照片" width="0" align="left" <span v-for="(item,index) in JSON.parse(scope.row.vehiclephotos)" :key="index">
/> <el-popover placement="left" trigger="click" width="300">
<el-table-column prop="creatorusername" label="录入人" width="0" align="left" <img :src="`/dev${item.url}`" width="100%" />
/> <img
<el-table-column prop="creatortime" label="创建时间" width="0" align="left" slot="reference"
/> :src="`/dev${item.url}`"
<el-table-column label="操作" fixed="right" :alt="`/dev${item.url}`"
width="100" > style="max-height: 70px;max-width: 70px; padding: 5px"
<template slot-scope="scope"> />
<el-button type="text" </el-popover>
@click="addOrUpdateHandle(scope.row.id)" >编辑 </span>
</el-button> </template>
<el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
</el-button> </el-table-column>
</template> <el-table-column prop="creatorusername" label="录入人" width="0" align="left" />
</el-table-column> <el-table-column prop="creatortime" label="创建时间" width="0" align="left" />
</JNPF-table> <el-table-column label="操作" fixed="right" width="100">
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> <template slot-scope="scope">
</div> <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">
</div> </el-button>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh"/> <el-button type="text" class="JNPF-table-delBtn" @click="handleDel(scope.row.id)">
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> </el-button>
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false"/> </template>
</div> </el-table-column>
</JNPF-table>
<pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize"
@pagination="initData" />
</div>
</div>
<JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
<ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download" />
<Detail v-if="detailVisible" ref="Detail" @refresh="detailVisible=false" />
</div>
</template> </template>
<script> <script>
import request from '@/utils/request' import request from '@/utils/request'
import {getDictionaryDataSelector} from '@/api/systemData/dictionary' import {
import JNPFForm from './Form' getDictionaryDataSelector
import ExportBox from './ExportBox' } from '@/api/systemData/dictionary'
import {getDataInterfaceRes} from '@/api/systemData/dataInterface' import JNPFForm from './Form'
import Detail from './Detail' import ExportBox from './ExportBox'
import {
getDataInterfaceRes
} from '@/api/systemData/dataInterface'
import Detail from './Detail'
export default { export default {
components: {JNPFForm, ExportBox,Detail}, components: {
data() { JNPFForm,
return { ExportBox,
detailVisible: false, Detail
query: { },
ticketno:undefined, data() {
drivername:undefined, return {
}, detailVisible: false,
treeProps: { query: {
children: 'children', ticketno: undefined,
label: 'fullName', drivername: undefined,
value: 'id' },
}, treeProps: {
list: [], children: 'children',
listLoading: true, label: 'fullName',
multipleSelection: [], total: 0, value: 'id'
listQuery: { },
currentPage: 1, list: [],
pageSize: 20, listLoading: true,
sort: "desc", multipleSelection: [],
sidx: "", total: 0,
}, listQuery: {
formVisible: false, currentPage: 1,
exportBoxVisible: false, pageSize: 20,
columnList: [ sort: "desc",
{prop: 'ticketno', label: '车牌号'}, sidx: "",
{prop: 'drivername', label: '司机名称'}, },
{prop: 'contact', label: '手机号'}, formVisible: false,
{prop: 'creatorusername', label: '录入人'}, exportBoxVisible: false,
{prop: 'creatortime', label: '创建时间'}, columnList: [{
], prop: 'ticketno',
} label: '车牌号'
}, },
computed: { {
menuId() { prop: 'drivername',
return this.$route.meta.modelId || '' label: '司机名称'
} },
}, {
created() { prop: 'contact',
this.initData() label: '手机号'
}, },
methods: { {
goDetail(id){ prop: 'creatorusername',
this.detailVisible = true label: '录入人'
this.$nextTick(() => { },
this.$refs.Detail.init(id) {
}) prop: 'creatortime',
}, label: '创建时间'
sortChange({column, prop, order}) { },
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc' ],
this.listQuery.sidx = !order ? '' : prop }
this.initData() },
}, computed: {
initData() { menuId() {
this.listLoading = true; return this.$route.meta.modelId || ''
let _query = { }
...this.listQuery, },
...this.query, created() {
menuId:this.menuId this.initData()
}; },
request({ methods: {
url: `/api/example/Vehicle/getList`, goDetail(id) {
method: 'post', this.detailVisible = true
data: _query this.$nextTick(() => {
}).then(res => { this.$refs.Detail.init(id)
var _list =[]; })
for(let i=0;i<res.data.list.length;i++){ },
let _data = res.data.list[i]; sortChange({
_list.push(_data) column,
} prop,
this.list = _list order
this.total = res.data.pagination.total }) {
this.listQuery.sort = order == 'ascending' ? 'asc' : 'desc'
this.listQuery.sidx = !order ? '' : prop
this.initData()
},
initData() {
this.listLoading = true;
let _query = {
...this.listQuery,
...this.query,
menuId: this.menuId
};
request({
url: `/api/example/Vehicle/getList`,
method: 'post',
data: _query
}).then(res => {
var _list = [];
for (let i = 0; i < res.data.list.length; i++) {
let _data = res.data.list[i];
_list.push(_data)
}
this.list = _list
this.total = res.data.pagination.total
this.listLoading = false this.listLoading = false
}) })
}, },
handleDel(id) { handleDel(id) {
this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', { this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
request({ request({
url: `/api/example/Vehicle/${id}`, url: `/api/example/Vehicle/${id}`,
method: 'DELETE' method: 'DELETE'
}).then(res => { }).then(res => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: res.msg, message: res.msg,
onClose: () => { onClose: () => {
this.initData() this.initData()
} }
}); });
}) })
}).catch(() => { }).catch(() => {});
}); },
}, handleSelectionChange(val) {
handleSelectionChange(val) { const res = val.map(item => item.id)
const res = val.map(item => item.id) this.multipleSelection = res
this.multipleSelection = res },
}, handleBatchRemoveDel() {
handleBatchRemoveDel() { if (!this.multipleSelection.length) {
if (!this.multipleSelection.length) { this.$message({
this.$message({ type: 'error',
type: 'error', message: '请选择一条数据',
message: '请选择一条数据', duration: 1500,
duration: 1500, })
}) return
return }
} const ids = this.multipleSelection.join()
const ids = this.multipleSelection.join() this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', {
this.$confirm('您确定要删除这些数据吗, 是否继续?', '提示', { type: 'warning'
type: 'warning' }).then(() => {
}).then(() => { request({
request({ url: `/api/example/Vehicle/batchRemove/${ids}`,
url: `/api/example/Vehicle/batchRemove/${ids}`, method: 'DELETE'
method: 'DELETE' }).then(res => {
}).then(res => { this.$message({
this.$message({ type: 'success',
type: 'success', message: res.msg,
message: res.msg, onClose: () => {
onClose: () => { this.initData()
this.initData() }
} });
}); })
}) }).catch(() => {})
}).catch(() => { },
}) addOrUpdateHandle(id, isDetail) {
}, this.formVisible = true
addOrUpdateHandle(id, isDetail) { this.$nextTick(() => {
this.formVisible = true this.$refs.JNPFForm.init(id, isDetail)
this.$nextTick(() => { })
this.$refs.JNPFForm.init(id, isDetail) },
}) exportData() {
}, this.exportBoxVisible = true
exportData() { this.$nextTick(() => {
this.exportBoxVisible = true this.$refs.ExportBox.init(this.columnList)
this.$nextTick(() => { })
this.$refs.ExportBox.init(this.columnList) },
}) download(data) {
}, let query = {
download(data) { ...data,
let query = {...data, ...this.listQuery, ...this.query,menuId:this.menuId} ...this.listQuery,
request({ ...this.query,
url: `/api/example/Vehicle/Actions/Export`, menuId: this.menuId
method: 'GET', }
data: query request({
}).then(res => { url: `/api/example/Vehicle/Actions/Export`,
if (!res.data.url) return method: 'GET',
this.jnpf.downloadFile(res.data.url) data: query
this.$refs.ExportBox.visible = false }).then(res => {
this.exportBoxVisible = false if (!res.data.url) return
}) this.jnpf.downloadFile(res.data.url)
}, this.$refs.ExportBox.visible = false
search() { this.exportBoxVisible = false
this.listQuery = { })
currentPage: 1, },
pageSize: 20, search() {
sort: "desc", this.listQuery = {
sidx: "", currentPage: 1,
} pageSize: 20,
this.initData() sort: "desc",
}, sidx: "",
refresh(isrRefresh) { }
this.formVisible = false this.initData()
if (isrRefresh) this.reset() },
}, refresh(isrRefresh) {
reset() { this.formVisible = false
for (let key in this.query) { if (isrRefresh) this.reset()
this.query[key] = undefined },
} reset() {
this.search() for (let key in this.query) {
} this.query[key] = undefined
} }
} this.search()
}
}
}
</script> </script>

Loading…
Cancel
Save