|
|
@@ -78,7 +78,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
link
|
|
|
- @click="handleDelete(scope.row.rentalCompanyId)"
|
|
|
+ @click="handleStatus(scope.row.rentalCompanyId, '2', '启用')"
|
|
|
v-if="scope.row.releaseStatus == 1"
|
|
|
>
|
|
|
启用
|
|
|
@@ -86,7 +86,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
link
|
|
|
- @click="handleDelete(scope.row.rentalCompanyId)"
|
|
|
+ @click="handleStatus(scope.row.rentalCompanyId, '3', '废止')"
|
|
|
v-if="scope.row.releaseStatus == 2"
|
|
|
>
|
|
|
废止
|
|
|
@@ -150,19 +150,19 @@ const handleAdd = () => {
|
|
|
};
|
|
|
const searchTableRef = ref();
|
|
|
// 删除按钮
|
|
|
-function handleDelete(value: any) {
|
|
|
- ElMessageBox.confirm('是否删除这条数据?', '删除提示', {
|
|
|
+function handleStatus(value: string, status: string, str: string) {
|
|
|
+ ElMessageBox.confirm(`是否${str}这条数据?`, '状态提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
.then(() => {
|
|
|
- systemStore.deletePageDataAction(contentConfig.pageName, value);
|
|
|
+ // systemStore.deletePageDataAction(contentConfig.pageName, value);
|
|
|
})
|
|
|
.catch(() => {
|
|
|
ElMessage({
|
|
|
type: 'info',
|
|
|
- message: '取消删除',
|
|
|
+ message: '取消操作',
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
@@ -188,68 +188,76 @@ onMounted(async () => {
|
|
|
// treeData.value = await outDeptTree();
|
|
|
treeData.value = [
|
|
|
{
|
|
|
- id: '1',
|
|
|
- label: 'Level one 1',
|
|
|
+ id: '100',
|
|
|
+ parentId: '0',
|
|
|
+ label: '交通部测试1',
|
|
|
+ weight: 0,
|
|
|
+ disabled: false,
|
|
|
children: [
|
|
|
{
|
|
|
- id: '1-1',
|
|
|
- label: 'Level two 1-1',
|
|
|
+ id: '101',
|
|
|
+ parentId: '100',
|
|
|
+ label: 'XXXXX机构1',
|
|
|
+ weight: 1,
|
|
|
+ disabled: false,
|
|
|
children: [
|
|
|
{
|
|
|
- id: '1-1-1',
|
|
|
- label: 'Level three 1-1-1',
|
|
|
+ id: '103',
|
|
|
+ parentId: '101',
|
|
|
+ label: '研发部门',
|
|
|
+ weight: 1,
|
|
|
+ disabled: false,
|
|
|
},
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: '2',
|
|
|
- label: 'Level one 2',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: '2-1',
|
|
|
- label: 'Level two 2-1',
|
|
|
- children: [
|
|
|
{
|
|
|
- id: '2-1-1',
|
|
|
- label: 'Level three 2-1-1',
|
|
|
+ id: '104',
|
|
|
+ parentId: '101',
|
|
|
+ label: '市场部门',
|
|
|
+ weight: 2,
|
|
|
+ disabled: false,
|
|
|
},
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: '2-2',
|
|
|
- label: 'Level two 2-2',
|
|
|
- children: [
|
|
|
{
|
|
|
- id: '2-2-1',
|
|
|
- label: 'Level three 2-2-1',
|
|
|
+ id: '105',
|
|
|
+ parentId: '101',
|
|
|
+ label: '测试部门',
|
|
|
+ weight: 3,
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '106',
|
|
|
+ parentId: '101',
|
|
|
+ label: '财务部门',
|
|
|
+ weight: 4,
|
|
|
+ disabled: false,
|
|
|
},
|
|
|
- ],
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- id: '3',
|
|
|
- label: 'Level one 3',
|
|
|
- children: [
|
|
|
- {
|
|
|
- id: '3-1',
|
|
|
- label: 'Level two 3-1',
|
|
|
- children: [
|
|
|
{
|
|
|
- id: '3-1-1',
|
|
|
- label: 'Level three 3-1-1',
|
|
|
+ id: '107',
|
|
|
+ parentId: '101',
|
|
|
+ label: '运维部门',
|
|
|
+ weight: 5,
|
|
|
+ disabled: false,
|
|
|
},
|
|
|
],
|
|
|
},
|
|
|
{
|
|
|
- value: '3-2',
|
|
|
- label: 'Level two 3-2',
|
|
|
+ id: '102',
|
|
|
+ parentId: '100',
|
|
|
+ label: 'XXXXX机构2',
|
|
|
+ weight: 2,
|
|
|
+ disabled: false,
|
|
|
children: [
|
|
|
{
|
|
|
- id: '3-2-1',
|
|
|
- label: 'Level three 3-2-1',
|
|
|
+ id: '108',
|
|
|
+ parentId: '102',
|
|
|
+ label: '市场部门',
|
|
|
+ weight: 1,
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: '109',
|
|
|
+ parentId: '102',
|
|
|
+ label: '财务部门',
|
|
|
+ weight: 2,
|
|
|
+ disabled: false,
|
|
|
},
|
|
|
],
|
|
|
},
|