diff --git a/ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js b/ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js
index 16227644..26a36a5c 100644
--- a/ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js
+++ b/ALOps_sys_fe/alops-ui/src/api/device/deviceManufacturer.js
@@ -1,130 +1,50 @@
import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
+const api = '/equManufacture/'
-// 查询用户列表
-export function listUser(query) {
+// 查询详细
+export function getDict() {
return request({
- url: '/system/user/list',
- method: 'get',
- params: query
+ url: '/sys_dict',
+ method: 'get'
})
}
-// 查询用户详细
-export function getUser(userId) {
+// 查询列表
+export function list(query) {
return request({
- url: '/system/user/' + parseStrEmpty(userId),
- method: 'get'
+ url: api + 'queryByVO',
+ method: 'get',
+ params: query
})
}
-// 新增用户
-export function addUser(data) {
+// 新增
+export function add(data) {
return request({
- url: '/system/user',
+ url: api + 'add',
method: 'post',
data: data
})
}
-// 修改用户
-export function updateUser(data) {
+// 修改
+export function update(data) {
return request({
- url: '/system/user',
+ url: api + 'modify',
method: 'put',
data: data
})
}
-// 删除用户
-export function delUser(userId) {
+// 删除
+export function del(id) {
return request({
- url: '/system/user/' + userId,
+ url: api + 'delete' + id,
method: 'delete'
})
}
-// 用户密码重置
-export function resetUserPwd(userId, password) {
- const data = {
- userId,
- password
- }
- return request({
- url: '/system/user/resetPwd',
- method: 'put',
- data: data
- })
-}
-// 用户状态修改
-export function changeUserStatus(userId, status) {
- const data = {
- userId,
- status
- }
- return request({
- url: '/system/user/changeStatus',
- method: 'put',
- data: data
- })
-}
-
-// 查询用户个人信息
-export function getUserProfile() {
- return request({
- url: '/system/user/profile',
- method: 'get'
- })
-}
-
-// 修改用户个人信息
-export function updateUserProfile(data) {
- return request({
- url: '/system/user/profile',
- method: 'put',
- data: data
- })
-}
-
-// 用户密码重置
-export function updateUserPwd(oldPassword, newPassword) {
- const data = {
- oldPassword,
- newPassword
- }
- return request({
- url: '/system/user/profile/updatePwd',
- method: 'put',
- data: data
- })
-}
-
-// 用户头像上传
-export function uploadAvatar(data) {
- return request({
- url: '/system/user/profile/avatar',
- method: 'post',
- headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
- data: data
- })
-}
-
-// 查询授权角色
-export function getAuthRole(userId) {
- return request({
- url: '/system/user/authRole/' + userId,
- method: 'get'
- })
-}
-
-// 保存授权角色
-export function updateAuthRole(data) {
- return request({
- url: '/system/user/authRole',
- method: 'put',
- params: data
- })
-}
diff --git a/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js b/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js
index 26a36a5c..552dc24a 100644
--- a/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js
+++ b/ALOps_sys_fe/alops-ui/src/api/device/deviceType.js
@@ -1,6 +1,6 @@
import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";
-const api = '/equManufacture/'
+const api = '/equipmentType/'
// 查询详细
export function getDict() {
diff --git a/ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue b/ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue
index 24283014..87f3beda 100644
--- a/ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue
+++ b/ALOps_sys_fe/alops-ui/src/views/device/deviceManufacturer/index.vue
@@ -2,20 +2,18 @@
-
-
-
-
+
+
-
-
+
+
-
-
+
+
搜索
@@ -36,23 +34,23 @@
导出
-
-
-
-
-
-
+
+
+
+
+
+
- {{ parseTime(scope.row.createTime) }}
+ {{ parseTime(scope.row.CreateDate) }}
-
+
-
+
修改
删除
@@ -68,66 +66,23 @@
-
-
-
-
-
-
-
-
+
+
-
-
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ dict.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -231,23 +186,14 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
- userName: undefined,
- phonenumber: undefined,
+ name: undefined,
+ contactBy: undefined,
status: undefined,
deptId: undefined
},
- // 列信息
- columns: [
- { key: 0, label: '厂商名称', visible: true, showInSelector: true },
- { key: 1, label: '设备类型', visible: true, showInSelector: true },
- { key: 2, label: '供货商名称', visible: true, showInSelector: true },
- { key: 3, label: '联系人', visible: true, showInSelector: true }, // 👈 不在显隐选择器中出现
- { key: 4, label: '联系电话', visible: true, showInSelector: true },
-],
-
// 表单校验
rules: {
- userName: [
+ name: [
{ required: true, message: "用户名称不能为空", trigger: "blur" },
{ min: 2, max: 20, message: '用户名称长度必须介于 2 和 20 之间', trigger: 'blur' }
],
@@ -266,7 +212,7 @@ export default {
trigger: ["blur", "change"]
}
],
- phonenumber: [
+ contactBy: [
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: "请输入正确的手机号码",
@@ -332,8 +278,8 @@ export default {
// 用户状态修改
handleStatusChange(row) {
let text = row.status === "0" ? "启用" : "停用"
- this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
- return changeUserStatus(row.userId, row.status)
+ this.$modal.confirm('确认要"' + text + '""' + row.name + '"用户吗?').then(function() {
+ return changeUserStatus(row.Id, row.status)
}).then(() => {
this.$modal.msgSuccess(text + "成功")
}).catch(function() {
@@ -348,12 +294,12 @@ export default {
// 表单重置
reset() {
this.form = {
- userId: undefined,
+ Id: undefined,
deptId: undefined,
- userName: undefined,
+ name: undefined,
nickName: undefined,
password: undefined,
- phonenumber: undefined,
+ contactBy: undefined,
email: undefined,
sex: undefined,
status: "0",
@@ -378,7 +324,7 @@ export default {
},
// 多选框选中数据
handleSelectionChange(selection) {
- this.ids = selection.map(item => item.userId)
+ this.ids = selection.map(item => item.Id)
this.single = selection.length != 1
this.multiple = !selection.length
},
@@ -409,8 +355,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
- const userId = row.userId || this.ids
- getUser(userId).then(response => {
+ const Id = row.Id || this.ids
+ getUser(Id).then(response => {
this.form = response.data
this.postOptions = response.posts
this.roleOptions = response.roles
@@ -423,7 +369,7 @@ export default {
},
/** 重置密码按钮操作 */
handleResetPwd(row) {
- this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
+ this.$prompt('请输入"' + row.name + '"的新密码', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
closeOnClickModal: false,
@@ -435,21 +381,21 @@ export default {
}
},
}).then(({ value }) => {
- resetUserPwd(row.userId, value).then(response => {
+ resetUserPwd(row.Id, value).then(response => {
this.$modal.msgSuccess("修改成功,新密码是:" + value)
})
}).catch(() => {})
},
/** 分配角色操作 */
handleAuthRole: function(row) {
- const userId = row.userId
- this.$router.push("/system/user-auth/role/" + userId)
+ const Id = row.Id
+ this.$router.push("/system/user-auth/role/" + Id)
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
- if (this.form.userId != undefined) {
+ if (this.form.Id != undefined) {
updateUser(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
this.open = false
@@ -467,9 +413,9 @@ export default {
},
/** 删除按钮操作 */
handleDelete(row) {
- const userIds = row.userId || this.ids
- this.$modal.confirm('是否确认删除用户编号为"' + userIds + '"的数据项?').then(function() {
- return delUser(userIds)
+ const Ids = row.Id || this.ids
+ this.$modal.confirm('是否确认删除用户编号为"' + Ids + '"的数据项?').then(function() {
+ return delUser(Ids)
}).then(() => {
this.getList()
this.$modal.msgSuccess("删除成功")