diff --git a/src/assets/imgs/login-title.png b/src/assets/imgs/login-title.png index c178069..5704a28 100644 Binary files a/src/assets/imgs/login-title.png and b/src/assets/imgs/login-title.png differ diff --git a/src/assets/logo.png b/src/assets/logo.png index 85da192..3b04f4a 100644 Binary files a/src/assets/logo.png and b/src/assets/logo.png differ diff --git a/src/assets/logo_test.png b/src/assets/logo_test.png index b0054b7..1aef363 100644 Binary files a/src/assets/logo_test.png and b/src/assets/logo_test.png differ diff --git a/src/main.js b/src/main.js index 7441658..feb608e 100644 --- a/src/main.js +++ b/src/main.js @@ -56,6 +56,26 @@ Vue.prototype.$integrateData = (target,value) => { } } window.$router = router; + +// if (window.__POWERED_BY_WUJIE__) { +// let instance; +// window.__WUJIE_MOUNT = () => { +// instance = new Vue({ +// router, +// store, +// render: h => h(App) +// }).$mount("#app") +// }; +// window.__WUJIE_UNMOUNT = () => { +// instance.$destroy(); +// }; +// } else { +// new Vue({ +// router, +// store, +// render: h => h(App) +// }).$mount("#app") +// } new Vue({ el: '#app', router, diff --git a/src/views/contract/contractEdit.vue b/src/views/contract/contractEdit.vue index db4a07d..3496844 100644 --- a/src/views/contract/contractEdit.vue +++ b/src/views/contract/contractEdit.vue @@ -1284,6 +1284,7 @@ export default { hideFormItem () { let hideJSON; try { + if (!this.$route.query.hide_json) return; hideJSON = JSON.parse(this.$route.query.hide_json) if (!hideJSON) return console.log(hideJSON) @@ -1302,6 +1303,7 @@ export default { handleDefaultJSON () { let defaultJSON; try { + if (!this.$route.query.default_json) return; defaultJSON = JSON.parse(this.$route.query.default_json) if (!defaultJSON) return for (let key in defaultJSON) { @@ -1490,8 +1492,8 @@ export default { } else { this.form.contract_plan_links = [] } - this.form.is_purchase = this.flowIds.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 1 : 0; - this.form.is_contract = this.flowIds.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 0 : 1; + this.form.is_purchase = this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 1 : 0; + this.form.is_contract = this.flowIds?.find(i => i.id == this.form.flow_mod_id)?.type == 2 ? 0 : 1; if (this.type === 'add') { addContrant(this.form,true).then(res => { this.btnLoading = false diff --git a/src/views/contract/contractList.vue b/src/views/contract/contractList.vue index e3e998b..0c53f2a 100644 --- a/src/views/contract/contractList.vue +++ b/src/views/contract/contractList.vue @@ -269,7 +269,7 @@ 新增 - {{ 0 }} + {{ moneyFormatter(statistic.progress.money_total_1 || 0) }} 年初预算合计金额 - {{ 0}} + {{ moneyFormatter(statistic.progress.money_total_2 || 0) }} 调整后预算合计金额 - {{ 0 }} + {{moneyFormatter(statistic.progress.use_money_total || 0)}} 已支付金额 - + - + @@ -45,6 +45,7 @@ import { moneyFormatter } from "@/utils"; import echarts from 'echarts' import SvgIcon from "@/components/SvgIcon/index.vue"; import MyProgress from "@/components/Progress/index.vue"; +import {statistic} from "@/api/dashboard/notice"; export default { components: { @@ -60,31 +61,51 @@ export default { i: "9", name: "项目支出", }, + inject: { + getStatistic: { + default: () => { + return () => { + return { + statistic: { + departmentList: [ + { + money_total_1: "1900000.00", + money_total_2: "0.00", + ids: "11", + plan_department_id: 2, + use_money_total: 0, + money_total: "0.00", + end_money: 0, + plan_department: { + id: 2, + pid: 0, + name: "办公室(党建作风办)", + manager_id: 7, + leader_id: 4, + sortnumber: 1, + created_at: "2021-06-22 07:01:41", + updated_at: "2023-03-22 14:56:51", + deleted_at: null, + }, + }, + ], + }, + }; + } + }, + }, + }, data() { return { tableHeight: 200, - list: [ - { - money_total_1: "1900000.00", - money_total_2: "0.00", - ids: "11", - plan_department_id: 2, - use_money_total: 0, - money_total: "0.00", - end_money: 0, - plan_department: { - id: 2, - pid: 0, - name: "办公室(党建作风办)", - manager_id: 7, - leader_id: 4, - sortnumber: 1, - created_at: "2021-06-22 07:01:41", - updated_at: "2023-03-22 14:56:51", - deleted_at: null, - }, - }, - ], + statistic: { + progress: { + money_total_1: 0, + money_total_2: 0, + use_money_total: 0 + } + }, + list: [], table: [ { title: "序号", @@ -170,6 +191,7 @@ export default { }; }, methods: { + moneyFormatter, init() { let cardDom = this.$el; let cardTitleH = 58; @@ -179,9 +201,23 @@ export default { elementResize.listenTo(cardDom,ele => { this.tableHeight = cardDom.getBoundingClientRect().height - 40 - cardTitleH }) + }, + async getStatistics() { + if(/^\/system/.test(this.$route.path)) return + + const res = await statistic(this.select,true) + this.statistic = res + this.$emit('send-data',res) + }, + }, + computed: { + departments () { + return this.getStatistics()?.statistic?.departmentList } }, - created() {}, + created() { + this.getStatistic(); + }, mounted() { this.init(); } diff --git a/vue.config.js b/vue.config.js index 262a6ec..d63c83b 100644 --- a/vue.config.js +++ b/vue.config.js @@ -70,7 +70,8 @@ module.exports = { ['^' + process.env.VUE_APP_DOMIAN]: process.env.VUE_APP_DOMIAN } } - } + }, + headers: { "Access-Control-Allow-Origin": "*" }, }, configureWebpack: { // provide the app's title in webpack's name field, so that