From 6ef647cc0e9cfedb30fd8006112be59647971036 Mon Sep 17 00:00:00 2001 From: xy <271556543@qq.com> Date: Tue, 30 Apr 2024 17:30:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E5=8F=B0=E8=B5=84=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.staging | 4 +- src/layout/index.vue | 131 +- src/permission.js | 2 + src/store/modules/app.js | 4 + src/styles/sidebar.scss | 8 + src/styles/variables.scss | 3 +- src/views/away/index.vue | 170 ++ .../contract/components/addContractLedger.vue | 79 +- src/views/contract/contractEdit.vue | 1890 +++++++++++++++++ src/views/contract/contractLedger.vue | 153 +- src/views/contract/contractList.vue | 80 +- src/views/system/dictionary.vue | 18 +- 12 files changed, 2254 insertions(+), 288 deletions(-) create mode 100644 src/views/away/index.vue create mode 100644 src/views/contract/contractEdit.vue diff --git a/.env.staging b/.env.staging index 2dbfc15..48333b9 100644 --- a/.env.staging +++ b/.env.staging @@ -9,7 +9,7 @@ VUE_APP_UPLOAD_API = http://contract-sqhj.ali251.langye.net/api/admin/upload-fil VUE_APP_BASE_API = VUE_APP_OUT_Book = http://book-sqhj.ali251.langye.net VUE_APP_OUT_GDZC = http://hjjc-szemcgdzc.ali251.langye.net -VUE_APP_OUT_OLD = http://oa-sqhj.ali251.langye.net/index.php/admin -VUE_APP_OUT_URL = http://oa-sqhj.ali251.langye.net/index.php/admin +VUE_APP_OUT_OLD = http://oa-sqhj-test.ali251.langye.net/index.php/admin +VUE_APP_OUT_URL = http://oa-sqhj-test.ali251.langye.net/index.php/admin VUE_APP_OUT_GOODS = http://hjjc-szemc_goods-test.ali251.langye.net diff --git a/src/layout/index.vue b/src/layout/index.vue index 4a34b81..5400851 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -2,11 +2,10 @@
-
+
-
  • - - + + +
@@ -132,6 +109,7 @@ export default { mixins: [ResizeMixin], data() { return { + isIframe: false, active: 0, bookUrl: process.env.VUE_APP_OUT_Book, gdzcUrl: `${process.env.VUE_APP_OUT_GDZC}/member/oss_login?id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}`, @@ -183,7 +161,8 @@ export default { this.$router.push(item.path); }, }, - mounted() {}, + mounted() { + }, watch: { "$route.path": { handler: function (url) { @@ -218,13 +197,6 @@ export default { dom.onload = null; }) next() - }, - created() { - let gdzcIframe = document.createElement('iframe'); - gdzcIframe.src = `${process.env.VUE_APP_OUT_GDZC}/member/oss_login?id=${this.$store.state.user.userId}&username=${this.$store.state.user.username}` - gdzcIframe.onload = () => { - gdzcIframe = null; - } } }; @@ -233,6 +205,14 @@ export default { @import "~@/styles/mixin.scss"; @import "~@/styles/variables.scss"; +.app-view-container { + height: 100%; + padding-top: $topbarHeight; + + &:has(.main-container) { + padding-top: 0; + } +} .app-wrapper { @include clearfix; position: relative; @@ -247,11 +227,11 @@ export default { .top-head-bar { background: #338de3ff; - height: 50px; + height: $topbarHeight; filter: drop-shadow(0 1px 1px #49a0f3); display: grid; grid-template-columns: auto 0.5fr 6fr 0.2fr 1fr; - grid-template-rows: 50px; + grid-template-rows: $topbarHeight; grid-template-areas: "logo . menu . user"; z-index: 2000; @@ -261,7 +241,7 @@ export default { right: 0; &__logo { - height: 50px; + height: $topbarHeight; grid-area: logo; display: flex; align-items: center; @@ -406,10 +386,5 @@ iframe { left: 0; bottom: 0; } -.main-container { - iframe { - position: absolute; - } -} diff --git a/src/permission.js b/src/permission.js index 216913e..aaf1e94 100644 --- a/src/permission.js +++ b/src/permission.js @@ -21,6 +21,8 @@ const whiteList = ['/login'] // no redirect whitelist router.beforeEach(async (to, from, next) => { // start progress bar NProgress.start() + store.commit('app/SET_ISINIFRAME') + console.log('iframe',store.state.app.isInIframe) // set page title document.title = getPageTitle(to.meta.title) diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 069df3f..39327f0 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -11,6 +11,7 @@ const state = { }, device: "desktop", workerLayout: {}, + isInIframe: false, }; const getter = { layout: (state) => { @@ -18,6 +19,9 @@ const getter = { }, }; const mutations = { + SET_ISINIFRAME: (state) => { + state.isInIframe = self.frameElement && self.frameElement.tagName === "IFRAME" + }, TOGGLE_SIDEBAR: (state) => { state.sidebar.opened = !state.sidebar.opened; state.sidebar.withoutAnimation = false; diff --git a/src/styles/sidebar.scss b/src/styles/sidebar.scss index 8cbe794..47182f5 100644 --- a/src/styles/sidebar.scss +++ b/src/styles/sidebar.scss @@ -241,4 +241,12 @@ } + &:has(.top-head-bar) { + .main-container { + top: 0!important; + } + .sidebar-container { + top: 0!important; + } + } } diff --git a/src/styles/variables.scss b/src/styles/variables.scss index e553b63..2f33a69 100644 --- a/src/styles/variables.scss +++ b/src/styles/variables.scss @@ -13,10 +13,11 @@ $subMenuHover:#edf6ff; $submenuActiveBg:#dcf3ff; $sideBarWidth: 210px; - +$topbarHeight: 50px; // the :export directive is the magic sauce for webpack // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass :export { + topbarHeight: $topbarHeight; menuText: $menuText; menuActiveText: $menuActiveText; subMenuActiveText: $subMenuActiveText; diff --git a/src/views/away/index.vue b/src/views/away/index.vue new file mode 100644 index 0000000..39e6494 --- /dev/null +++ b/src/views/away/index.vue @@ -0,0 +1,170 @@ + + + + + diff --git a/src/views/contract/components/addContractLedger.vue b/src/views/contract/components/addContractLedger.vue index ca87aa2..88b1712 100644 --- a/src/views/contract/components/addContractLedger.vue +++ b/src/views/contract/components/addContractLedger.vue @@ -88,61 +88,7 @@
- - + @@ -344,7 +349,7 @@ ghost size="small" type="error" - >删除 + >删除 @@ -381,7 +386,7 @@ ($refs['editor'].isShowEditor = true, $refs['editor'].getDetail(scope.row.id)) " - >编辑 + >编辑 - - - - - - - - - - - - + + + + + + + + + + + + @@ -746,7 +751,7 @@
**关联预算计划
@@ -758,8 +763,8 @@ + + +
@@ -184,9 +192,11 @@ }, tableHeight: 0, //查询条件字段 - searchFields: { - KeyWord: "" + select: { + page: 1, + page_size: 20 }, + total: 0, tableData: [] } }, @@ -227,8 +237,9 @@ }, load() { var that = this; - listparameter().then(response => { + listparameter(this.select).then(response => { that.tableData = response.data; + this.total = response.total; }).catch(error => { //reject(error) }) @@ -249,7 +260,6 @@ } response.detail_list = response.detail; let result = Object.assign(that.form, response); - }).catch(error => { //reject(error) })