Browse Source

bug修复

threethousanddream 2 months ago
parent
commit
6e484bea3d

+ 5 - 3
src/components/compSqlEditor/index.vue

@@ -30,7 +30,8 @@
     </div>
     <div class="main">
       <div class="label label-title">
-        <aceEditor ref="editor" :font-size="16" :value="value" @change="onChange" height="500" lang="sql" snippets wrap />
+        <aceEditor ref="editor" :font-size="16" :value="value" @change="onChange" height="500" lang="sql" snippets
+                   wrap />
       </div>
     </div>
     <div class="panel" style="margin-right: 10px">
@@ -90,7 +91,7 @@ import { funcList } from "@/api/newbi/func";
 export default {
   components: { aceEditor },
   model: { prop: "value", event: "change" },
-  props: ["cubeId", "value"],
+  props: ["cubeId", "value", "dsId"],
   data() {
     return {
       datasourceId: "",
@@ -132,6 +133,8 @@ export default {
   created() {
     this.getInitData();
     this.getGlobalData();
+    this.datasourceId = this.dsId;
+    this.onDsChange(this.dsId);
   },
   methods: {
     onChange(val) {
@@ -229,7 +232,6 @@ export default {
         this.funcAttrList = list;
       });
       funcList({ dsType: "mysql" }).then((res) => {
-        logjson(res.data.data)
         this.functionList = res.data.data;
         this.functionListSearched = [...this.functionList];
         this.funcAttr = -1;

File diff suppressed because it is too large
+ 2 - 2
src/utils/request.js


+ 2 - 1
src/views/form/webDesign/CustomButton.vue

@@ -191,7 +191,8 @@
           </el-radio-group>
         </el-form-item>
         <el-form-item label="展示条件">
-          <CompSqlEditor v-model="showFrom.buttonCondition" :cube-id="dataForm.dbLinkId"></CompSqlEditor>
+          <CompSqlEditor v-model="showFrom.buttonCondition" :cube-id="dataForm.dbLinkId" :dsId="dataForm.dbSourceId"
+          ></CompSqlEditor>
           <div class="hint" style="font-size: 12px;color:#777">
             注:条件sql返回列必须存在主键列,并且where条件必须有主键列约束。例句:SELECT id from {表名} where {约束条件} and id IN([ids])
           </div>