|
@@ -27,20 +27,25 @@
|
|
|
<UpdateItem ref="updateItem" @getItemGroupById="getItemGroupById"></UpdateItem>
|
|
|
<!-- 批量设置表达式 -->
|
|
|
<MultipleModel ref="multipleModel" @getItemGroupById="getItemGroupById"></MultipleModel>
|
|
|
+ <!-- 选择数据项 -->
|
|
|
+ <ItemChoose ref="itemChoose" @getItemGroupById="getItemGroupById"></ItemChoose>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { showLoading, showConfirmWin } from '@/utils/cqcy'
|
|
|
import CommonTable from '../../../components/commonTable/index.vue'
|
|
|
+import { getAllDataSource } from '@/api/source/dataSource'
|
|
|
import { getItemGroupById, getItemValueById, deleteItemByIdList } from '@/api/source/itemGroup';
|
|
|
import UpdateItem from './updateItem.vue'
|
|
|
-import MultipleModel from './multipleModel.vue';
|
|
|
+import MultipleModel from './multipleModel.vue'
|
|
|
+import ItemChoose from './itemChoose.vue'
|
|
|
export default {
|
|
|
components: {
|
|
|
CommonTable,
|
|
|
UpdateItem,
|
|
|
- MultipleModel
|
|
|
+ MultipleModel,
|
|
|
+ ItemChoose
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -64,7 +69,7 @@ export default {
|
|
|
propName: "describe",
|
|
|
labelName: "别名",
|
|
|
}, {
|
|
|
- propName: "operationRule",
|
|
|
+ propName: "remark",
|
|
|
labelName: "表达式",
|
|
|
},
|
|
|
{
|
|
@@ -142,7 +147,7 @@ export default {
|
|
|
propName: "dataType",
|
|
|
labelName: "数据项类型",
|
|
|
}, {
|
|
|
- propName: "operationRule",
|
|
|
+ propName: "remark",
|
|
|
labelName: "表达式",
|
|
|
}, {
|
|
|
propName: "quality",
|
|
@@ -174,7 +179,7 @@ export default {
|
|
|
propName: "describe",
|
|
|
labelName: "别名",
|
|
|
}, {
|
|
|
- propName: "operationRule",
|
|
|
+ propName: "remark",
|
|
|
labelName: "表达式",
|
|
|
},
|
|
|
{
|
|
@@ -230,9 +235,47 @@ export default {
|
|
|
this.$refs.multipleModel.itemGroupId = this.id
|
|
|
this.$refs.multipleModel.selectionItems = this.checkItemList
|
|
|
},
|
|
|
+ /** 获取所有数据源列表 */
|
|
|
+ getAllDataSource() {
|
|
|
+ getAllDataSource({ page: 1, limit: 9999 }).then(res => {
|
|
|
+ if (!res || !res.data) {
|
|
|
+ this.$message({
|
|
|
+ message: '数据源查询失败!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$refs.itemChoose.dataSourceList = res.data.dataSourceList
|
|
|
+ }).catch((e) => {
|
|
|
+ this.$message({
|
|
|
+ message: e,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 给数据组添加数据项 */
|
|
|
addGroupItemEvent() {
|
|
|
-
|
|
|
+ this.$refs.itemChoose.itemGroupForm.id = this.id
|
|
|
+ getItemGroupById(this.id).then(res => {
|
|
|
+ if (!res || !res.data) {
|
|
|
+ this.$message({
|
|
|
+ message: '数据组查询失败!',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.getAllDataSource()
|
|
|
+ this.$refs.itemChoose.itemGroupForm.groupName = res.data.groupName
|
|
|
+ this.$refs.itemChoose.itemGroupForm.groupDescribe = res.data.groupDescribe
|
|
|
+ this.$refs.itemChoose.itemGroupForm.dataSourceId = res.data.dataSourceId
|
|
|
+ this.$refs.itemChoose.itemGroupForm.itemList = res.data.itemList ? res.data.itemList : []
|
|
|
+ this.$refs.itemChoose.addDataItem()
|
|
|
+ }).catch((e) => {
|
|
|
+ this.$message({
|
|
|
+ message: e,
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
/** 查看数据组实时数据 */
|
|
|
getRealTimeData() {
|