修改参数多值顺序问题
This commit is contained in:
+7
-5
@@ -831,7 +831,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
ParamsConfigDataEO paramsConfigDataEO = this.getConfigDataEOByConfigIdAndCollectManifestId(paramsConfigId, paramsCollectManifestId, paramsConfigDataEOList); // 参数配置数据
|
||||
List<ParamsConfigDataVO> paramsConfigDataVOList = this.getConfigDataVOList(controlType, paramsConfigEO, paramsConfigDataEO, collectManifestEO); // 重新组合配置数据
|
||||
String key = UUID.randomUUID().toString().replaceAll("-", "");
|
||||
paramsConfigDataVO.put(key, paramsConfigDataVOList);
|
||||
paramsConfigDataVO.put("0+" + key, paramsConfigDataVOList);
|
||||
}
|
||||
configMap.put("controlType",controlType);
|
||||
configMap.put("paramsConfigData",paramsConfigDataVO);
|
||||
@@ -1637,6 +1637,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
paramsConfigDataEO.setId(oldConfigDataEOs.get(0).getId());
|
||||
}
|
||||
}
|
||||
paramsConfigDataEO.setId(configDataMap.getKey());
|
||||
|
||||
paramsConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||
paramsConfigDataEO.setParamsConfigId(paramsConfigEOId);
|
||||
@@ -1737,9 +1738,9 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
pcdRemoveWrap.lambda().in(ParamsConfigDataEO::getParamsCollectManifestId,paramsCollectManifestIdList);
|
||||
this.paramsConfigDataEOService.remove(pcdRemoveWrap);
|
||||
|
||||
newConfigDataEOList.forEach(newConfigDataEO -> {
|
||||
newConfigDataEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
});
|
||||
// newConfigDataEOList.forEach(newConfigDataEO -> {
|
||||
// newConfigDataEO.setId(UUID.randomUUID().toString().replace("-",""));
|
||||
// });
|
||||
this.paramsConfigDataEOService.saveOrUpdateBatch(newConfigDataEOList);
|
||||
}
|
||||
|
||||
@@ -1780,6 +1781,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
Integer orderNum = (Integer) paramsConfigDataVOList.get(0).get("orderNum");
|
||||
if (CollectionUtil.isNotEmpty(paramsConfigDataVOList)) {
|
||||
ParamsConfigDataEO paramsConfigDataEO = new ParamsConfigDataEO();
|
||||
paramsConfigDataEO.setId(configDataMap.getKey());
|
||||
|
||||
for (Map<String, Object> paramsConfigDataVO : paramsConfigDataVOList) {
|
||||
|
||||
@@ -3374,7 +3376,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
for (ParamsConfigDataEO configDataEO : configDataEOList) {
|
||||
ParamsReportConfigDataEO addReportConfigDataEO = new ParamsReportConfigDataEO();
|
||||
BeanUtils.copyProperties(configDataEO, addReportConfigDataEO);
|
||||
addReportConfigDataEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
// addReportConfigDataEO.setId(UUID.randomUUID().toString().replace("-", ""));
|
||||
addReportConfigDataEO.setParamsConfigId(configIdMap.get(configEO.getId()));
|
||||
addReportConfigDataEO.setParamsCollectManifestId(reportDetailId);
|
||||
addReportConfigDataEOList.add(addReportConfigDataEO);
|
||||
|
||||
+1
@@ -2042,6 +2042,7 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl<ParamsReportDet
|
||||
|
||||
paramsReportConfigDataEO.setParamsCollectManifestId(paramsCollectManifestId);
|
||||
paramsReportConfigDataEO.setParamsConfigId(paramsReportConfigEOId);
|
||||
paramsReportConfigDataEO.setId(configDataId);
|
||||
|
||||
newConfigDataEOList.add(paramsReportConfigDataEO);
|
||||
}
|
||||
|
||||
Vendored
+4
-1
@@ -1,3 +1,6 @@
|
||||
img {
|
||||
.my-photo {
|
||||
width: 100%;
|
||||
}
|
||||
.container{
|
||||
padding: 0!important;
|
||||
}
|
||||
@@ -1828,7 +1828,7 @@ module.exports = {
|
||||
proportion:'Proportion',
|
||||
projectProgressStatistics:'Project Progress Statistics',
|
||||
GRPSystemProjectProgressStatistics:'GRP system project progress statistics',
|
||||
statisticalNodes:'Statistical Nodes',
|
||||
statisticalNodes:'Responsible Department',
|
||||
proportionWithInTheAreaOfResponsibility:'Proportion within the area of responsibility',
|
||||
contentsearch:'Content Search',
|
||||
masterProject:'Master Project',
|
||||
|
||||
@@ -1928,7 +1928,7 @@ module.exports = {
|
||||
proportion:'占比',
|
||||
projectProgressStatistics:'项目进度统计',
|
||||
GRPSystemProjectProgressStatistics:'GRP系统项目进度统计',
|
||||
statisticalNodes:'统计节点',
|
||||
statisticalNodes:'责任部门',
|
||||
proportionWithInTheAreaOfResponsibility:'责任领域内占比',
|
||||
contentsearch:'内容搜索',
|
||||
masterProject:'主项目',
|
||||
@@ -3833,7 +3833,7 @@ module.exports = {
|
||||
proportion:'占比',
|
||||
projectProgressStatistics:'项目进度统计',
|
||||
GRPSystemProjectProgressStatistics:'GRP系统项目进度统计',
|
||||
statisticalNodes:'统计节点',
|
||||
statisticalNodes:'责任部门',
|
||||
proportionWithInTheAreaOfResponsibility:'责任领域内占比',
|
||||
contentsearch:'内容搜索',
|
||||
masterProject:'主项目',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
<div class='box'>
|
||||
<!-- 纯文本-->
|
||||
<div v-if='detailDate.controlType === "1" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="text"'>
|
||||
@@ -93,7 +93,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@
|
||||
</div>
|
||||
<!-- 默认值-->
|
||||
<div v-if='detailDate.controlType === "11" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="text"'>
|
||||
@@ -128,7 +128,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -136,7 +136,7 @@
|
||||
</div>
|
||||
<!-- 纯下拉单选-->
|
||||
<div v-else-if='detailDate.controlType === "2" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type === "pull"'>
|
||||
@@ -156,7 +156,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -164,7 +164,7 @@
|
||||
</div>
|
||||
<!-- 纯下拉多选-->
|
||||
<div v-else-if='detailDate.controlType === "3" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' style='flex: 1'
|
||||
<div v-for='(item,index) in key' :key='index' style='flex: 1'
|
||||
class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block;" class='valflex'
|
||||
@@ -186,7 +186,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -194,7 +194,7 @@
|
||||
</div>
|
||||
<!-- 纯附件-->
|
||||
<div v-else-if='detailDate.controlType === "4" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' style='flex: 1'
|
||||
<div v-for='(item,index) in key' :key='index' style='flex: 1'
|
||||
class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
@@ -210,7 +210,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -218,7 +218,7 @@
|
||||
</div>
|
||||
<!-- 文本+下拉单选-->
|
||||
<div v-else-if='detailDate.controlType === "5" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="pull"'>
|
||||
@@ -320,7 +320,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -328,7 +328,7 @@
|
||||
</div>
|
||||
<!-- 文本+下拉多选-->
|
||||
<div v-else-if='detailDate.controlType === "6" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block"
|
||||
:class="{'multiple':itemval.type==='pull_more'?true:false}"
|
||||
@@ -432,7 +432,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -440,7 +440,7 @@
|
||||
</div>
|
||||
<!-- 文本+附件-->
|
||||
<div v-else-if='detailDate.controlType === "7" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
<div class="textClass" v-if='itemval.type==="text"'>
|
||||
@@ -537,7 +537,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -545,7 +545,7 @@
|
||||
</div>
|
||||
<!-- 下拉单选+附件-->
|
||||
<div v-else-if='detailDate.controlType === "8" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]'
|
||||
:key='index1' style="display: inline-block" class='valflex'>
|
||||
<!-- <div v-for='(itemval,val) in val' :key='val'>-->
|
||||
@@ -574,7 +574,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -582,7 +582,7 @@
|
||||
</div>
|
||||
<!-- 下拉多选+附件-->
|
||||
<div v-else-if='detailDate.controlType === "9" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block"
|
||||
:class="{'multiple':itemval.type==='pull_more'?true:false}"
|
||||
@@ -613,7 +613,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -621,7 +621,7 @@
|
||||
</div>
|
||||
<!-- 文本+下拉单选+附件-->
|
||||
<div v-else-if='detailDate.controlType === "10" && detailDate.paramsConfigData' class='add_flex'>
|
||||
<div v-for='(item,index) in Object.keys(detailDate.paramsConfigData)' :key='index' class='add-width'>
|
||||
<div v-for='(item,index) in key' :key='index' class='add-width'>
|
||||
<!-- <div v-for='(item,index) in detailDateList' :key='index' class='add-width'>-->
|
||||
<div v-for='(itemval,index1) in detailDate.paramsConfigData[item]' :key='index1'
|
||||
style="display: inline-block" class='valflex'>
|
||||
@@ -732,7 +732,7 @@
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length - 1 == index && index < 9">
|
||||
<a-icon type="plus"/>
|
||||
</div>
|
||||
<div @click="delconfig(item)" class='delicon'
|
||||
<div @click="delconfig(item,index)" class='delicon'
|
||||
v-if="Object.keys(detailDate.paramsConfigData).length > 1">
|
||||
<a-icon type="minus"/>
|
||||
</div>
|
||||
@@ -765,7 +765,8 @@
|
||||
detailDatetransformation: [],
|
||||
fileNameOne: '',
|
||||
fileNameTwo: '',
|
||||
fileIndex: ''
|
||||
fileIndex: '',
|
||||
key:[],
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@@ -788,6 +789,11 @@
|
||||
// })
|
||||
// this.detailDatetransformation.push(item)
|
||||
})
|
||||
this.key = Object.keys(this.detailDate.paramsConfigData).sort((a, b) => {
|
||||
let index = a.lastIndexOf('+')
|
||||
let index1 = b.lastIndexOf('+')
|
||||
return a.slice(0, index) - b.slice(0, index1)
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
onInput(r) {
|
||||
@@ -857,14 +863,27 @@
|
||||
},
|
||||
|
||||
addconfig() {
|
||||
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData)
|
||||
let paramsConfigData = Object.keys(this.detailDate.paramsConfigData).sort((a, b) => {
|
||||
let index = a.lastIndexOf('+')
|
||||
let index1 = b.lastIndexOf('+')
|
||||
return a.slice(0, index) - b.slice(0, index1)
|
||||
})
|
||||
for (let i = 0; i < paramsConfigData.length; i++) {
|
||||
// this.detailDate.paramsConfigData[paramsConfigData[i]][0].orderNum = i + 1
|
||||
if (i == paramsConfigData.length - 1) {
|
||||
let name = paramsConfigData[i]
|
||||
let generateRandom = this.generateRandom()
|
||||
console.log(generateRandom)
|
||||
let index = name.lastIndexOf('+')
|
||||
let num
|
||||
if (index == '-1') {
|
||||
num = 0
|
||||
} else {
|
||||
num = name.slice(0, index)
|
||||
}
|
||||
console.log(num)
|
||||
num = parseInt(num)
|
||||
let generateRandom = (num + 1) + '+' + this.generateRandom()
|
||||
this.detailDate.paramsConfigData[generateRandom] = JSON.parse(JSON.stringify(this.detailDate.paramsConfigData[name]))
|
||||
this.detailDate.paramsConfigData[generateRandom].forEach(res => {
|
||||
this.detailDate.paramsConfigData[generateRandom].forEach((res, index) => {
|
||||
if (res.type === 'pull_more') {
|
||||
res.dataValue = []
|
||||
} else {
|
||||
@@ -873,7 +892,20 @@
|
||||
})
|
||||
}
|
||||
}
|
||||
this.detailDate.paramsConfigData = { ...this.detailDate.paramsConfigData }
|
||||
const ordered = {}
|
||||
let that = this
|
||||
|
||||
Object.keys(this.detailDate.paramsConfigData).sort().forEach(function(key) {
|
||||
ordered[key] = that.detailDate.paramsConfigData[key]
|
||||
})
|
||||
console.log(ordered)
|
||||
this.key = Object.keys(this.detailDate.paramsConfigData).sort((a, b) => {
|
||||
let index = a.lastIndexOf('+')
|
||||
let index1 = b.lastIndexOf('+')
|
||||
return a.slice(0, index) - b.slice(0, index1)
|
||||
})
|
||||
console.log(this.key)
|
||||
this.detailDate.paramsConfigData = { ...ordered }
|
||||
this.$emit('consolidateData')
|
||||
// postAction('params/configData/add', {
|
||||
// paramsCollectManifestId: this.recordList.id,
|
||||
@@ -885,8 +917,9 @@
|
||||
// }
|
||||
// })
|
||||
},
|
||||
delconfig(item) {
|
||||
delconfig(item,index) {
|
||||
delete this.detailDate.paramsConfigData[item]
|
||||
this.key.splice(index,1)
|
||||
this.detailDate.paramsConfigData = { ...this.detailDate.paramsConfigData }
|
||||
this.$emit('consolidateData')
|
||||
// for (const key in this.detailDate.paramsConfigData) {
|
||||
|
||||
@@ -8,59 +8,60 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { kkFileView } from '@/utils/kkfileView'
|
||||
import { kkFileView } from '@/utils/kkfileView'
|
||||
import { Dialog } from 'vant'
|
||||
|
||||
export default {
|
||||
name: 'phoneProblemKnowledgeBaseFile',
|
||||
data() {
|
||||
return {
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'NIO GRP'
|
||||
// this.url = 'http://localhost:3000/phoneHome'
|
||||
this.url = kkFileView(this.$route.query.fileName,this.$route.query.fileId)
|
||||
},
|
||||
methods: {
|
||||
loadFrame() {
|
||||
const iframe = document.getElementById("iframeEle");
|
||||
const body = iframe.contentWindow.document;
|
||||
const head = body.getElementsByTagName('head')
|
||||
const cssLink = document.createElement("link");
|
||||
cssLink.href = "/iframe.css";
|
||||
cssLink.rel = "stylesheet";
|
||||
cssLink.type = "text/css";
|
||||
head[0].appendChild(cssLink);
|
||||
},
|
||||
export default {
|
||||
name: 'phoneProblemKnowledgeBaseFile',
|
||||
data() {
|
||||
return {
|
||||
url: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
document.title = 'NIO GRP'
|
||||
// this.url = 'http://localhost:3000/phoneHome'
|
||||
this.url = kkFileView(this.$route.query.fileName, this.$route.query.fileId)
|
||||
},
|
||||
methods: {
|
||||
loadFrame() {
|
||||
const iframe = document.getElementById('iframeEle')
|
||||
const body = iframe.contentWindow.document
|
||||
const head = body.getElementsByTagName('head')
|
||||
const cssLink = document.createElement('link')
|
||||
cssLink.href = '/iframe.css'
|
||||
cssLink.rel = 'stylesheet'
|
||||
cssLink.type = 'text/css'
|
||||
head[0].appendChild(cssLink)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
html {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
html {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: scroll;
|
||||
}
|
||||
body {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.box {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#iframeEle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#iframeEle {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user