From 76bd95ca79b03b84f6d011a81794aabcdeef169b Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期二, 21 三月 2023 10:35:46 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/~yxh/smartor-web
---
ruoyi-ui/src/views/smartor/svytitle/index1.vue | 230 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 230 insertions(+), 0 deletions(-)
diff --git a/ruoyi-ui/src/views/smartor/svytitle/index1.vue b/ruoyi-ui/src/views/smartor/svytitle/index1.vue
new file mode 100644
index 0000000..36d512a
--- /dev/null
+++ b/ruoyi-ui/src/views/smartor/svytitle/index1.vue
@@ -0,0 +1,230 @@
+<template>
+ <el-container>
+ <el-aside width="200px">
+ <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
+ </el-aside>
+ <el-main>
+ <div is='dw_topic' />
+ </el-main>
+ </el-container>
+ </template>
+<script>
+import { listSvytitle, getSvytitle, delSvytitle, addSvytitle, updateSvytitle } from "@/api/smartor/svytitle";
+
+export default {
+ name: "Svytitle",
+ data() {
+ return {
+ // 閬僵灞�
+ loading: true,
+ // 閫変腑鏁扮粍
+ ids: [],
+ // 闈炲崟涓鐢�
+ single: true,
+ // 闈炲涓鐢�
+ multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
+ // 鎬绘潯鏁�
+ total: 0,
+ // 闂嵎琛ㄦ牸鏁版嵁
+ svytitleList: [],
+ // 寮瑰嚭灞傛爣棰�
+ title: "",
+ // 鏄惁鏄剧ず寮瑰嚭灞�
+ open: false,
+ // 鏌ヨ鍙傛暟
+ queryParams: {
+ pageNum: 1,
+ pageSize: 10,
+ categoryid: null,
+ svycode: null,
+ svyname: null,
+ description: null,
+ introduce: null,
+ submitprompt: null,
+ templateid: null,
+ version: null,
+ centerlibrarycode: null,
+ centerlibraryid: null,
+ islocal: null,
+ isenable: null,
+ orgid: null,
+ isupload: null,
+ uploadTime: null
+ },
+ // 琛ㄥ崟鍙傛暟
+ form: {},
+ // 琛ㄥ崟鏍¢獙
+ rules: {
+ delFlag: [
+ { required: true, message: " 鍒犻櫎鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ isupload: [
+ { required: true, message: " 涓婁紶鏍囪 涓嶈兘涓虹┖", trigger: "blur" }
+ ],
+ },
+ data: [{
+ label: '涓�绾� 1',
+ children: [{
+ label: '浜岀骇 1-1',
+ children: [{
+ label: '涓夌骇 1-1-1'
+ }]
+ }]
+ }, {
+ label: '涓�绾� 2',
+ children: [{
+ label: '浜岀骇 2-1',
+ children: [{
+ label: '涓夌骇 2-1-1'
+ }]
+ }, {
+ label: '浜岀骇 2-2',
+ children: [{
+ label: '涓夌骇 2-2-1'
+ }]
+ }]
+ }, {
+ label: '涓�绾� 3',
+ children: [{
+ label: '浜岀骇 3-1',
+ children: [{
+ label: '涓夌骇 3-1-1'
+ }]
+ }, {
+ label: '浜岀骇 3-2',
+ children: [{
+ label: '涓夌骇 3-2-1'
+ }]
+ }]
+ }],
+ defaultProps: {
+ children: 'children',
+ label: 'label'
+ }
+ };
+ },
+ created() {
+ this.getList();
+ },
+ methods: {
+ /** 鏌ヨ闂嵎鍒楄〃 */
+ getList() {
+ this.loading = true;
+ listSvytitle(this.queryParams).then(response => {
+ this.svytitleList = response.rows;
+ this.total = response.total;
+ this.loading = false;
+ });
+ },
+ // 鍙栨秷鎸夐挳
+ cancel() {
+ this.open = false;
+ this.reset();
+ },
+ // 琛ㄥ崟閲嶇疆
+ reset() {
+ this.form = {
+ svyid: null,
+ categoryid: null,
+ svycode: null,
+ svyname: null,
+ description: null,
+ introduce: null,
+ submitprompt: null,
+ templateid: null,
+ version: null,
+ centerlibrarycode: null,
+ centerlibraryid: null,
+ islocal: null,
+ isenable: null,
+ orgid: null,
+ delFlag: null,
+ createBy: null,
+ createTime: null,
+ updateBy: null,
+ updateTime: null,
+ isupload: null,
+ uploadTime: null
+ };
+ this.resetForm("form");
+ },
+ /** 鎼滅储鎸夐挳鎿嶄綔 */
+ handleQuery() {
+ this.queryParams.pageNum = 1;
+ this.getList();
+ },
+ /** 閲嶇疆鎸夐挳鎿嶄綔 */
+ resetQuery() {
+ this.resetForm("queryForm");
+ this.handleQuery();
+ },
+ // 澶氶�夋閫変腑鏁版嵁
+ handleSelectionChange(selection) {
+ this.ids = selection.map(item => item.svyid)
+ this.single = selection.length !== 1
+ this.multiple = !selection.length
+ },
+ /** 鏂板鎸夐挳鎿嶄綔 */
+ handleAdd() {
+ this.reset();
+ this.open = true;
+ this.title = "娣诲姞闂嵎";
+ },
+ /** 淇敼鎸夐挳鎿嶄綔 */
+ handleUpdate(row) {
+ this.reset();
+ const svyid = row.svyid || this.ids
+ getSvytitle(svyid).then(response => {
+ this.form = response.data;
+ this.open = true;
+ this.title = "淇敼闂嵎";
+ });
+ },
+ /** 鎻愪氦鎸夐挳 */
+ submitForm() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ if (this.form.svyid != null) {
+ updateSvytitle(this.form).then(response => {
+ this.$modal.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ addSvytitle(this.form).then(response => {
+ this.$modal.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
+ });
+ }
+ }
+ });
+ },
+ /** 鍒犻櫎鎸夐挳鎿嶄綔 */
+ handleDelete(row) {
+ const svyids = row.svyid || this.ids;
+ this.$modal.confirm('鏄惁纭鍒犻櫎闂嵎缂栧彿涓�"' + svyids + '"鐨勬暟鎹」锛�').then(function () {
+ return delSvytitle(svyids);
+ }).then(() => {
+ this.getList();
+ this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
+ }).catch(() => { });
+ },
+ /** 瀵煎嚭鎸夐挳鎿嶄綔 */
+ handleExport() {
+ this.download('smartor/svytitle/export', {
+ ...this.queryParams
+ }, `svytitle_${new Date().getTime()}.xlsx`)
+ },
+ handleNodeClick(data) {
+ console.log(data);
+ },
+ },
+ components:
+ {
+ dw_topic: () => import("@/smartor/dataobject/dw_svytopic_view.vue")
+ }
+};
+</script>
--
Gitblit v1.9.3