+
-
+
- 新增
-
+ 新增
-
+ -->
+
-
-
+
+
-
-
-
-
-
-
+
+
+
+
+
+
编码管理
数量管理
-
-
+
+
- {{ scope.row.photoName }}
+ {{ scope.row.photoName }}
-
+
- {{ scope.row.documentName }}
+ {{ scope.row.documentName }}
-
-
-
-
+
+
+
+
配置
-
+ >配置
修改
-
+ >修改
删除
-
-
-
+ >删除
@@ -140,17 +215,28 @@
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
- /> -->
+ />-->
-
+
-
+
@@ -169,7 +255,7 @@
-
+
@@ -185,30 +271,38 @@
-
+
-
+
-
+
-
-
+
-
+
-
@@ -223,10 +317,10 @@
-
+
-
+
-
+ >
点击上传
-
+ :on-remove="handleRemove"
+ >
-
+
-
-
-
-
@@ -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`)
- },
+ }
}
};
diff --git a/sgzb-ui/vue.config.js b/sgzb-ui/vue.config.js
index 08e43dcd..4f75bc61 100644
--- a/sgzb-ui/vue.config.js
+++ b/sgzb-ui/vue.config.js
@@ -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二维码扫码提供的网址-发布服务器的地址;