{"remainingRequest":"/Users/admin/projects/dms/src/dealer_admin/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/admin/projects/dms/src/dealer_admin/src/views/system/setting/index.vue?vue&type=script&lang=js","dependencies":[{"path":"/Users/admin/projects/dms/src/dealer_admin/src/views/system/setting/index.vue","mtime":1713161556000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/babel-loader/lib/index.js","mtime":456789000000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/admin/projects/dms/src/dealer_admin/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport * as API from \"@/api/setting\";\n import * as RoleAPI from \"@/api/role\";\nimport waves from \"@/directive/waves\"; // waves directive\nimport {parseTime} from \"@/utils\";\nimport Form from \"./components/form\";\nimport Pagination from \"@/components/Pagination\"; // secondary package based on el-pagination\nimport {checkIsAdmin} from \"@/utils/validate\"; //检测是否是admin超级管理员账号\n\nexport default {\n  name: \"Dictionary\",\n  components: {Pagination, Form},\n  directives: {waves},\n  data() {\n    return {\n      picbase: \"\",\n      tableKey: 0,\n      list: [],\n      total: 0,\n      listLoading: true,\n      listQuery: {\n        page: 1,\n        limit: 20\n      },\n      isAdmin: false, //记录,只有是admin用户才有删除权限\n      catlogOptions:{\n      },\n      typeList:[],\n      roleMap:{},\n    };\n  },\n  created() {\n    this.$forceUpdate();\n    this.getTypeList();\n    this.getValidMap();\n    this.getList();\n  },\n  methods: {\n    async getValidMap(){\n      let resData = await RoleAPI.getValidMap();\n      console.log(resData);\n      if(resData.__error == 0){\n        this.roleMap = resData.result.map;\n      }\n      \n    },\n    onEditorReady(editor) {\n    },\n    addNewProject() {\n      this.$nextTick(() => {\n        this.$refs.fromType.init();\n      });\n    },\n    async getTypeList(){\n      const res = await API.getTypeList();\n      let list = res.result.list;\n      this.typeList = list;\n      this.handlerTypeData()\n      console.log(res);\n    },\n    handlerTypeData(){\n      let catlogOptions = {};\n      this.typeList.map( (v) =>{\n        catlogOptions[v.value] = v.name;\n      });\n      this.catlogOptions = catlogOptions;\n      console.log(catlogOptions);\n    },\n    async getList() {\n      this.listLoading = true;\n      const res = await API.list(this.listQuery);\n      this.total = res.result.total;\n      this.list = res.result.list;\n      let list = this.list;\n      list.map((v) => {\n        if(v.type == 10){\n          v.content = JSON.parse(v.content);\n        }\n        return v;\n      })\n      this.list = [];\n      this.list = list;\n      console.log(\"this.list:\", this.list);\n      console.log(\"total\", this.total);\n\n      this.listLoading = false;\n    },\n    async delHandle(id) {\n      this.$confirm(\"确认删除???\", \"提示\")\n        .then(async _ => {\n          console.log(\"确认\");\n          const res = await API.del(id);\n          if (res.__error === 0) {\n            this.$message({\n              message: \"成功\",\n              type: \"success\"\n            });\n            this.getList();\n          }\n        })\n        .catch(_ => {\n          console.log(\"取消\");\n        });\n    },\n  \n    fromHandle(id) {\n      this.$nextTick(() => {\n        this.$refs.fromType.init(id);\n      });\n    },\n    handleFilter() {\n      this.listQuery.page = 1;\n      this.getList();\n    }\n  }\n};\n",null]}