|
@@ -169,7 +169,7 @@
|
|
|
<deviceIn></deviceIn>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="数据解析" name="4" lazy>
|
|
|
- <dataParse></dataParse>
|
|
|
+ <dataParse v-if="activeName === '4'" :script="detail.scriptInfo" @updateScript="updateScript"></dataParse>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</div>
|
|
@@ -199,6 +199,7 @@ import api from '/@/api/device';
|
|
|
|
|
|
interface TableDataState {
|
|
|
ids: number[];
|
|
|
+ detail: any;
|
|
|
tableData: {
|
|
|
data: [];
|
|
|
total: number;
|
|
@@ -228,7 +229,7 @@ export default defineComponent({
|
|
|
isShowDialog: false,
|
|
|
activeName: '3', // 分类数据
|
|
|
activetab: 'attr', // 分类数据
|
|
|
- detail: [],
|
|
|
+ detail: {},
|
|
|
developer_status: 0,
|
|
|
tableData: {
|
|
|
data: [],
|
|
@@ -258,8 +259,6 @@ export default defineComponent({
|
|
|
});
|
|
|
});
|
|
|
|
|
|
-
|
|
|
-
|
|
|
//编辑属性
|
|
|
const onEditAttr = (row: TableDataRow) => {
|
|
|
editAttrRef.value.openDialog(row, route.params.id);
|
|
@@ -416,6 +415,10 @@ export default defineComponent({
|
|
|
console.log(tab, event);
|
|
|
};
|
|
|
|
|
|
+ const updateScript = (scriptInfo: string) => {
|
|
|
+ state.detail.scriptInfo = scriptInfo
|
|
|
+ };
|
|
|
+
|
|
|
const CkOption = () => {
|
|
|
|
|
|
if (state.developer_status == 1) {
|
|
@@ -437,6 +440,7 @@ export default defineComponent({
|
|
|
|
|
|
return {
|
|
|
Edit,
|
|
|
+ updateScript,
|
|
|
editDicRef,
|
|
|
editAttrRef,
|
|
|
editFunRef,
|