{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\reportManagement\\BigScreen\\BigScreenManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\reportManagement\\BigScreen\\BigScreenManagement.vue","mtime":1675071993053},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\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//\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//\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//\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\n// import { getList, addObj, updateObj, delObj, getCategory, copyObj } from '@/api/visual';\r\nimport {getObj} from '@/tripartite/buildBigScreen/src/api/visual'\r\nimport report from '@/api/report.js'\r\nexport default {\r\n name: 'list',\r\n data() {\r\n return {\r\n tabPosition: 'left',\r\n typelist: [],\r\n index: 0,\r\n type: '',\r\n page: {\r\n page: 1,\r\n size: 10,\r\n total: 0\r\n },\r\n form: {},\r\n box: false,\r\n activeName: '',\r\n list: [],\r\n category: [],\r\n form: {\r\n category: '5',\r\n title: '',\r\n width: 1920,\r\n height: 1080,\r\n status: 0\r\n },\r\n rules: {\r\n category: [\r\n {required: true, message: '请选择分组名称', trigger: 'blur'}\r\n ],\r\n title: [{required: true, message: '请输入大屏名称', trigger: 'blur'}],\r\n height: [{required: true, message: '请输入高度大小', trigger: 'blur'}],\r\n width: [{required: true, message: '请输入宽度大小', trigger: 'blur'}]\r\n },\r\n //分类查询默认查询模块值位置5的数据\r\n activeCategoryName: '5'\r\n }\r\n },\r\n created() {\r\n this.getCategory()\r\n },\r\n methods: {\r\n vaildData(id) {\r\n const list = []\r\n for (var i = 0; i < 20; i++) {\r\n list.push(i)\r\n }\r\n return list.includes(id)\r\n },\r\n getCategory() {\r\n // getCategory().then(res => {\r\n // const data = res.data.data;\r\n // this.typelist = data;\r\n // this.activeName = (data[0] || {}).categoryValue;\r\n this.getList()\r\n // })\r\n this.getClassificName()\r\n },\r\n handleExport(item) {\r\n getObj(item.id).then(res => {\r\n const data = res\r\n let mode = {\r\n detail: JSON.parse(data.config.detail),\r\n component: JSON.parse(data.config.component)\r\n }\r\n var zip = new window.JSZip()\r\n zip.file('view.js', `const option =${JSON.stringify(mode, null, 4)}`)\r\n zip.file('index.html', window.html)\r\n zip.generateAsync({type: 'base64'}).then(function(content) {\r\n location.href = 'data:application/zip;base64,' + content\r\n })\r\n })\r\n },\r\n handleCopy(item) {\r\n this.$message({\r\n message: '演示环境不允许复制',\r\n type: 'danger'\r\n })\r\n return\r\n this.$confirm('确认复制当前大屏', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n copyObj(item.id).then(() => {\r\n this.$message.success('复制成功')\r\n this.getList()\r\n })\r\n })\r\n .catch(() => {})\r\n },\r\n //大屏管理删除\r\n handleDel(item, index) {\r\n // console.log(item, 'item')\r\n this.$confirm('是否确认永久删除?', '提示', {\r\n confirmButtonText: '确定',\r\n cancelButtonText: '取消',\r\n type: 'warning'\r\n })\r\n .then(() => {\r\n if (!this.vaildData(index)) {\r\n this.$message.error('例子模板不允许修改')\r\n return false\r\n }\r\n report.delObj(item.id).then(() => {\r\n this.list.splice(index, 1)\r\n this.$message.success('删除成功')\r\n return this.getList()\r\n })\r\n })\r\n .catch(() => {})\r\n },\r\n handleAdd() {\r\n this.form.title = ''\r\n this.type = 'add'\r\n this.box = true\r\n },\r\n handleUpdate(item, index) {\r\n this.type = 'edit'\r\n this.form = item\r\n this.form.width = '1920'\r\n this.form.height = '1080'\r\n this.form.category = this.form.category + ''\r\n this.box = true\r\n this.index = index\r\n },\r\n handleEdit(item) {\r\n let routeUrl = this.$router.resolve({\r\n path: '/build/' + item.id\r\n })\r\n window.open(routeUrl.href, '_blank')\r\n },\r\n handleViews(item) {\r\n let routeUrl = this.$router.resolve({\r\n path: '/view/' + item.id\r\n })\r\n window.open(routeUrl.href, '_blank')\r\n },\r\n handleSave(form, done) {\r\n done()\r\n if (this.type == 'add') {\r\n addObj(\r\n Object.assign(\r\n {\r\n category: this.activeName\r\n },\r\n this.form\r\n )\r\n ).then(res => {\r\n this.box = false\r\n this.$message.success('新增成功')\r\n this.getList()\r\n const id = res.data.data.id\r\n this.handleEdit({id})\r\n })\r\n } else {\r\n if (this.vaildData(Number(this.index))) {\r\n this.$message.error('例子模板不允许修改')\r\n return false\r\n }\r\n updateObj({\r\n id: this.form.id,\r\n category: this.form.category,\r\n password: this.form.password,\r\n status: this.form.status,\r\n title: this.form.title\r\n }).then(() => {\r\n this.box = false\r\n this.$message.success('修改成功')\r\n this.getList()\r\n })\r\n }\r\n },\r\n handleCurrentChange(val) {\r\n // console.log(val, '当前要访问的页数')\r\n this.page.page = val\r\n this.getList()\r\n },\r\n handleSizeChange(val) {\r\n // console.log(val, '当前页面显示的条数')\r\n this.page.size = val\r\n this.getList()\r\n },\r\n getList(category) {\r\n report\r\n .getList({\r\n groupTree: {},\r\n pageBean: {\r\n page: this.page.page,\r\n pageSize: this.page.size,\r\n showTotal: true\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'b.category_value_',\r\n relation: 'AND',\r\n value: this.activeCategoryName\r\n }\r\n ],\r\n })\r\n .then(res => {\r\n const data = res\r\n this.page.total = data.total\r\n this.list = data.rows\r\n this.initData()\r\n })\r\n },\r\n initData() {\r\n this.list.forEach((ele, index) => {\r\n this.$set(this.list[index], '_menu', false)\r\n })\r\n },\r\n //获取分类管理的名称\r\n getClassificName() {\r\n report.getClassific().then(res => {\r\n this.category = res.rows\r\n // this.form.category = this.category.slice(0, 1)[0].categoryKey\r\n // console.log(this.category.slice(0,1)[0].categoryKey)\r\n })\r\n },\r\n //新建大屏\r\n handleBuild() {\r\n //验证表格\r\n this.$refs.form.validate(bool => {\r\n if (bool) {\r\n this.box = false\r\n report\r\n .buildBigScreen({\r\n visual: {\r\n category: this.form.category,\r\n title: this.form.title,\r\n status: this.form.status\r\n },\r\n config: {\r\n detail: JSON.stringify({\r\n name: this.form.title,\r\n width: this.form.width,\r\n height: this.form.height,\r\n scale: 1,\r\n backgroundImage: '/img/bg/bg1.png',\r\n url: '',\r\n mark: {},\r\n gradeShow: false,\r\n gradeLen: 30\r\n }),\r\n component: '[]'\r\n }\r\n })\r\n .then(res => {\r\n // console.log(res)\r\n let routeUrl = this.$router.resolve({\r\n path: '/build/' + res.message\r\n })\r\n window.open(routeUrl.href, '_blank')\r\n this.getList()\r\n })\r\n }\r\n })\r\n },\r\n //模板发布时间\r\n handleRelease(data) {\r\n //判断当前是否是已经发布\r\n if (data.status !== 1) {\r\n report\r\n .updateStatus({\r\n id: data.id,\r\n status: 1\r\n })\r\n .then(res => {\r\n //重新获取数据\r\n this.getList()\r\n })\r\n }\r\n },\r\n //获取点击的分类管理的模块值\r\n handleClick(tab) {\r\n // console.log(tab, 'tab')\r\n this.activeCategoryName = tab.name\r\n this.page.page = 1\r\n this.getList()\r\n }\r\n }\r\n}\r\n",null]}