Merge branch 'master' into dev
Showing
5 changed files
with
250 additions
and
6 deletions
| ... | @@ -231,5 +231,23 @@ export function getZjgcdyList (data) { | ... | @@ -231,5 +231,23 @@ export function getZjgcdyList (data) { |
| 231 | }) | 231 | }) |
| 232 | } | 232 | } |
| 233 | 233 | ||
| 234 | // 数据上报推送查询 | ||
| 235 | export function getSjsbPushList (data) { | ||
| 236 | return request({ | ||
| 237 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/list', | ||
| 238 | method: 'post', | ||
| 239 | data | ||
| 240 | }) | ||
| 241 | } | ||
| 242 | |||
| 243 | // 数据上报推送 | ||
| 244 | export function pushSjsbRecord (data) { | ||
| 245 | return request({ | ||
| 246 | url: SERVER.SERVERAPI + '/rest/system/sysPushRecord/push', | ||
| 247 | method: 'post', | ||
| 248 | data | ||
| 249 | }) | ||
| 250 | } | ||
| 251 | |||
| 234 | 252 | ||
| 235 | 253 | ... | ... |
| ... | @@ -60,7 +60,7 @@ Object.keys(filters).forEach(key => { | ... | @@ -60,7 +60,7 @@ Object.keys(filters).forEach(key => { |
| 60 | }) | 60 | }) |
| 61 | Vue.config.productionTip = false | 61 | Vue.config.productionTip = false |
| 62 | 62 | ||
| 63 | axios.get("./config.json") | 63 | axios.get("/bdcdj/config.json") |
| 64 | .then((res) => { | 64 | .then((res) => { |
| 65 | Vue.prototype.BASE_API = res.data | 65 | Vue.prototype.BASE_API = res.data |
| 66 | localStorage.setItem('ApiUrl', JSON.stringify(res.data)); | 66 | localStorage.setItem('ApiUrl', JSON.stringify(res.data)); | ... | ... |
src/views/sjgx/sbxtsjts/djbcxdata.js
0 → 100644
| 1 | import filter from '@/utils/filter.js' | ||
| 2 | let vm = null | ||
| 3 | |||
| 4 | const sendThis = (_this) => { | ||
| 5 | vm = _this | ||
| 6 | } | ||
| 7 | class data extends filter { | ||
| 8 | constructor() { | ||
| 9 | super() | ||
| 10 | } | ||
| 11 | columns () { | ||
| 12 | return [ | ||
| 13 | { | ||
| 14 | label: '序号', | ||
| 15 | type: 'index', | ||
| 16 | width: '50', | ||
| 17 | render: (h, scope) => { | ||
| 18 | return ( | ||
| 19 | <div> | ||
| 20 | {(vm.pageData.currentPage - 1) * vm.pageData.pageSize + scope.$index + 1} | ||
| 21 | </div> | ||
| 22 | ) | ||
| 23 | } | ||
| 24 | }, | ||
| 25 | { | ||
| 26 | prop: "ywh", | ||
| 27 | label: "业务号", | ||
| 28 | width: '110', | ||
| 29 | }, | ||
| 30 | { | ||
| 31 | label: "权属状态", | ||
| 32 | width: '80', | ||
| 33 | render: (h, scope) => { | ||
| 34 | let obj = { | ||
| 35 | "0": { | ||
| 36 | text: '成功', | ||
| 37 | color: '#4BD863' | ||
| 38 | }, | ||
| 39 | "1": { | ||
| 40 | text: '失败', | ||
| 41 | color: 'red' | ||
| 42 | } | ||
| 43 | } | ||
| 44 | let textName = obj[scope.row.status]?.text || '' | ||
| 45 | let colorName = obj[scope.row.status]?.color || '' | ||
| 46 | return ( | ||
| 47 | <div> | ||
| 48 | <span style={`color:${colorName}`}>● </span> | ||
| 49 | <span >{textName}</span> | ||
| 50 | </div> | ||
| 51 | ) | ||
| 52 | } | ||
| 53 | }, | ||
| 54 | { | ||
| 55 | prop: "createtime", | ||
| 56 | label: "创建时间", | ||
| 57 | width: '180', | ||
| 58 | }, | ||
| 59 | { | ||
| 60 | prop: "json", | ||
| 61 | label: "json体", | ||
| 62 | }, | ||
| 63 | { | ||
| 64 | label: '操作', | ||
| 65 | width: '130', | ||
| 66 | render: (h, scope) => { | ||
| 67 | return ( | ||
| 68 | <div> | ||
| 69 | <el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.openDialog(scope.row) }}>推送</el-button> | ||
| 70 | </div> | ||
| 71 | ) | ||
| 72 | } | ||
| 73 | } | ||
| 74 | ] | ||
| 75 | } | ||
| 76 | |||
| 77 | } | ||
| 78 | let datas = new data() | ||
| 79 | export { | ||
| 80 | datas, | ||
| 81 | sendThis | ||
| 82 | } |
src/views/sjgx/sbxtsjts/sbxtsjts.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div class="from-clues"> | ||
| 3 | <!-- 表单部分 --> | ||
| 4 | <div class="from-clues-header"> | ||
| 5 | <el-form :model="queryForm" ref="queryForm" @submit.native.prevent label-width="70px"> | ||
| 6 | <el-row> | ||
| 7 | <el-col :span="5"> | ||
| 8 | <el-form-item label="业务号"> | ||
| 9 | <el-input placeholder="请输入业务号" v-model="queryForm.ywh" clearable class="width100"> | ||
| 10 | </el-input> | ||
| 11 | </el-form-item> | ||
| 12 | </el-col> | ||
| 13 | |||
| 14 | <el-col :span="4" class="btnColRight"> | ||
| 15 | <el-form-item> | ||
| 16 | <el-button type="primary" native-type="submit" @click="handleSearch">查询</el-button> | ||
| 17 | </el-form-item> | ||
| 18 | </el-col> | ||
| 19 | </el-row> | ||
| 20 | </el-form> | ||
| 21 | </div> | ||
| 22 | <!-- 表格 --> | ||
| 23 | <div class="from-clues-content"> | ||
| 24 | <lb-table :page-size="pageData.size" class="loadingtext" @sort-change="handleSort" | ||
| 25 | :current-page.sync="pageData.current" :total="tableData.total" @size-change="handleSizeChange" | ||
| 26 | @p-current-change="handleCurrentChange" :column="tableData.columns" :data="tableData.data"> | ||
| 27 | </lb-table> | ||
| 28 | </div> | ||
| 29 | </div> | ||
| 30 | </template> | ||
| 31 | <script> | ||
| 32 | import { mapGetters } from "vuex"; | ||
| 33 | import table from "@/utils/mixin/table"; | ||
| 34 | import { datas, sendThis } from "./djbcxdata"; | ||
| 35 | import { getSjsbPushList, pushSjsbRecord } from "@/api/zhcx.js"; | ||
| 36 | |||
| 37 | export default { | ||
| 38 | name: "djbcx", | ||
| 39 | mixins: [table], | ||
| 40 | mounted () { | ||
| 41 | sendThis(this); | ||
| 42 | this.queryClick() | ||
| 43 | }, | ||
| 44 | data () { | ||
| 45 | return { | ||
| 46 | queryForm: { | ||
| 47 | qllx: "", | ||
| 48 | bdcdyh: "", | ||
| 49 | bdcqzh: "", | ||
| 50 | ywh: "", | ||
| 51 | }, | ||
| 52 | pageData: { | ||
| 53 | current: 1, | ||
| 54 | size: 10, | ||
| 55 | total: 0, | ||
| 56 | }, | ||
| 57 | tableData: { | ||
| 58 | columns: datas.columns(), | ||
| 59 | data: [], | ||
| 60 | }, | ||
| 61 | qllxs: [], | ||
| 62 | isDialog: false, | ||
| 63 | djbxxData: {}, | ||
| 64 | }; | ||
| 65 | }, | ||
| 66 | computed: { | ||
| 67 | ...mapGetters(["dictData"]), | ||
| 68 | }, | ||
| 69 | methods: { | ||
| 70 | // 初始化数据 | ||
| 71 | queryClick () { | ||
| 72 | this.$startLoading() | ||
| 73 | getSjsbPushList({ ...this.queryForm, ...this.pageData }).then((res) => { | ||
| 74 | this.$endLoading() | ||
| 75 | if (res.code === 200) { | ||
| 76 | let { total, records } = res.result; | ||
| 77 | this.tableData.data = records; | ||
| 78 | this.tableData.total = total; | ||
| 79 | } | ||
| 80 | }); | ||
| 81 | }, | ||
| 82 | handleSort (name, sort) { | ||
| 83 | console.log(name, sort); | ||
| 84 | }, | ||
| 85 | pushRecord (row, done) { | ||
| 86 | this.$startLoading() | ||
| 87 | pushSjsbRecord(row).then((res) => { | ||
| 88 | this.$endLoading() | ||
| 89 | if (res.code === 200) { | ||
| 90 | this.$message.success("推送成功"); | ||
| 91 | this.queryClick(); | ||
| 92 | done(); | ||
| 93 | } else { | ||
| 94 | this.$message.warning(res.message); | ||
| 95 | } | ||
| 96 | }); | ||
| 97 | }, | ||
| 98 | // 高级查询 | ||
| 99 | moreQueryClick () { }, | ||
| 100 | openDialog (scroll) { | ||
| 101 | |||
| 102 | const h = this.$createElement; | ||
| 103 | this.$msgbox({ | ||
| 104 | title: '推送', | ||
| 105 | message: h('p', null, [ | ||
| 106 | h('span', null, '是否推送 '), | ||
| 107 | h('i', { style: 'color: teal' }, scroll.ywh), | ||
| 108 | h('span', null, ' 记录') | ||
| 109 | ]), | ||
| 110 | showCancelButton: true, | ||
| 111 | confirmButtonText: '确定', | ||
| 112 | cancelButtonText: '取消', | ||
| 113 | beforeClose: (action, instance, done) => { | ||
| 114 | if (action === 'confirm') { | ||
| 115 | this.pushRecord(scroll, done); | ||
| 116 | } else { | ||
| 117 | done(); | ||
| 118 | } | ||
| 119 | } | ||
| 120 | }).then(action => {}); | ||
| 121 | |||
| 122 | }, | ||
| 123 | } | ||
| 124 | } | ||
| 125 | </script> | ||
| 126 | <style scoped lang="scss"> | ||
| 127 | @import "~@/styles/public.scss"; | ||
| 128 | |||
| 129 | .icon-circle { | ||
| 130 | position: relative; | ||
| 131 | } | ||
| 132 | |||
| 133 | .icon-circle::before { | ||
| 134 | content: ""; | ||
| 135 | width: 4px; | ||
| 136 | height: 4px; | ||
| 137 | border-radius: 50%; | ||
| 138 | background: #000; | ||
| 139 | top: 0px; | ||
| 140 | left: 0px; | ||
| 141 | } | ||
| 142 | </style> |
| ... | @@ -6,7 +6,6 @@ function resolve (dir) { | ... | @@ -6,7 +6,6 @@ function resolve (dir) { |
| 6 | return path.join(__dirname, dir) | 6 | return path.join(__dirname, dir) |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | const name = defaultSettings.title | ||
| 10 | const port = process.env.port || process.env.npm_config_port || 8888 // dev port | 9 | const port = process.env.port || process.env.npm_config_port || 8888 // dev port |
| 11 | 10 | ||
| 12 | // All configuration item explanations can be find in https://cli.vuejs.org/config/ | 11 | // All configuration item explanations can be find in https://cli.vuejs.org/config/ |
| ... | @@ -49,7 +48,7 @@ module.exports = { | ... | @@ -49,7 +48,7 @@ module.exports = { |
| 49 | } | 48 | } |
| 50 | }, | 49 | }, |
| 51 | css: { | 50 | css: { |
| 52 | extract: false, // 是否使用css分离插件 ExtractTextPlugin | 51 | extract: true, // 是否使用css分离插件 ExtractTextPlugin |
| 53 | sourceMap: false, // 开启 CSS source maps? | 52 | sourceMap: false, // 开启 CSS source maps? |
| 54 | loaderOptions: { | 53 | loaderOptions: { |
| 55 | sass: { | 54 | sass: { |
| ... | @@ -60,7 +59,10 @@ module.exports = { | ... | @@ -60,7 +59,10 @@ module.exports = { |
| 60 | }, | 59 | }, |
| 61 | // configureWebpack通过操作对象的形式,来修改默认的webpack配置 | 60 | // configureWebpack通过操作对象的形式,来修改默认的webpack配置 |
| 62 | configureWebpack: { | 61 | configureWebpack: { |
| 63 | name: name, | 62 | optimization: { |
| 63 | usedExports: true, | ||
| 64 | minimize: true | ||
| 65 | }, | ||
| 64 | entry: { | 66 | entry: { |
| 65 | app: './src/main.js' | 67 | app: './src/main.js' |
| 66 | }, | 68 | }, |
| ... | @@ -69,7 +71,7 @@ module.exports = { | ... | @@ -69,7 +71,7 @@ module.exports = { |
| 69 | '@': resolve('src') | 71 | '@': resolve('src') |
| 70 | } | 72 | } |
| 71 | }, | 73 | }, |
| 72 | devtool: '#eval-source-map' //测试 | 74 | devtool: process.env.NODE_ENV === 'development' ? '#eval-source-map' : false |
| 73 | }, | 75 | }, |
| 74 | // chainWebpack通过链式编程的形式,来修改默认的webpack配置 | 76 | // chainWebpack通过链式编程的形式,来修改默认的webpack配置 |
| 75 | chainWebpack (config) { | 77 | chainWebpack (config) { |
| ... | @@ -83,8 +85,8 @@ module.exports = { | ... | @@ -83,8 +85,8 @@ module.exports = { |
| 83 | include: 'initial' | 85 | include: 'initial' |
| 84 | } | 86 | } |
| 85 | ]) | 87 | ]) |
| 86 | config.plugins.delete('prefetch') | ||
| 87 | // when there are many pages, it will cause too many meaningscss requests | 88 | // when there are many pages, it will cause too many meaningscss requests |
| 89 | config.plugins.delete('prefetch') | ||
| 88 | config.module | 90 | config.module |
| 89 | .rule('svg') | 91 | .rule('svg') |
| 90 | .exclude.add(resolve('src/image/icons')) | 92 | .exclude.add(resolve('src/image/icons')) | ... | ... |
-
Please register or sign in to post a comment