Commit f6081127 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents bc3c1976 b5d77aa8
......@@ -6,13 +6,13 @@
>返回上一级</a-button
>
<a-tab-pane key="1" tab="详情">
<AppDetailsPage :appInfo="appInfo"></AppDetailsPage>
<AppDetailsPage></AppDetailsPage>
</a-tab-pane>
<a-tab-pane key="2" tab="数据更新" force-render>
<DataUpdata :appInfo="appInfo"></DataUpdata>
<DataUpdata></DataUpdata>
</a-tab-pane>
<a-tab-pane key="3" tab="数据配置" force-render>
<FieldConfig :appInfo="appInfo"></FieldConfig>
<FieldConfig></FieldConfig>
</a-tab-pane>
</a-tabs>
</div>
......@@ -22,7 +22,6 @@
import AppDetailsPage from "./components/AppDetailsPage.vue";
import DataUpdata from "./components/DataUpdate.vue";
import FieldConfig from "./components/FieldConfig.vue";
import { getAppInfo } from "@/services/market";
export default {
components: {
AppDetailsPage,
......@@ -35,19 +34,8 @@ export default {
appInfo: {},
};
},
created() {
this.getAppInfo();
},
created() {},
methods: {
// 获取应用详情
async getAppInfo() {
let res = await getAppInfo({ id: this.appId });
if (res.data.code === 1) {
this.appInfo = res.data.data;
console.log(res.data.data);
}
},
handleBack() {
this.$router.back();
},
......
......@@ -17,7 +17,7 @@
<iframe
name="myIframe"
style="width: 100%; height: 100%"
:src="previewInfo.previewUrl"
:src="previewUrl"
frameborder="0"
></iframe>
</div>
......@@ -28,48 +28,21 @@ export default {
data() {
return {
previewInfo: this.$route.query,
isReady: false,
previewUrl: "",
};
},
created() {
// 接收子级返回首页指令
// window.onmessage = (res) => {
// if (res.data.message === "返回首页") {
// this.$router.push("/");
// }
// };
window.addEventListener("message", this.getChildrenMsg);
},
watch: {
isReady(newVal) {
if (newVal) {
this.sendInfo();
}
},
this.sendInfo();
},
methods: {
getChildrenMsg(res) {
if (res.data.type === "childStatus") {
this.isReady = res.data.isReady;
}
},
sendInfo() {
let obj = {
type: "siteInfo",
siteId: this.previewInfo.siteId,
appId: this.previewInfo.appId,
};
let siteId = this.previewInfo.siteId;
let appId = this.previewInfo.appId;
this.previewUrl = `${this.previewInfo.previewUrl}?siteId=${siteId}&appId=${appId}`;
/* eslint-disable */
myIframe.window.postMessage(obj, "*");
},
handleBack() {
this.$router.back();
// myIframe.window.postMessage(obj, "*");
},
},
beforeDestroy() {
window.removeEventListener("message", this.getChildrenMsg);
},
};
</script>
......
......@@ -103,24 +103,30 @@
ref="CheckSite"
:appList="[appId]"
:siteVisible.sync="siteVisible"
@checkSite="getAppInfo"
></CheckSite>
</div>
</template>
<script>
import { getVersionList, usedVersion, previewVersion } from "@/services/market";
import {
getAppInfo,
getVersionList,
usedVersion,
previewVersion,
} from "@/services/market";
import CheckSite from "../modal/CheckSite.vue";
export default {
props: {
// 应用信息
appInfo: {
type: Object,
required: true,
default: () => {
return {};
},
},
// appInfo: {
// type: Object,
// required: true,
// default: () => {
// return {};
// },
// },
},
components: {
CheckSite,
......@@ -166,6 +172,7 @@ export default {
: process.env.VUE_APP_API_BASE_URL,
columns,
appId: this.$route.query.id,
appInfo: {}, // 应用信息
current: 1,
size: 10,
total: 0,
......@@ -177,9 +184,17 @@ export default {
};
},
created() {
this.getAppInfo();
this.getVersions();
},
methods: {
// 获取应用详情
async getAppInfo() {
let res = await getAppInfo({ id: this.appId });
if (res.data.code === 1) {
this.appInfo = res.data.data;
}
},
// 获取历史版本
async getVersions() {
this.loading = true;
......
......@@ -61,16 +61,16 @@ import AddData from "../modal/AddData.vue";
import { mapGetters } from "vuex";
import { getDatasetList, deleteDataset } from "@/services/market";
export default {
props: {
// 应用信息
appInfo: {
type: Object,
required: true,
default: () => {
return {};
},
},
},
// props: {
// // 应用信息
// appInfo: {
// type: Object,
// required: true,
// default: () => {
// return {};
// },
// },
// },
components: {
AddData,
},
......
......@@ -66,16 +66,16 @@ import { getTempleteList, deleteTemplete } from "@/services/market";
import { mapMutations } from "vuex";
export default {
props: {
// 应用信息
appInfo: {
type: Object,
required: true,
default: () => {
return {};
},
},
},
// props: {
// // 应用信息
// appInfo: {
// type: Object,
// required: true,
// default: () => {
// return {};
// },
// },
// },
components: {
AddField,
},
......
......@@ -203,6 +203,7 @@ export default {
this.getAppList();
}
this.tableData = data;
console.log(data);
this.total = total;
}
},
......
......@@ -86,29 +86,11 @@
</template>
</a-table>
</div>
<!-- 分页 -->
<!-- <div class="pagination" v-if="leftTotal">
<a-pagination
v-model="leftCurrent"
:show-total="(total) => `共 ${total} 条`"
:total="leftTotal"
@change="changeLeft"
show-less-items
show-size-changer
show-quick-jumper
:pageSizeOptions="pageSizeOptions"
@showSizeChange="showSizeChange"
/>
</div> -->
</div>
<!-- 右 -->
<div class="right">
<div class="header">
<h3 class="titel">一体化事项列表</h3>
<!-- <a-radio-group class="titel" v-model="source" @change="onChangeMatter">
<a-radio-button :value="0"> 一体化事项列表 </a-radio-button>
<a-radio-button :value="1"> 自建事项列表 </a-radio-button>
</a-radio-group> -->
<div class="control">
<div>
<a-button type="primary" @click="handleAddAll"> 批量加入 </a-button>
......@@ -171,20 +153,6 @@
</template>
</a-table>
</div>
<!-- 分页 -->
<!-- <div class="pagination" v-if="rightTotal">
<a-pagination
v-model="rightCurrent"
:show-total="(total) => `共 ${total} 条`"
:total="rightTotal"
@change="changeRight"
show-less-items
show-size-changer
show-quick-jumper
:pageSizeOptions="pageSizeOptions"
@showSizeChange="showSizeChangeRight"
/>
</div> -->
</div>
</div>
</template>
......@@ -349,7 +317,7 @@ export default {
this.leftCurrent = 1;
this.getMatterSiteData();
},
// 左边删除
// 左边移除站点事项
handleDel(val, row) {
let _this = this;
this.$confirm({
......@@ -395,7 +363,7 @@ export default {
this.deleteData = data;
},
// 批量删除
// 批量移除站点事项
handleDelAll() {
if (this.deleteData.length <= 0) {
this.$message.warning("请先勾选数据");
......@@ -460,10 +428,9 @@ export default {
if (code === 1) {
this.$message.success(msg);
this.getMatterSiteData();
this.getMatterListData();
this.selectedRowKeys = [];
this.$bus.$emit("addMatterSiteData");
} else {
this.$message.error("加入失败");
}
},
// 右边删除
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment