Merge remote-tracking branch 'origin/anhui-mall-ui-test' into anhui-mall-ui-test
This commit is contained in:
commit
a3adf2cea9
|
|
@ -0,0 +1,95 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 获取机构树形列表
|
||||
export function listOrgTree(query) {
|
||||
return request({
|
||||
url: '/system/newDept/org/treeList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 获取机构树(用于部门管理左侧)
|
||||
export function listOrgTreeSimple() {
|
||||
return request({
|
||||
url: '/system/newDept/org/tree',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据机构获取部门列表
|
||||
export function listDeptByOrg(orgId, query) {
|
||||
return request({
|
||||
url: `/system/newDept/dept/list/${orgId}`,
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 新增机构
|
||||
export function addOrg(data) {
|
||||
return request({
|
||||
url: '/system/newDept/org',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改机构
|
||||
export function updateOrg(data) {
|
||||
return request({
|
||||
url: '/system/newDept/org',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除机构
|
||||
export function deleteOrg(orgId) {
|
||||
return request({
|
||||
url: `/system/newDept/org/${orgId}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增部门
|
||||
export function addDept(data) {
|
||||
return request({
|
||||
url: '/system/newDept/dept',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
export function updateDept(data) {
|
||||
return request({
|
||||
url: '/system/newDept/dept',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export function deleteDept(deptId) {
|
||||
return request({
|
||||
url: `/system/newDept/dept/${deptId}`,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导入机构
|
||||
export function importOrg() {
|
||||
return request({
|
||||
url: '/system/newDept/org/import',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
// 导入部门
|
||||
export function importDept() {
|
||||
return request({
|
||||
url: '/system/newDept/dept/import',
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
|
@ -164,6 +164,13 @@ export function confirmPassword(password) {
|
|||
data:data
|
||||
})
|
||||
}
|
||||
// 根据组织ID获取部门列表(树形结构)
|
||||
export function listDeptByOrgId(orgId) {
|
||||
return request({
|
||||
url: `/system/newDept/dept/list/${orgId}`,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@
|
|||
&:hover {
|
||||
background-color: rgba(0, 0, 0, 0.06) !important;
|
||||
border: 1px solid $base-menu-color-active !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -389,6 +389,9 @@
|
|||
<i class="el-icon-view"></i> 查看
|
||||
</el-button>
|
||||
<el-button type="text" icon="el-icon-edit" @click="onHandleEdit(scope.row)"> 编辑 </el-button>
|
||||
<el-button type="text" icon="el-icon-delete" @click="onHandleDelete(scope.row)" style="color: red">
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -1508,8 +1511,6 @@ export default {
|
|||
if (res.code === 200) {
|
||||
this.$message.success('删除成功')
|
||||
this.getDeviceList()
|
||||
} else {
|
||||
this.$message.error(res.msg || '删除失败')
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.error('删除失败:' + (error.message || '未知错误'))
|
||||
|
|
|
|||
|
|
@ -79,16 +79,22 @@
|
|||
<span style="font-size: 20px; font-weight: 800">装备上下架列表</span>
|
||||
</el-col>
|
||||
<el-col :span="20" >
|
||||
<el-button
|
||||
<el-tooltip
|
||||
placement="top-start"
|
||||
content="请选择需要下架的装备后再操作"
|
||||
:disabled.sync="selectedRows.length !== 0"
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
class="primary-lease"
|
||||
@click="handleBatchDown"
|
||||
style="float: right;margin-right: 10px"
|
||||
:disabled="selectedRows.length === 0"
|
||||
>
|
||||
>
|
||||
批量下架
|
||||
</el-button>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
|
||||
<el-button style="float: right;margin-right: 10px" size="mini" @click="equipment" type="primary" class="primary-lease">
|
||||
添加上架装备
|
||||
|
|
|
|||
|
|
@ -76,6 +76,11 @@
|
|||
<span style="font-size: 20px; font-weight: 800">工具上下架列表</span>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-tooltip
|
||||
placement="top-start"
|
||||
content="请选择需要下架的工具后再操作"
|
||||
:disabled.sync="selectedRows.length !== 0"
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
|
|
@ -86,7 +91,7 @@
|
|||
>
|
||||
批量下架
|
||||
</el-button>
|
||||
|
||||
</el-tooltip>
|
||||
<el-button size="mini" style="float: right;margin-right: 10px" @click="numberTool" type="primary" class="primary-lease">
|
||||
上架数量工具
|
||||
</el-button>
|
||||
|
|
|
|||
|
|
@ -209,10 +209,10 @@ export default {
|
|||
},
|
||||
label: {
|
||||
normal: {
|
||||
show: false,
|
||||
show: true,
|
||||
fontSize: 12,
|
||||
fontWeight: 500,
|
||||
color: 'rgba(255,255,255,0.5)',
|
||||
color: 'rgba(255,255,255,0.8)',
|
||||
},
|
||||
emphasis: {
|
||||
show: true,
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ export default {
|
|||
{
|
||||
cityName: '北京市',
|
||||
deptName: '北京',
|
||||
value: [116.407396, 39.9042, 350000000],
|
||||
totalValue: 350000000,
|
||||
value: [116.407396, 39.9042, 3500],
|
||||
totalValue: 3500,
|
||||
totalEquipmentQuantity: 520,
|
||||
configRate: 92,
|
||||
lineNum: 80,
|
||||
|
|
@ -45,8 +45,8 @@ export default {
|
|||
{
|
||||
cityName: '天津市',
|
||||
deptName: '天津',
|
||||
value: [117.190182, 39.125596, 260000000],
|
||||
totalValue: 260000000,
|
||||
value: [117.190182, 39.125596, 2600],
|
||||
totalValue: 2600,
|
||||
totalEquipmentQuantity: 480,
|
||||
configRate: 90,
|
||||
lineNum: 70,
|
||||
|
|
@ -56,8 +56,8 @@ export default {
|
|||
{
|
||||
cityName: '上海市',
|
||||
deptName: '上海',
|
||||
value: [121.472644, 31.231706, 420000000],
|
||||
totalValue: 420000000,
|
||||
value: [121.472644, 31.231706, 4200],
|
||||
totalValue: 4200,
|
||||
totalEquipmentQuantity: 600,
|
||||
configRate: 95,
|
||||
lineNum: 88,
|
||||
|
|
@ -67,8 +67,8 @@ export default {
|
|||
{
|
||||
cityName: '重庆市',
|
||||
deptName: '重庆',
|
||||
value: [106.551556, 29.563009, 300000000],
|
||||
totalValue: 300000000,
|
||||
value: [106.551556, 29.563009, 3000],
|
||||
totalValue: 3000,
|
||||
totalEquipmentQuantity: 510,
|
||||
configRate: 91,
|
||||
lineNum: 75,
|
||||
|
|
@ -79,8 +79,8 @@ export default {
|
|||
{
|
||||
cityName: '石家庄市',
|
||||
deptName: '石家庄',
|
||||
value: [114.514859, 38.042307, 230000000],
|
||||
totalValue: 230000000,
|
||||
value: [114.514859, 38.042307, 2300],
|
||||
totalValue: 2300,
|
||||
totalEquipmentQuantity: 450,
|
||||
configRate: 89,
|
||||
lineNum: 68,
|
||||
|
|
@ -90,8 +90,8 @@ export default {
|
|||
{
|
||||
cityName: '太原市',
|
||||
deptName: '太原',
|
||||
value: [112.548879, 37.87059, 210000000],
|
||||
totalValue: 210000000,
|
||||
value: [112.548879, 37.87059, 2100],
|
||||
totalValue: 2100,
|
||||
totalEquipmentQuantity: 430,
|
||||
configRate: 88,
|
||||
lineNum: 60,
|
||||
|
|
@ -101,8 +101,8 @@ export default {
|
|||
{
|
||||
cityName: '沈阳市',
|
||||
deptName: '沈阳',
|
||||
value: [123.431474, 41.805698, 240000000],
|
||||
totalValue: 240000000,
|
||||
value: [123.431474, 41.805698, 2400],
|
||||
totalValue: 2400,
|
||||
totalEquipmentQuantity: 455,
|
||||
configRate: 89,
|
||||
lineNum: 66,
|
||||
|
|
@ -112,8 +112,8 @@ export default {
|
|||
{
|
||||
cityName: '长春市',
|
||||
deptName: '长春',
|
||||
value: [125.323544, 43.817072, 205000000],
|
||||
totalValue: 205000000,
|
||||
value: [125.323544, 43.817072, 2050],
|
||||
totalValue: 2050,
|
||||
totalEquipmentQuantity: 410,
|
||||
configRate: 87,
|
||||
lineNum: 58,
|
||||
|
|
@ -123,8 +123,8 @@ export default {
|
|||
{
|
||||
cityName: '哈尔滨市',
|
||||
deptName: '哈尔滨',
|
||||
value: [126.534967, 45.803775, 260000000],
|
||||
totalValue: 260000000,
|
||||
value: [126.534967, 45.803775, 2600],
|
||||
totalValue: 2600,
|
||||
totalEquipmentQuantity: 470,
|
||||
configRate: 90,
|
||||
lineNum: 72,
|
||||
|
|
@ -135,8 +135,8 @@ export default {
|
|||
{
|
||||
cityName: '南京市',
|
||||
deptName: '南京',
|
||||
value: [118.796877, 32.060255, 380000000],
|
||||
totalValue: 380000000,
|
||||
value: [118.796877, 32.060255, 3800],
|
||||
totalValue: 3800,
|
||||
totalEquipmentQuantity: 580,
|
||||
configRate: 94,
|
||||
lineNum: 85,
|
||||
|
|
@ -146,8 +146,8 @@ export default {
|
|||
{
|
||||
cityName: '杭州市',
|
||||
deptName: '杭州',
|
||||
value: [120.15507, 30.274084, 360000000],
|
||||
totalValue: 360000000,
|
||||
value: [120.15507, 30.274084, 3600],
|
||||
totalValue: 3600,
|
||||
totalEquipmentQuantity: 540,
|
||||
configRate: 93,
|
||||
lineNum: 82,
|
||||
|
|
@ -157,8 +157,8 @@ export default {
|
|||
{
|
||||
cityName: '合肥市',
|
||||
deptName: '合肥',
|
||||
value: [117.227239, 31.820586, 280000000],
|
||||
totalValue: 280000000,
|
||||
value: [117.227239, 31.820586, 2800],
|
||||
totalValue: 2800,
|
||||
totalEquipmentQuantity: 520,
|
||||
configRate: 92,
|
||||
lineNum: 80,
|
||||
|
|
@ -168,8 +168,8 @@ export default {
|
|||
{
|
||||
cityName: '福州市',
|
||||
deptName: '福州',
|
||||
value: [119.296494, 26.074508, 250000000],
|
||||
totalValue: 250000000,
|
||||
value: [119.296494, 26.074508, 2500],
|
||||
totalValue: 2500,
|
||||
totalEquipmentQuantity: 485,
|
||||
configRate: 90,
|
||||
lineNum: 74,
|
||||
|
|
@ -179,8 +179,8 @@ export default {
|
|||
{
|
||||
cityName: '南昌市',
|
||||
deptName: '南昌',
|
||||
value: [115.892151, 28.676493, 240000000],
|
||||
totalValue: 240000000,
|
||||
value: [115.892151, 28.676493, 2400],
|
||||
totalValue: 2400,
|
||||
totalEquipmentQuantity: 465,
|
||||
configRate: 89,
|
||||
lineNum: 70,
|
||||
|
|
@ -190,8 +190,8 @@ export default {
|
|||
{
|
||||
cityName: '济南市',
|
||||
deptName: '济南',
|
||||
value: [117.000923, 36.675807, 310000000],
|
||||
totalValue: 310000000,
|
||||
value: [117.000923, 36.675807, 3100],
|
||||
totalValue: 3100,
|
||||
totalEquipmentQuantity: 550,
|
||||
configRate: 93,
|
||||
lineNum: 84,
|
||||
|
|
@ -202,8 +202,8 @@ export default {
|
|||
{
|
||||
cityName: '郑州市',
|
||||
deptName: '郑州',
|
||||
value: [113.625368, 34.746599, 330000000],
|
||||
totalValue: 330000000,
|
||||
value: [113.625368, 34.746599, 3300],
|
||||
totalValue: 3300,
|
||||
totalEquipmentQuantity: 560,
|
||||
configRate: 94,
|
||||
lineNum: 86,
|
||||
|
|
@ -213,8 +213,8 @@ export default {
|
|||
{
|
||||
cityName: '武汉市',
|
||||
deptName: '武汉',
|
||||
value: [114.305393, 30.593099, 340000000],
|
||||
totalValue: 340000000,
|
||||
value: [114.305393, 30.593099, 3400],
|
||||
totalValue: 3400,
|
||||
totalEquipmentQuantity: 570,
|
||||
configRate: 94,
|
||||
lineNum: 87,
|
||||
|
|
@ -224,8 +224,8 @@ export default {
|
|||
{
|
||||
cityName: '长沙市',
|
||||
deptName: '长沙',
|
||||
value: [112.938814, 28.228209, 290000000],
|
||||
totalValue: 290000000,
|
||||
value: [112.938814, 28.228209, 2900],
|
||||
totalValue: 2900,
|
||||
totalEquipmentQuantity: 530,
|
||||
configRate: 92,
|
||||
lineNum: 78,
|
||||
|
|
@ -236,8 +236,8 @@ export default {
|
|||
{
|
||||
cityName: '广州市',
|
||||
deptName: '广州',
|
||||
value: [113.264435, 23.129163, 420000000],
|
||||
totalValue: 420000000,
|
||||
value: [113.264435, 23.129163, 4200],
|
||||
totalValue: 4200,
|
||||
totalEquipmentQuantity: 600,
|
||||
configRate: 95,
|
||||
lineNum: 90,
|
||||
|
|
@ -247,8 +247,8 @@ export default {
|
|||
{
|
||||
cityName: '海口市',
|
||||
deptName: '海口',
|
||||
value: [110.33119, 20.031971, 200000000],
|
||||
totalValue: 200000000,
|
||||
value: [110.33119, 20.031971, 2000],
|
||||
totalValue: 2000,
|
||||
totalEquipmentQuantity: 400,
|
||||
configRate: 86,
|
||||
lineNum: 55,
|
||||
|
|
@ -259,8 +259,8 @@ export default {
|
|||
{
|
||||
cityName: '成都市',
|
||||
deptName: '成都',
|
||||
value: [104.065735, 30.659462, 390000000],
|
||||
totalValue: 390000000,
|
||||
value: [104.065735, 30.659462, 3900],
|
||||
totalValue: 3900,
|
||||
totalEquipmentQuantity: 580,
|
||||
configRate: 94,
|
||||
lineNum: 83,
|
||||
|
|
@ -270,8 +270,8 @@ export default {
|
|||
{
|
||||
cityName: '贵阳市',
|
||||
deptName: '贵阳',
|
||||
value: [106.630153, 26.647661, 210000000],
|
||||
totalValue: 210000000,
|
||||
value: [106.630153, 26.647661, 2100],
|
||||
totalValue: 2100,
|
||||
totalEquipmentQuantity: 440,
|
||||
configRate: 88,
|
||||
lineNum: 62,
|
||||
|
|
@ -281,8 +281,8 @@ export default {
|
|||
{
|
||||
cityName: '昆明市',
|
||||
deptName: '昆明',
|
||||
value: [102.833722, 24.88149, 220000000],
|
||||
totalValue: 220000000,
|
||||
value: [102.833722, 24.88149, 2200],
|
||||
totalValue: 2200,
|
||||
totalEquipmentQuantity: 450,
|
||||
configRate: 88,
|
||||
lineNum: 63,
|
||||
|
|
@ -292,8 +292,8 @@ export default {
|
|||
{
|
||||
cityName: '西安市',
|
||||
deptName: '西安',
|
||||
value: [108.93977, 34.341574, 300000000],
|
||||
totalValue: 300000000,
|
||||
value: [108.93977, 34.341574, 3000],
|
||||
totalValue: 3000,
|
||||
totalEquipmentQuantity: 525,
|
||||
configRate: 92,
|
||||
lineNum: 76,
|
||||
|
|
@ -304,8 +304,8 @@ export default {
|
|||
{
|
||||
cityName: '兰州市',
|
||||
deptName: '兰州',
|
||||
value: [103.834304, 36.061089, 180000000],
|
||||
totalValue: 180000000,
|
||||
value: [103.834304, 36.061089, 1800],
|
||||
totalValue: 1800,
|
||||
totalEquipmentQuantity: 390,
|
||||
configRate: 85,
|
||||
lineNum: 54,
|
||||
|
|
@ -315,8 +315,8 @@ export default {
|
|||
{
|
||||
cityName: '西宁市',
|
||||
deptName: '西宁',
|
||||
value: [101.777795, 36.617134, 150000000],
|
||||
totalValue: 150000000,
|
||||
value: [101.777795, 36.617134, 1500],
|
||||
totalValue: 1500,
|
||||
totalEquipmentQuantity: 350,
|
||||
configRate: 84,
|
||||
lineNum: 50,
|
||||
|
|
@ -326,8 +326,8 @@ export default {
|
|||
{
|
||||
cityName: '台北市',
|
||||
deptName: '台北',
|
||||
value: [121.565418, 25.033964, 300000000],
|
||||
totalValue: 300000000,
|
||||
value: [121.565418, 25.033964, 3000],
|
||||
totalValue: 3000,
|
||||
totalEquipmentQuantity: 520,
|
||||
configRate: 92,
|
||||
lineNum: 78,
|
||||
|
|
@ -338,8 +338,8 @@ export default {
|
|||
{
|
||||
cityName: '呼和浩特市',
|
||||
deptName: '呼和浩特',
|
||||
value: [111.75199, 40.84149, 160000000],
|
||||
totalValue: 160000000,
|
||||
value: [111.75199, 40.84149, 1600],
|
||||
totalValue: 1600,
|
||||
totalEquipmentQuantity: 360,
|
||||
configRate: 84,
|
||||
lineNum: 52,
|
||||
|
|
@ -349,8 +349,8 @@ export default {
|
|||
{
|
||||
cityName: '南宁市',
|
||||
deptName: '南宁',
|
||||
value: [108.366543, 22.817002, 210000000],
|
||||
totalValue: 210000000,
|
||||
value: [108.366543, 22.817002, 2100],
|
||||
totalValue: 2100,
|
||||
totalEquipmentQuantity: 440,
|
||||
configRate: 88,
|
||||
lineNum: 62,
|
||||
|
|
@ -360,8 +360,8 @@ export default {
|
|||
{
|
||||
cityName: '拉萨市',
|
||||
deptName: '拉萨',
|
||||
value: [91.171924, 29.652491, 120000000],
|
||||
totalValue: 120000000,
|
||||
value: [91.171924, 29.652491, 1200],
|
||||
totalValue: 1200,
|
||||
totalEquipmentQuantity: 300,
|
||||
configRate: 82,
|
||||
lineNum: 40,
|
||||
|
|
@ -371,8 +371,8 @@ export default {
|
|||
{
|
||||
cityName: '银川市',
|
||||
deptName: '银川',
|
||||
value: [106.278179, 38.46637, 150000000],
|
||||
totalValue: 150000000,
|
||||
value: [106.278179, 38.46637, 1500],
|
||||
totalValue: 1500,
|
||||
totalEquipmentQuantity: 340,
|
||||
configRate: 83,
|
||||
lineNum: 48,
|
||||
|
|
@ -382,8 +382,8 @@ export default {
|
|||
{
|
||||
cityName: '乌鲁木齐市',
|
||||
deptName: '乌鲁木齐',
|
||||
value: [87.616848, 43.825592, 190000000],
|
||||
totalValue: 190000000,
|
||||
value: [87.616848, 43.825592, 1900],
|
||||
totalValue: 1900,
|
||||
totalEquipmentQuantity: 380,
|
||||
configRate: 85,
|
||||
lineNum: 55,
|
||||
|
|
@ -394,8 +394,8 @@ export default {
|
|||
{
|
||||
cityName: '香港',
|
||||
deptName: '香港',
|
||||
value: [114.173355, 22.320048, 250000000],
|
||||
totalValue: 250000000,
|
||||
value: [114.173355, 22.320048, 2500],
|
||||
totalValue: 2500,
|
||||
totalEquipmentQuantity: 420,
|
||||
configRate: 88,
|
||||
lineNum: 65,
|
||||
|
|
@ -405,8 +405,8 @@ export default {
|
|||
{
|
||||
cityName: '澳门',
|
||||
deptName: '澳门',
|
||||
value: [113.54909, 22.198951, 160000000],
|
||||
totalValue: 160000000,
|
||||
value: [113.54909, 22.198951, 1600],
|
||||
totalValue: 1600,
|
||||
totalEquipmentQuantity: 330,
|
||||
configRate: 83,
|
||||
lineNum: 48,
|
||||
|
|
@ -717,7 +717,7 @@ export default {
|
|||
// console.log('🚀 ~ initChart ~ params:', params)
|
||||
const val = params.data.value || []
|
||||
let unit = ''
|
||||
if (this.btnIndex === 1) unit = '亿'
|
||||
if (this.btnIndex === 1) unit = '万元'
|
||||
else if (this.btnIndex === 2) unit = '台'
|
||||
else if (this.btnIndex === 3) unit = '%'
|
||||
return val.length
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ export default {
|
|||
animationEasingUpdate: 'cubicInOut', // 过渡动画的缓动效果。[ default: cubicInOut ]
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
show: true,
|
||||
color: '#FFF',
|
||||
position: 'top',
|
||||
fontSize: 18,
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ export default {
|
|||
animationEasingUpdate: 'cubicInOut', // 过渡动画的缓动效果。[ default: cubicInOut ]
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
show: true,
|
||||
color: '#FFF',
|
||||
position: 'top',
|
||||
fontSize: 18,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
label-width="120px"
|
||||
ref="formRef"
|
||||
style="padding: 12px; overflow-y: auto; height: calc(100vh - 180px); width: 100%"
|
||||
label-position="right"
|
||||
:model="form"
|
||||
:rules="equipRules"
|
||||
>
|
||||
|
|
@ -96,10 +95,12 @@
|
|||
clearable
|
||||
:disabled="isEdit"
|
||||
/>
|
||||
<!-- <div class="select-box">
|
||||
<div class="no-data">暂无数据</div>
|
||||
</div> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="规格型号" prop="specificationModel">
|
||||
<el-input
|
||||
|
|
@ -160,8 +161,7 @@
|
|||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="下次维保日期" prop="nextMaintenanceDate">
|
||||
<el-date-picker
|
||||
|
|
@ -212,8 +212,7 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="24">
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购日期" prop="purchaseDate">
|
||||
<el-date-picker
|
||||
|
|
@ -517,10 +516,10 @@ export default {
|
|||
// manageType: [{ required: true, message: '请选择管理方式', trigger: 'change' }],
|
||||
count: [{ required: true, message: '请输入装备数量', trigger: 'blur' }],
|
||||
unit: [{ required: true, message: '请输入计数单位', trigger: 'blur' }],
|
||||
purchaseDate: [{ required: true, message: '请选择采购日期', trigger: 'change' }],
|
||||
certificateList: [{ required: true, message: '请上传合格证', trigger: 'change' }],
|
||||
inspectionList: [{ required: true, message: '请上传检测证书', trigger: 'change' }],
|
||||
mainFileList: [{ required: true, message: '请上传图片', trigger: 'change' }],
|
||||
// purchaseDate: [{ required: true, message: '请选择采购日期', trigger: 'change' }],
|
||||
// certificateList: [{ required: true, message: '请上传合格证', trigger: 'change' }],
|
||||
// inspectionList: [{ required: true, message: '请上传检测证书', trigger: 'change' }],
|
||||
// mainFileList: [{ required: true, message: '请上传图片', trigger: 'change' }],
|
||||
},
|
||||
propertyVoList: [], // 特征属性集合
|
||||
}
|
||||
|
|
@ -757,8 +756,8 @@ export default {
|
|||
console.log('🚀 ~ handleSubmit ~ certificates:', certificates)
|
||||
} else {
|
||||
// 提示
|
||||
this.$message.error('请上传合格证')
|
||||
return
|
||||
// this.$message.error('请上传合格证')
|
||||
// return
|
||||
}
|
||||
if (this.form.inspectionList) {
|
||||
const arr = this.form.inspectionList.split(',')
|
||||
|
|
@ -772,8 +771,8 @@ export default {
|
|||
console.log('🚀 ~ handleSubmit ~ inspectionReports:', inspectionReports)
|
||||
} else {
|
||||
// 提示
|
||||
this.$message.error('请上传检测证书')
|
||||
return
|
||||
// this.$message.error('请上传检测证书')
|
||||
// return
|
||||
}
|
||||
if (this.form.purchaseInvoices) {
|
||||
const arr = this.form.purchaseInvoices.split(',')
|
||||
|
|
@ -944,4 +943,28 @@ export default {
|
|||
::v-deep .el-input-number.is-without-controls .el-input__inner {
|
||||
text-align: left;
|
||||
}
|
||||
.select-box {
|
||||
width: 100%;
|
||||
height: 260px;
|
||||
border: 1px solid #dcdcdc;
|
||||
margin-top: 5px;
|
||||
padding: 5px;
|
||||
position: absolute;
|
||||
background-color: #fff;
|
||||
z-index: 999;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
border-radius: 4px;
|
||||
|
||||
.no-data {
|
||||
// 居中显示
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
color: #C0C4CC;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,527 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
>
|
||||
<el-card class="search-box">
|
||||
<el-row style="height: 32px;">
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input
|
||||
v-model="queryParams.deptName"
|
||||
placeholder="请输入部门名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="部门状态"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button
|
||||
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-card>
|
||||
</el-form>
|
||||
|
||||
<el-card class="content-box">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<div class="action-bar">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:dept:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-sort"
|
||||
size="mini"
|
||||
@click="toggleExpandAll"
|
||||
>展开/折叠
|
||||
</el-button>
|
||||
</el-col>
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</div>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-if="refreshTable"
|
||||
v-loading="loading"
|
||||
:data="deptList"
|
||||
row-key="deptId"
|
||||
:default-expand-all="isExpandAll"
|
||||
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
||||
height="546"
|
||||
>
|
||||
<el-table-column
|
||||
prop="deptName"
|
||||
label="部门名称"
|
||||
min-width="260"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="orderNum"
|
||||
label="排序"
|
||||
min-width="200"
|
||||
></el-table-column>
|
||||
<el-table-column prop="status" label="状态" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag
|
||||
:options="dict.type.sys_normal_disable"
|
||||
:value="scope.row.status"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
min-width="200"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
min-width="200"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:dept:edit']"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-plus"
|
||||
@click="handleAdd(scope.row)"
|
||||
v-hasPermi="['system:dept:add']"
|
||||
>新增
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.parentId != 0"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:dept:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加或修改部门对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="600px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="24" v-if="form.parentId !== 0">
|
||||
<el-form-item label="上级部门" prop="parentId">
|
||||
<treeselect
|
||||
v-model="form.parentId"
|
||||
:options="deptOptions"
|
||||
:normalizer="normalizer"
|
||||
placeholder="选择上级部门"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门名称" prop="deptName">
|
||||
<el-input
|
||||
v-model="form.deptName"
|
||||
placeholder="请输入部门名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="显示排序" prop="orderNum">
|
||||
<el-input-number
|
||||
v-model="form.orderNum"
|
||||
controls-position="right"
|
||||
:min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="负责人" prop="leader">
|
||||
<el-input
|
||||
v-model="form.leader"
|
||||
placeholder="请输入负责人"
|
||||
maxlength="20"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="form.phone"
|
||||
placeholder="请输入联系电话"
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
<el-input
|
||||
v-model="form.email"
|
||||
placeholder="请输入邮箱"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="部门状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div v-if="config.addAddress || false">
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="省" prop="province">
|
||||
<el-input
|
||||
v-model="form.province"
|
||||
placeholder="请输入省份"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="市" prop="city">
|
||||
<el-input
|
||||
v-model="form.city"
|
||||
placeholder="请输入市"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="县" prop="district">
|
||||
<el-input
|
||||
v-model="form.district"
|
||||
placeholder="请输入县"
|
||||
maxlength="50"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input
|
||||
v-model="form.address"
|
||||
type="textarea"
|
||||
maxlength="200"
|
||||
show-word-limit
|
||||
placeholder="请输入详细地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listDept,
|
||||
getDept,
|
||||
delDept,
|
||||
addDept,
|
||||
updateDept,
|
||||
listDeptExcludeChild,
|
||||
} from '@/api/system/dept'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||
|
||||
export default {
|
||||
name: 'Dept',
|
||||
computed: {
|
||||
config() {
|
||||
return JSON.parse(localStorage.getItem('systemConfig')) // 获取 JSON 对象
|
||||
},
|
||||
},
|
||||
dicts: ['sys_normal_disable'],
|
||||
components: { Treeselect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 表格树数据
|
||||
deptList: [],
|
||||
// 部门树选项
|
||||
deptOptions: [],
|
||||
// 弹出层标题
|
||||
title: '',
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 是否展开,默认全部展开
|
||||
isExpandAll: true,
|
||||
// 重新渲染表格状态
|
||||
refreshTable: true,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
deptName: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
parentId: [
|
||||
{
|
||||
required: true,
|
||||
message: '上级部门不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
deptName: [
|
||||
{
|
||||
required: true,
|
||||
message: '部门名称不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
orderNum: [
|
||||
{
|
||||
required: true,
|
||||
message: '显示排序不能为空',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
email: [
|
||||
{
|
||||
type: 'email',
|
||||
message: '请输入正确的邮箱地址',
|
||||
trigger: ['blur', 'change'],
|
||||
},
|
||||
],
|
||||
phone: [
|
||||
{
|
||||
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
|
||||
message: '请输入正确的手机号码',
|
||||
trigger: 'blur',
|
||||
},
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 查询部门列表 */
|
||||
getList() {
|
||||
this.loading = true
|
||||
listDept(this.queryParams).then((response) => {
|
||||
this.deptList = this.handleTree(response.data, 'deptId')
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/** 转换部门数据结构 */
|
||||
normalizer(node) {
|
||||
if (node.children && !node.children.length) {
|
||||
delete node.children
|
||||
}
|
||||
return {
|
||||
id: node.deptId,
|
||||
label: node.deptName,
|
||||
children: node.children,
|
||||
}
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false
|
||||
this.reset()
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
deptId: undefined,
|
||||
parentId: undefined,
|
||||
deptName: undefined,
|
||||
orderNum: undefined,
|
||||
leader: undefined,
|
||||
phone: undefined,
|
||||
email: undefined,
|
||||
status: '0',
|
||||
}
|
||||
this.resetForm('form')
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.handleQuery()
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd(row) {
|
||||
this.reset()
|
||||
if (row != undefined) {
|
||||
this.form.parentId = row.deptId
|
||||
}
|
||||
this.open = true
|
||||
this.title = '添加部门'
|
||||
listDept().then((response) => {
|
||||
this.deptOptions = this.handleTree(response.data, 'deptId')
|
||||
})
|
||||
},
|
||||
/** 展开/折叠操作 */
|
||||
toggleExpandAll() {
|
||||
this.refreshTable = false
|
||||
this.isExpandAll = !this.isExpandAll
|
||||
this.$nextTick(() => {
|
||||
this.refreshTable = true
|
||||
})
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset()
|
||||
getDept(row.deptId).then((response) => {
|
||||
this.form = response.data
|
||||
this.open = true
|
||||
this.title = '修改部门'
|
||||
})
|
||||
listDeptExcludeChild(row.deptId).then((response) => {
|
||||
this.deptOptions = this.handleTree(response.data, 'deptId')
|
||||
})
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.deptId != undefined) {
|
||||
updateDept(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
addDept(this.form).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功')
|
||||
this.open = false
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal
|
||||
.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?')
|
||||
.then(function () {
|
||||
return delDept(row.deptId)
|
||||
})
|
||||
.then(() => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess('删除成功')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 新增:统一的操作栏容器样式,用于将所有按钮和工具栏放在右侧 */
|
||||
.action-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end; /* 关键:整体内容靠右对齐 */
|
||||
gap: 10px; /* 统一设置内部元素的间距 */
|
||||
width: 100%;
|
||||
|
||||
}
|
||||
|
||||
.search-box {
|
||||
margin-bottom: 20px;
|
||||
border-radius: 8px;
|
||||
padding: 0;
|
||||
|
||||
::v-deep .el-card__body {
|
||||
padding: 20px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.table-container {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-bottom: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -89,7 +89,7 @@
|
|||
</el-table>
|
||||
|
||||
<pagination
|
||||
|
||||
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
|
|
@ -196,4 +196,4 @@ export default {
|
|||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -18,7 +18,7 @@ module.exports = {
|
|||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.bonus.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.bonus.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
publicPath: process.env.VUE_APP_BASE_API == '/iws/jiju-api' ? '/iws/glweb/' : '/', // 宏源打包时无需更改
|
||||
publicPath: process.env.NODE_ENV === 'production' ? '/iws/glweb/' : '/', // 宏源打包时无需更改
|
||||
// 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
|
||||
outputDir: 'dist',
|
||||
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
|
||||
|
|
@ -40,8 +40,7 @@ module.exports = {
|
|||
// target: `http://192.168.0.110:18080`,//洪
|
||||
// target: `http://192.168.0.41:28080`,//蒋
|
||||
// target: `http://36.33.26.201:17788/proxyApi`, //测试
|
||||
target: `http://36.33.26.201:21999/prod-api`, //测试
|
||||
// target: `http://127.0.0.1:28080`,
|
||||
target: `http://36.33.26.201:21999/prod-api`, //测试
|
||||
// target: `http://192.168.137.1:18080`,//
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
|
|
|
|||
Loading…
Reference in New Issue