|
@@ -206,15 +206,56 @@
|
|
|
>确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <!-- 公式 -->
|
|
|
+ <el-dialog title="元素公式" :visible.sync="formulaCompVisible" fullscreen append-to-body class="full-dialog">
|
|
|
+ <FormulaEdit :wbsid="wbsid" :nodeid="nodeid" :eleid="eleid" :projectid="pid" @hideDialog="formulaCompVisible = false" v-if="formulaCompVisible"></FormulaEdit>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</basic-container>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import FormulaEdit from '@/views/formula/edit.vue'
|
|
|
+
|
|
|
import { getExcelHtml } from '@/api/exctab/excelmodel'
|
|
|
import { getElementInfoByTabId, submit, dictionarydataType, submitBatch } from '@/api/exctab/editelement'
|
|
|
import Vue from 'vue'
|
|
|
export default {
|
|
|
+ components:{
|
|
|
+ FormulaEdit
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ pkeyId:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ excelId:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ id:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ initTableName:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ pid:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ wbsid:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ nodeid:{
|
|
|
+ type:String,
|
|
|
+ default:''
|
|
|
+ },
|
|
|
+ },
|
|
|
data () {
|
|
|
return {
|
|
|
heights: '',
|
|
@@ -254,6 +295,9 @@ export default {
|
|
|
|
|
|
isMultiple:false,
|
|
|
eleData:[],
|
|
|
+
|
|
|
+ formulaCompVisible:false,//公式弹框
|
|
|
+ eleid:'',//当前元素
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
@@ -314,12 +358,13 @@ export default {
|
|
|
ekey
|
|
|
}
|
|
|
|
|
|
- this.left = window.event.clientX - 300
|
|
|
- let Y = window.event.clientY
|
|
|
+
|
|
|
+ this.left = window.event.clientX - 80
|
|
|
+ let Y = window.event.clientY -54
|
|
|
if (window.outerHeight - Y > 200) {
|
|
|
- this.top = window.event.clientY - 80
|
|
|
+ this.top = window.event.clientY - 80 +54
|
|
|
} else {
|
|
|
- this.top = window.event.clientY - 270
|
|
|
+ this.top = window.event.clientY - 270 +54
|
|
|
}
|
|
|
this.cascaderPanel = true
|
|
|
clearTimeout(this.setTimeout)
|
|
@@ -384,7 +429,7 @@ export default {
|
|
|
}).then(() => {
|
|
|
_that.submit({
|
|
|
colName: '/',
|
|
|
- tabId: this.$route.query.pkeyId,
|
|
|
+ tabId: this.pkeyId,
|
|
|
tdIndex: this.table.td,
|
|
|
trIndex: this.table.tr,
|
|
|
})
|
|
@@ -468,8 +513,8 @@ export default {
|
|
|
this.$router.push({
|
|
|
path: '/project/tree',
|
|
|
query: {
|
|
|
- pid: this.$route.query.pid,
|
|
|
- wbsid: this.$route.query.wbsid,
|
|
|
+ pid: this.pid,
|
|
|
+ wbsid: this.wbsid,
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -481,7 +526,7 @@ export default {
|
|
|
if (this.value) {
|
|
|
this.tag = true
|
|
|
this.submit({
|
|
|
- tabId: this.$route.query.pkeyId,
|
|
|
+ tabId: this.pkeyId,
|
|
|
tdIndex: this.table.td,
|
|
|
trIndex: this.table.tr,
|
|
|
colName: "",
|
|
@@ -495,7 +540,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
async getElementInfoByTabId () {//获取字段信息
|
|
|
- const { data: res } = await getElementInfoByTabId({ tabId: this.$route.query.id })
|
|
|
+ const { data: res } = await getElementInfoByTabId({ tabId: this.id })
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
this.options = res.data
|
|
@@ -505,7 +550,7 @@ export default {
|
|
|
const { data: res } = await submit(da)
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
- const { data: res } = await getExcelHtml({ pkeyId: this.$route.query.pkeyId })
|
|
|
+ const { data: res } = await getExcelHtml({ pkeyId: this.pkeyId })
|
|
|
console.log(res);
|
|
|
if (res.code === 200) {
|
|
|
this.tag = false
|
|
@@ -540,8 +585,8 @@ export default {
|
|
|
})
|
|
|
if (tag) {
|
|
|
this.submitBatch({
|
|
|
- initTableName: this.$route.query.initTableName,
|
|
|
- id: this.$route.query.id,
|
|
|
+ initTableName: this.initTableName,
|
|
|
+ id: this.id,
|
|
|
listData: this.tableData,
|
|
|
})
|
|
|
} else {
|
|
@@ -588,20 +633,25 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- this.$router.push({
|
|
|
- path: '/formula/edit',
|
|
|
- query: {
|
|
|
- wbsid: this.$route.query.wbsid,
|
|
|
- eleid: eleid,
|
|
|
- nodeid:this.$route.query.nodeid,
|
|
|
- projectid:this.$route.query.pid
|
|
|
- }
|
|
|
- });
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/formula/edit',
|
|
|
+ // query: {
|
|
|
+ // wbsid: this.wbsid,
|
|
|
+ // eleid: eleid,
|
|
|
+ // nodeid:this.nodeid,
|
|
|
+ // projectid:this.pid
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+
|
|
|
+ this.eleid = eleid;
|
|
|
+ this.formulaCompVisible = true;
|
|
|
},
|
|
|
|
|
|
// 返回上一页
|
|
|
toBack(){
|
|
|
- this.$router.go(-1);
|
|
|
+ // this.$router.go(-1);
|
|
|
+
|
|
|
+ this.$emit('hideDialog')
|
|
|
},
|
|
|
|
|
|
|
|
@@ -736,4 +786,14 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+.full-dialog{
|
|
|
+ /deep/ .el-dialog__body{
|
|
|
+ padding-bottom: 0;
|
|
|
+ padding-top: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ /deep/ .basic-container{
|
|
|
+ height: calc(100vh - 60px);
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|