{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\DigitalChongqingApplication\\NewsManagement.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\DigitalChongqingApplication\\NewsManagement.vue","mtime":1711100280280},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es7.object.get-own-property-descriptors\";\nimport \"core-js/modules/es6.object.keys\";\nimport _defineProperty from \"D:/jenkins/workspace/reform-fvue/node_modules/@babel/runtime/helpers/esm/defineProperty\";\nimport \"core-js/modules/web.dom.iterable\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\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//\nimport pagination from '@/components/pagination';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport apiList from '@/api/digitalApi/appApi';\nvar portal = window.context.portal;\nexport default {\n name: 'NewsManagement',\n components: {\n pagination: pagination\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n tableMaxHeight: 400,\n loading: false,\n tableLoading: false,\n searchForm: {},\n // 顶部搜索对象\n markLoading: false,\n tableData: [],\n params: {\n pageBean: {\n page: 1,\n pageSize: 20,\n showTotal: true\n },\n querys: []\n },\n pageResult: {\n page: 1,\n pageSize: 20,\n total: 0\n },\n deleteIds: '' // 是否选中列表解锁删除按钮\n\n };\n },\n created: function created() {\n this.getData(this.params);\n },\n methods: {\n addNew: function addNew() {\n this.tableData.unshift({\n isEdit: true\n });\n this.pageResult.total = this.tableData.length;\n },\n saveAddOrUpdateNew: function saveAddOrUpdateNew(row) {\n var _this = this;\n\n var newsDate = row.newsDate,\n content = row.content;\n\n if (!newsDate || !content) {\n if (!newsDate) {\n this.$message.error('请选择填报时间');\n } else if (!content) {\n this.$message.error('请填写新闻内容');\n }\n } else {\n var msg = row.id ? '保存修改' : '保存';\n this.$confirm(\"\\u786E\\u8BA4\".concat(msg, \"\\u5417\\uFF1F\"), this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'error'\n }).then(function () {\n _this.tableLoading = true;\n var API = row.id ? 'updateNewsData' : 'saveNewsData';\n apiList[API](row, function (res) {\n if (res.state) {\n _this.$message.success(\"\".concat(msg, \"\\u6210\\u529F\"));\n\n _this.getData(_this.params);\n }\n });\n });\n }\n },\n clickEdit: function clickEdit(row) {\n row.isEdit = true;\n },\n getData: function getData(data) {\n var _this2 = this;\n\n this.tableLoading = true;\n apiList.getNewsData(data, function (res) {\n if (res) {\n _this2.pageResult.total = res.total;\n _this2.tableLoading = false;\n _this2.tableData = res.rows;\n\n _this2.tableData.forEach(function (item) {\n _this2.$set(item, 'isEdit', false);\n });\n }\n });\n },\n handleSearch: function handleSearch(page) {\n var _this3 = this;\n\n this.tableLoading = true;\n var data = JSON.parse(JSON.stringify(this.params));\n var obj = JSON.parse(JSON.stringify(this.searchForm));\n var querys = [];\n\n for (var i in obj) {\n if (obj[i]) {\n querys.push({\n group: 'main',\n operation: i == 'content_' ? 'LIKE' : 'EQUAL',\n parentGroup: '',\n property: i,\n relation: 'AND',\n value: obj[i]\n });\n }\n }\n\n data.querys = querys;\n data.pageBean.page = page;\n this.pageResult.page = page;\n apiList.getNewsData(data, function (res) {\n _this3.pageResult.total = res.total;\n _this3.tableLoading = false;\n _this3.tableData = res.rows;\n\n _this3.tableData.forEach(function (item) {\n _this3.$set(item, 'isEdit', false);\n });\n });\n },\n handleCurrentChange: function handleCurrentChange(page) {\n this.params.pageBean = _objectSpread(_objectSpread({}, this.params.pageBean), {}, {\n page: page\n });\n this.handleSearch(page);\n },\n handleSizeChange: function handleSizeChange(pageSize) {\n this.params.pageBean = _objectSpread(_objectSpread({}, this.params.pageBean), {}, {\n pageSize: pageSize\n });\n this.handleSearch(1);\n },\n //获取删除数据id集合\n handleSelectionChange: function handleSelectionChange(val) {\n var arr = val.map(function (item) {\n return item.id;\n });\n this.deleteIds = arr.join(',');\n },\n //删除\n handleDelete: function handleDelete(row, index) {\n var _this4 = this;\n\n this.$confirm('确认删除吗?', this.$t('common.tips'), {\n confirmButtonText: this.$t('common.confirm'),\n cancelButtonText: this.$t('common.cancel'),\n type: 'error'\n }).then(function () {\n if (!row.id) {\n _this4.tableData.splice(index, 1);\n } else {\n _this4.tableLoading = true;\n apiList.deleteNewById(row.id, function (res) {\n if (res.state) {\n _this4.handleSearch(1);\n\n _this4.$message.success('删除成功');\n } else {\n _this4.tableLoading = false;\n }\n });\n }\n });\n }\n }\n};",null]}