| | |
| | | </el-table-column>
|
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
| | | <template #default="scope">
|
| | | <el-button
|
| | | type="text"
|
| | | icon="Edit"
|
| | | @click="handleUpdate(scope.row)"
|
| | | v-hasPermi="['system:dept:edit']"
|
| | | >修改</el-button>
|
| | | <el-button
|
| | | type="text"
|
| | | icon="Plus"
|
| | | @click="handleAdd(scope.row)"
|
| | | v-hasPermi="['system:dept:add']"
|
| | | >新增</el-button>
|
| | | <el-button
|
| | | v-if="scope.row.parentId != 0"
|
| | | type="text"
|
| | | icon="Delete"
|
| | | @click="handleDelete(scope.row)"
|
| | | v-hasPermi="['system:dept:remove']"
|
| | | >删除</el-button>
|
| | | <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:dept:edit']">修改</el-button>
|
| | | <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['system:dept:add']">新增</el-button>
|
| | | <el-button v-if="scope.row.parentId != 0" link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:dept:remove']">删除</el-button>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | |
| | | loading.value = false;
|
| | | });
|
| | | }
|
| | |
|
| | | /** 取消按钮 */
|
| | | function cancel() {
|
| | | open.value = false;
|
| | | reset();
|
| | | }
|
| | |
|
| | | /** 表单重置 */
|
| | | function reset() {
|
| | | form.value = {
|
| | |
| | | };
|
| | | proxy.resetForm("deptRef");
|
| | | }
|
| | |
|
| | | /** 搜索按钮操作 */
|
| | | function handleQuery() {
|
| | | getList();
|
| | | }
|
| | |
|
| | | /** 重置按钮操作 */
|
| | | function resetQuery() {
|
| | | proxy.resetForm("queryRef");
|
| | | handleQuery();
|
| | | }
|
| | |
|
| | | /** 新增按钮操作 */
|
| | | function handleAdd(row) {
|
| | | reset();
|
| | |
| | | open.value = true;
|
| | | title.value = "添加部门";
|
| | | }
|
| | |
|
| | | /** 展开/折叠操作 */
|
| | | function toggleExpandAll() {
|
| | | refreshTable.value = false;
|
| | |
| | | refreshTable.value = true;
|
| | | });
|
| | | }
|
| | |
|
| | | /** 修改按钮操作 */
|
| | | function handleUpdate(row) {
|
| | | reset();
|
| | |
| | | title.value = "修改部门";
|
| | | });
|
| | | }
|
| | |
|
| | | /** 提交按钮 */
|
| | | function submitForm() {
|
| | | proxy.$refs["deptRef"].validate(valid => {
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | /** 删除按钮操作 */
|
| | | function handleDelete(row) {
|
| | | proxy.$modal.confirm('是否确认删除名称为"' + row.deptName + '"的数据项?').then(function() {
|