前端后台管理修改-1220-zzy

This commit is contained in:
zhouzy062 2023-12-20 20:29:06 +08:00
parent 5754232130
commit 57981b50af
14 changed files with 324 additions and 86 deletions

View File

@ -1,8 +1,8 @@
# 页面标题
VUE_APP_TITLE = 若依管理系统
VUE_APP_TITLE = 施工装备管理系统
# 生产环境配置
ENV = 'production'
# 若依管理系统/生产环境
VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = '/dev-api'

View File

@ -0,0 +1,42 @@
import request from '@/utils/request'
//资源图片上传
export function imgUpLoad(param){
const formData = new FormData()
formData.append('file', param.file)
formData.append('fileType', param.type)
return request({
url: '/system/sys/file/upload',
method: 'post',
data: formData,
header:'multipart/form-data'
})
}
//资源文件上传
export function fileUpLoad(param){
const formData = new FormData()
formData.append('file', param.file)
return request({
url: '/system/sys/file/upload',
method: 'post',
data: formData,
})
}

View File

@ -331,8 +331,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.typeId);
this.ids = selection.map(item => item);
console.log(this.ids)
},
/** 保存按钮操作 */
@ -342,7 +341,8 @@ export default {
if(this.chosenPropId && this.ids.length>0){
let param = {
propId:this.chosenPropId,
typeId:this.ids[0]
typeId:this.ids[0].typeId,
propName:this.ids[0].propName,
}
savePropInfo(param).then(response => {
if(response.code == 200){

View File

@ -33,7 +33,6 @@
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handlePeople"
>人员配置</el-button>
</el-col>

View File

@ -162,20 +162,20 @@
</el-form-item>
<el-form-item label="开始日期" prop="planStartTime">
<el-date-picker
style="width:100%;"
v-model="form.planStartTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="date"
placeholder="开始日期"
></el-date-picker>
</el-form-item>
<el-form-item label="租赁期限" prop="leaseDay">
<el-input-number v-model="form.leaseDay" style="width:100%;" placeholder="请输入租赁期限" controls-position="right" :min="0" />
<el-form-item label="租赁期限(天)" prop="leaseDay">
<el-input-number v-model="form.leaseDay" style="width:100%;" placeholder="请输入租赁期限(天)" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="签订日期" prop="signTime">
<el-date-picker
v-model="form.signTime"
style="width: 240px"
style="width:100%;"
value-format="yyyy-MM-dd"
type="date"
placeholder="开始日期"
@ -399,7 +399,7 @@ export default {
handleDelete(row) {
// const agreementId = row.agreementId;
let param = {
agreementId:row.agreementId
agreementId:row.agreementId+''
}
this.$modal.confirm('是否确认删除该数据项?').then(function() {
return removeAgreement(param);

View File

@ -205,6 +205,7 @@ export default {
components: { Treeselect },
data() {
return {
taskId:'',
//
loading: false,
//
@ -297,6 +298,8 @@ export default {
};
},
created() {
const taskId = this.$route.query && this.$route.query.taskId;
this.taskId = taskId;
this.getUserList()
// this.getList();
this.equipmentType();

View File

@ -28,16 +28,15 @@
v-hasPermi="['store:labelType:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['store:labelType:add']"
>发布入库</el-button>
</el-col>
</el-col> -->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="success"-->
@ -261,6 +260,11 @@ export default {
// this.reset();
// this.open = true;
// this.title = "";
},
/** 修改按钮操作 */
handleUpdate(row) {
let query = { taskId:row.taskId }
this.$router.replace({ path: "/store/newBuy/newDevicesArrival", query });
},
//
handleSelectionChange(selection) {
@ -268,17 +272,17 @@ export default {
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.$router.replace("/store/newBuy/newDevicesArrival");
// this.reset();
// const dictId = row.dictId || this.ids
// getType(dictId).then(response => {
// this.form = response.data;
// this.open = true;
// this.title = "";
// });
},
// /** */
// handleUpdate(row) {
// this.$router.replace("/store/newBuy/newDevicesArrival");
// // this.reset();
// // const dictId = row.dictId || this.ids
// // getType(dictId).then(response => {
// // this.form = response.data;
// // this.open = true;
// // this.title = "";
// // });
// },
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {

View File

@ -66,7 +66,7 @@
v-hasPermi="['system:dept:edit']"
>编辑</el-button>
<el-button
v-if="scope.row.deptId != 0"
v-if="scope.row.parentId != 0"
size="mini"
type="text"
icon="el-icon-delete"
@ -90,8 +90,8 @@
<el-row>
<el-col :span="24">
<el-form-item label="上级组织" prop="deptId">
<treeselect v-model="form.deptId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
<el-form-item label="上级组织" prop="parentId">
<treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="选择上级部门" />
</el-form-item>
</el-col>
</el-row>
@ -148,7 +148,7 @@ export default {
data() {
return {
//
loading: true,
loading: false,
//
showSearch: true,
//
@ -172,7 +172,7 @@ export default {
form: {},
//
rules: {
deptId: [
parentId: [
{ required: true, message: "上级部门不能为空", trigger: "blur" }
],
houseName: [
@ -181,13 +181,14 @@ export default {
sort: [
{ required: true, message: "显示排序不能为空", trigger: "blur" }
],
phone: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
trigger: "blur"
}
]
// phone: [
// { required: true, message: "", trigger: "blur" },
// // {
// // pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
// // message: "",
// // trigger: "blur"
// // }
// ]
}
};
},
@ -200,7 +201,7 @@ export default {
this.loading = true;
listHouse(this.queryParams).then(response => {
console.log(response)
this.houseList = this.handleTree(response.rows, "houseId");
this.houseList = this.handleTree(response.data, "houseId");
this.loading = false;
});
},
@ -224,7 +225,7 @@ export default {
reset() {
this.form = {
houseId: undefined,
deptId: undefined,
parentId: undefined,
houseName: undefined,
sort: undefined,
concat: undefined,
@ -247,12 +248,12 @@ export default {
handleAdd(row) {
this.reset();
if (row != undefined) {
this.form.deptId = row.houseId;
this.form.parentId = row.houseId;
}
this.open = true;
this.title = "新建";
listHouse().then(response => {
this.deptOptions = this.handleTree(response.rows, "houseId");
this.deptOptions = this.handleTree(response.data, "houseId");
});
},
/** 展开/折叠操作 */

View File

@ -274,6 +274,9 @@
<script>
import {addMachine, delMachine, getMachine, listMachine, updateMachine} from "@/api/store/tools";
import { getProLists } from "@/api/base/base";
import { imgUpLoad } from "@/api/system/upload";
export default {
name: "Dict",
dicts: ['sys_normal_disable'],

View File

@ -26,10 +26,10 @@
@node-click="handleNodeClick"
/>
</div>
<div style="margin:30px;">
<!-- <div style="margin:30px;">
<el-button > </el-button>
<el-button type="primary"> </el-button>
</div>
</div> -->
</el-col>

View File

@ -26,10 +26,10 @@
@node-click="handleNodeClick"
/>
</div>
<div style="margin:30px;">
<!-- <div style="margin:30px;">
<el-button > </el-button>
<el-button type="primary"> </el-button>
</div>
</div> -->
</el-col>

View File

@ -82,7 +82,11 @@
<el-table-column label="主要联系人" align="center" prop="primaryContact" :show-overflow-tooltip="true" />
<el-table-column label="联系电话" align="center" prop="phone" :show-overflow-tooltip="true" />
<el-table-column label="主要经营范围" align="center" prop="businessScope" :show-overflow-tooltip="true" />
<el-table-column label="营业执照" align="center" prop="businessLicense" :show-overflow-tooltip="true" />
<el-table-column label="营业执照" align="center" prop="businessLicense" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span @click="openImg(scope.row.businessLicense)" style="color: #02A7F0;"> 查看 </span>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" width="180">
<template slot-scope="scope">
@ -142,6 +146,19 @@
<el-input v-model="form.businessScope" placeholder="请输入经营范围" />
</el-form-item>
<el-form-item label="营业执照" prop="businessLicense">
<el-upload
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
action="#"
:file-list="fileList"
:show-file-list="false"
list-type="picture-card"
:on-success="handleAvatarSuccess"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<!-- <img v-if="imageUrl" :src="'http://192.168.0.14:21624/system'+imageUrl" class="avatar"> -->
<img v-if="imageUrl" :src="'http://10.40.92.140:9201'+imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
<!-- <el-input v-model="form.businessLicense" placeholder="请上传营业执照" /> -->
</el-form-item>
@ -151,12 +168,17 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogVisible">
<img width="100%" :src="dialogImageUrl" alt="">
</el-dialog>
</div>
</template>
<script>
import { listSupplierInfo, getSupplierInfo, addSupplier, updateSupplier, delSupplier } from "@/api/store/tools";
import { imgUpLoad,fileUpLoad } from "@/api/system/upload";
export default {
name: "Dict",
dicts: ['sys_normal_disable'],
@ -190,6 +212,12 @@ export default {
},
//
form: {},
dialogImageUrl: '',
dialogVisible: false,
imageUrl:'',
imageName:'',
fileList:[],
field101fileList:[],
//
rules: {
dictName: [
@ -288,6 +316,48 @@ export default {
}
});
},
//
imgUpLoad(param,name,index) {
console.log(param,'image')
param.type = 'ma'
imgUpLoad(param).then(res => {
if(res.code == 200) {
this.form.businessLicense = 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")
// this.imageUrl = URL.createObjectURL(file.raw);
// console.log(this.imageUrl)
},
handleRemove(file, fileList) {
console.log(file, fileList);
console.log(this.form,'222222')
this.form.businessLicense = "";
},
//
handlePictureCardPreview(file) {
console.log(file)
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
//
openImg(url){
// this.dialogImageUrl = "http://192.168.0.14:21624/system" + url;//线
this.dialogImageUrl = "http://10.40.92.140:9201" + url;//
this.dialogVisible = true;
},
/** 删除按钮操作 */
handleDelete(row) {
const supplierIds = row.supplierId || this.ids;

View File

@ -99,10 +99,23 @@
: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="photoName" prop="photoName"
:show-overflow-tooltip="true"/>
:show-overflow-tooltip="true">
<template slot-scope="scope">
<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"/>
:show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- <a :href="'http://192.168.0.14:21624/system'+scope.row.documentUrl" style="color: #02A7F0;" :download="scope.row.documentName">{{ scope.row.documentName }}</a> -->
<a :href="'http://10.40.92.140:9201'+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="remark" prop="remark"
@ -243,21 +256,31 @@
<el-row>
<el-col :span="12">
<el-form-item label="文档资料" prop="field101">
<!-- <el-upload ref="field101" :file-list="field101fileList" action=""
:before-upload="field101BeforeUpload">
<el-upload ref="field101"
:file-list="field101fileList"
action="#" :limit='1'
:http-request="(obj) => fileUpLoad(obj,'fileUrl')"
:on-exceed="exceedFile"
>
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload> -->
</el-upload>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="图片" prop="photoName">
<el-upload
action="https://jsonplaceholder.typicode.com/posts/"
<el-upload
:http-request="(obj) => imgUpLoad(obj,'fileUrl')"
action="#"
:file-list="fileList"
:show-file-list="false"
list-type="picture-card"
:on-success="handleAvatarSuccess"
:on-preview="handlePictureCardPreview"
:on-remove="handleRemove">
<i class="el-icon-plus"></i>
<!-- <img v-if="imageUrl" :src="'http://192.168.0.14:21624/system'+imageUrl" class="avatar"> -->
<img v-if="imageUrl" :src="'http://10.40.92.140:9201'+imageUrl" style="width: 100px;height: 100px;" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>
</el-col>
@ -318,19 +341,18 @@
<!-- 配置弹窗 -->
<el-dialog :title="title" :visible.sync="configOpen" width="650px" append-to-body>
<el-form ref="form" :model="cform" :rules="crules" label-width="100px">
<el-form ref="cform" :model="cform" :rules="crules" label-width="100px">
<el-row>
<el-col :span="24">
<el-form-item label="调整前价格">
<el-input v-model="cform.price" placeholder="调整前价格"></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="调整后价格">
<!-- <el-input v-model="cform.afterPrice" type="textarea" placeholder="请输入内容"></el-input>-->
<el-input-number v-model="cform.afterPrice" style="width: 100%;" controls-position="right" :min="1" :max="1000"></el-input-number>
<el-input-number v-model="cform.leasePrice" style="width: 100%;" controls-position="right" :min="1" :max="1000"></el-input-number>
</el-form-item>
</el-col>
</el-row>
@ -338,13 +360,11 @@
<el-col :span="24">
<el-form-item label="开始使用日期">
<el-date-picker
v-model="cform.useDate"
v-model="cform.effTime"
style="width: 240px"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd HH:mm:ss"
type="datetime"
placeholder="开始使用日期"
></el-date-picker>
</el-form-item>
</el-col>
@ -377,6 +397,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
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";
export default {
name: "User",
@ -422,6 +443,13 @@ export default {
roleOptions: [],
//
form: {},
chosenTypeId:'',
leasePrice:'',
uploadHeader: process.env.VUE_APP_BASE_API,
imageUrl:'',
imageName:'',
fileList:[],
field101fileList:[],
defaultProps: {
children: "children",
label: "label"
@ -477,7 +505,7 @@ export default {
message: "请输入正确的手机号码",
trigger: "blur"
}
]
]
},
dialogImageUrl: '',
dialogVisible: false,
@ -487,13 +515,13 @@ export default {
afterPrice: "",
useDate: "",
},
crules: {
afterPrice: [
{required: true, message: "用户名称不能为空", trigger: "blur"},
crules: {
leasePrice: [
{required: true, message: "调整后价格不能为空", trigger: "blur"},
// { min: 2, max: 20, message: ' 2 20 ', trigger: 'blur' }
],
useDate: [
{required: true, message: "用户昵称不能为空", trigger: "blur"}
effTime: [
{required: true, message: "开始日期不能为空", trigger: "blur"}
],
}
};
@ -535,14 +563,6 @@ export default {
this.propList = response.rows;
});
},
//
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePictureCardPreview(file) {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
/** 查询列表 */
getList() {
this.loading = true;
@ -571,8 +591,13 @@ export default {
//
reset() {
this.form = {
photoUrl:"",
photoName:"",
documentUrl:"",
documentName:""
};
this.fileList = []
this.field101fileList = []
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -620,12 +645,15 @@ export default {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.getTreeData();
});
} else {
addMaType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.getTreeData();
});
}
}
@ -644,15 +672,103 @@ export default {
},
//
handleConfig(row) {
this.resetForm("cform");
this.chosenTypeId = row.typeId;
this.leasePrice = row.leasePrice;
this.cform.leasePrice = row.leasePrice;
this.configOpen = true;
this.title = "租赁价格调整"
},
submitConfig(){
this.configOpen = false;
let 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.configOpen = false;
},
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);
})
},
handleAvatarSuccess(res,file) {
console.log("success")
// this.imageUrl = URL.createObjectURL(file.raw);
// console.log(this.imageUrl)
},
handleRemove(file, fileList) {
console.log(file, fileList);
console.log(this.form,'222222')
this.form.photoUrl = "";
this.form.photoName = "";
},
//
handlePictureCardPreview(file) {
console.log(file)
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
//
openImg(url){
// this.dialogImageUrl = "http://192.168.0.14:21624/system" + url;//线
this.dialogImageUrl = "http://10.40.92.140:9201" + url;//
this.dialogVisible = true;
},
//
fileUpLoad(param,name,index) {
// // console.log(param)
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.form)
}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} 个文件`
);
},
/** 导出按钮操作 */
handleExport() {
this.download('system/user/export', {

View File

@ -84,7 +84,7 @@
<el-table-column label="岗位编号" align="center" prop="postId" />
<el-table-column label="岗位编码" align="center" prop="postCode" />
<el-table-column label="岗位名称" align="center" prop="postName" />
<el-table-column label="岗位排序" align="center" prop="postSort" />
<!-- <el-table-column label="岗位排序" align="center" prop="postSort" /> -->
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
@ -132,9 +132,9 @@
<el-form-item label="岗位编码" prop="postCode">
<el-input v-model="form.postCode" placeholder="请输入编码名称" />
</el-form-item>
<el-form-item label="岗位顺序" prop="postSort">
<!-- <el-form-item label="岗位顺序" prop="postSort">
<el-input-number v-model="form.postSort" controls-position="right" :min="0" />
</el-form-item>
</el-form-item> -->
<el-form-item label="岗位状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio