yangg пре 10 месеци
родитељ
комит
0294e37766

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-882f79f4.6f8877c6.css → dist/static/css/chunk-dd5a1060.6f8877c6.css


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.74e67113.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/chunk-882f79f4.f8eec342.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/chunk-dd5a1060.5d693f0e.js


+ 14 - 8
src/views/role/components/dataInfo.vue

@@ -49,7 +49,7 @@
           </div>
         </el-form-item>
 
-        <el-form-item label="模板分类授权:">
+        <!-- <el-form-item label="模板分类授权:">
           <div
             style="
               width: 100%;
@@ -132,7 +132,7 @@
               @check="handleSourceDataCheck"
             />
           </div>
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="角色状态:">
           <el-select
             v-model="dataForm.status"
@@ -586,32 +586,38 @@ export default {
     btnSave(e) {
       let _this = this;
       let items = _this.$refs.nodeTree.getCheckedNodes();
-
+      /* 
       let templateCate = _this.$refs.templateCate.getCheckedNodes();
       let docCate = _this.$refs.docCate.getCheckedNodes();
       let sourceDataTree = _this.$refs.sourceDataTree.getCheckedNodes();
 
       templateCate = templateCate.filter((o) => o.isMain);
 
-      let pickedItem = items.filter((o) => o.sub == true);
-      _this.dataForm.authList = JSON.stringify(pickedItem);
+      
 
       _this.dataForm.template_cate_auth = JSON.stringify(templateCate);
       _this.dataForm.doc_cate_auth = JSON.stringify(docCate);
       _this.dataForm.source_cate_auth = JSON.stringify(sourceDataTree);
-
+ */ let pickedItem = items.filter((o) => o.sub == true);
+      _this.dataForm.authList = JSON.stringify(pickedItem);
       let data = { ..._this.dataForm };
       data.attrs = JSON.stringify(data.attrs);
       if (_this.dataForm.id > 0) {
         updateAdminRole(data).then((res) => {
           if (res.status != 200) return;
           _this.$alert("更新角色信息成功");
+          _this.$router.push({
+            path: "/system/role/index",
+          });
           _this.$emit("onClose");
         });
       } else {
         createAdminRole(data).then((res) => {
           if (res.status != 200) return;
           _this.$alert("创建角色信息成功");
+          _this.$router.push({
+            path: "/system/role/index",
+          });
           _this.$emit("onClose");
         });
       }
@@ -636,7 +642,7 @@ export default {
         } else {
           _this.$refs.nodeTree.setCheckedNodes([]);
         }
-
+        /* 
         let tempCate = res.data.templateCategoryUsers; //JSON.parse();
         if (tempCate.length > 0) {
           _this.$refs.templateCate.setCheckedNodes(tempCate);
@@ -673,7 +679,7 @@ export default {
         } else {
           _this.$refs.docCate.setCheckedNodes([]);
         }
-
+ */
         //     _this.$refs.docCate.setCheckedNodes(JSON.parse(res.data.doc_cate_auth));
         //     _this.$refs.sourceDataTree.setCheckedNodes(JSON.parse(res.data.source_cate_auth));
       });

+ 173 - 149
src/views/role/components/dataList.vue

@@ -1,168 +1,192 @@
 <template>
   <div class="data-list">
-
-
-      <el-table :data="dataList" style="width: 100%" header-row-class-name="headerBg" empty-text="没有角色信息">
-        <el-table-column prop="id" label="ID" align="center" width="80"/>
-        <el-table-column prop="name" label="角色名称" align="left" width="180"/>
-        <el-table-column prop="intro" label="角色介绍" align="center" min-width="150"/>
-        <el-table-column prop="createTime" label="创建时间" align="center" width="150"/>
-        <el-table-column prop="status" label="角色状态" align="center" width="150">
-            <template #default="scope">
-                <div v-if="scope.row.status==5">启用</div>
-                <div v-if="scope.row.status==6">禁用</div>
-            </template>
-        </el-table-column>
-        <el-table-column label="操作" align="center" fixed="right" width="180">
-          <template #default="scope">
-            <div class="btns">
-              <el-button type="primary" size="small" @click="btnEdit(scope.row.id)"><svg-icon icon-class="edit"/>编辑</el-button>
-              <el-button type="danger" size="small" @click="btnDelete(scope.row.id)"><svg-icon icon-class="delete"/>删除</el-button>
-            </div>
-          </template>
-        </el-table-column>
-      </el-table>
-
-
-
-      <div class="page-info">
-      	<el-pagination
-      	v-model:currentPage="queryForm.page"
-      	:page-size="queryForm.pageSize"
-      	:total="recordCount"
-      	:page-count="pageTotal"
-      	 background
-      	 layout="prev, pager, next"
-      	 @current-change="ChangePage"
-      	 >
-      	 </el-pagination>
-      </div>
-
-     <el-dialog  :visible.sync="dialogVisible" append-to-body v-el-drag-dialog  width="80%" custom-class="prod-verify" title="创建项目信息">
-
-          <dataInfo :id="dataId" @onClose="onClose"></dataInfo>
-      </el-dialog>
-
+    <el-table
+      :data="dataList"
+      style="width: 100%"
+      header-row-class-name="headerBg"
+      empty-text="没有角色信息"
+    >
+      <el-table-column prop="id" label="ID" align="center" width="80" />
+      <el-table-column prop="name" label="角色名称" align="left" width="180" />
+      <el-table-column
+        prop="intro"
+        label="角色介绍"
+        align="center"
+        min-width="150"
+      />
+      <el-table-column
+        prop="createTime"
+        label="创建时间"
+        align="center"
+        width="150"
+      />
+      <el-table-column
+        prop="status"
+        label="角色状态"
+        align="center"
+        width="150"
+      >
+        <template #default="scope">
+          <div v-if="scope.row.status == 5">启用</div>
+          <div v-if="scope.row.status == 6">禁用</div>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" fixed="right" width="180">
+        <template #default="scope">
+          <div class="btns">
+            <el-button
+              type="primary"
+              size="small"
+              @click="btnEdit(scope.row.id)"
+              ><svg-icon icon-class="edit" />编辑</el-button
+            >
+            <el-button
+              type="danger"
+              size="small"
+              @click="btnDelete(scope.row.id)"
+              ><svg-icon icon-class="delete" />删除</el-button
+            >
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <div class="page-info">
+      <el-pagination
+        v-model:currentPage="queryForm.page"
+        :page-size="queryForm.pageSize"
+        :total="recordCount"
+        :page-count="pageTotal"
+        background
+        layout="prev, pager, next"
+        @current-change="ChangePage"
+      >
+      </el-pagination>
+    </div>
+
+    <el-dialog
+      :visible.sync="dialogVisible"
+      append-to-body
+      v-el-drag-dialog
+      width="80%"
+      custom-class="prod-verify"
+      title="创建项目信息"
+    >
+      <dataInfo :id="dataId" @onClose="onClose"></dataInfo>
+    </el-dialog>
   </div>
-
-
 </template>
 
 <script>
-  import{searchAdminRole,deleteAdminRole} from'@/api/AdminRole';
-  import dataInfo from './dataInfo.vue';
-  import elDragDialog from '@/directive/el-drag-dialog'
-  export default{
-    components:{
-      dataInfo,
-    },
-    directives: { elDragDialog },
-    props:{
-      queryForm:{
-        type:Object,
-        default:()=>{
-          return {
-           page:1,
-           pageSize:10,
-           name:'',
-           status:''
-          }
-        }
-      }
-    },
-    watch:{
-
-        'queryForm': {
-          handler: function(val) {
-
-            this.search();
-          },
-          // immediate: true,//立即执行
-          deep: true
-
-        },
-    },
-    data(){
-      return{
-        dialogVisible:false,//控制产品审核
-        dataId:0,
-        recordCount:0,
-        pageTotal:1,
-        dataList:[],
-        currentData:{},
-      }
+import { searchAdminRole, deleteAdminRole } from "@/api/AdminRole";
+import dataInfo from "./dataInfo.vue";
+import elDragDialog from "@/directive/el-drag-dialog";
+export default {
+  components: {
+    dataInfo,
+  },
+  directives: { elDragDialog },
+  props: {
+    queryForm: {
+      type: Object,
+      default: () => {
+        return {
+          page: 1,
+          pageSize: 10,
+          name: "",
+          status: "",
+        };
+      },
     },
-    mounted() {
-      this.search();
+  },
+  watch: {
+    queryForm: {
+      handler: function (val) {
+        this.search();
+      },
+      // immediate: true,//立即执行
+      deep: true,
     },
-    methods:{
-
-      btnDelete(e){
-        let _this=this;
-        let par={
-          id:e,
-        }
-        _this.$confirm("您是否确认删除该记录?","提示",{
-          confirmButtonText: '确认',
-          cancelButtonText: '取消',
-          type: 'warning',
-        }).then((res)=>{
+  },
+  data() {
+    return {
+      dialogVisible: false, //控制产品审核
+      dataId: 0,
+      recordCount: 0,
+      pageTotal: 1,
+      dataList: [],
+      currentData: {},
+    };
+  },
+  mounted() {
+    this.search();
+  },
+  methods: {
+    btnDelete(e) {
+      let _this = this;
+      let par = {
+        id: e,
+      };
+      _this
+        .$confirm("您是否确认删除该记录?", "提示", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+        .then((res) => {
           // console.log("AAA")
-             deleteAdminRole(par).then(res=>{
-               _this.search();
-             })
-        }).catch(()=>{
+          deleteAdminRole(par).then((res) => {});
+          _this.search();
         })
-      },
-
-      onChangeVal(e){
-        let _this=this;
-        let par={
-          id:_this.currentDataId,
-          val:e,
-        };
-
-      },
+        .catch(() => {});
+    },
 
-      onClose(){
-        let _this=this;
-        _this.dialogVisible=false;
-        _this.search();
-      },
+    onChangeVal(e) {
+      let _this = this;
+      let par = {
+        id: _this.currentDataId,
+        val: e,
+      };
+    },
 
+    onClose() {
+      let _this = this;
+      _this.dialogVisible = false;
+      _this.search();
+    },
 
-      //编辑
-      btnEdit(e){
-        this.dataId=e
-        this.$router.push({path:'/system/role/edit',query:{id:e}})
-      },
+    //编辑
+    btnEdit(e) {
+      this.dataId = e;
+      this.$router.push({ path: "/system/role/edit", query: { id: e } });
+    },
 
-      handleClose(){
-        let _this=this;
-        _this.dataId=0;
-        _this.dialogVisible=false;
-      },
+    handleClose() {
+      let _this = this;
+      _this.dataId = 0;
+      _this.dialogVisible = false;
+    },
 
-      //搜索
-      search(){
-        let _this=this;
-        searchAdminRole(_this.queryForm).then(res=>{
-          if(!res)return;
-          _this.dataList=res.data.dataList;
-          _this.recordCount=res.data.totalRecord;
-          _this.pageTotal=res.data.totalPage;
-        })
-      },
-      //修改分页
-      ChangePage(e){
-      	let _this=this;
-      	_this.queryForm.page=e;
-      	_this.search();
-      },
-    }
-  }
+    //搜索
+    search() {
+      let _this = this;
+      searchAdminRole(_this.queryForm).then((res) => {
+        if (!res) return;
+        _this.dataList = res.data.dataList;
+        _this.recordCount = res.data.totalRecord;
+        _this.pageTotal = res.data.totalPage;
+      });
+    },
+    //修改分页
+    ChangePage(e) {
+      let _this = this;
+      _this.queryForm.page = e;
+      _this.search();
+    },
+  },
+};
 </script>
 
 <style lang="scss">
-@import './dataList.scss';
+@import "./dataList.scss";
 </style>

Неке датотеке нису приказане због велике количине промена