diff --git a/src/components/Search/index.vue b/src/components/Search/index.vue index a456aaaa..2dba1af2 100644 --- a/src/components/Search/index.vue +++ b/src/components/Search/index.vue @@ -9,7 +9,7 @@ :value="item.fun_col__col_code" /> -
+
@@ -58,6 +58,18 @@ export default { funid: { type: String, default: '' + }, + wsql: { + type: String, + default: '' + }, + wvalue: { + type: String, + default: '' + }, + wtype: { + type: String, + default: '' } }, data() { @@ -85,7 +97,10 @@ export default { getFunCol() { api.getFunCol(this.funid).then(data => { if (data.success) { - this.fun = data.data.root + this.fun = data.data.root.filter(d => { + return d.fun_col__col_index !== '10000' + }) + console.log(this.fun, 'this.fun') this.funCode = this.fun[0].fun_col__col_code this.where_sql = `${this.fun[0].fun_col__col_code}` this.where_type = this.fun[0].fun_col__data_type @@ -122,7 +137,6 @@ export default { api.getSelect(this.control_name).then(data => { if (data.success) { this.combo = data.data.root - console.log(this.combo, 'this.combo') } else { this.$message.error(data.message) } @@ -133,13 +147,28 @@ export default { let whereSql if (this.searchVal) { if (this.control === 'date') { - const where_sql = `${this.where_sql} >= ?` - const whereValue = `${this.searchVal}` - const where_type = `date` - whereSql = `where_sql=${where_sql}&where_value=${whereValue}&where_type=${where_type}` + if (this.wsql) { + const where_sql = `(${this.wsql}=?) and ${this.where_sql} >= ?` + const whereValue = `${this.wvalue};${this.searchVal}` + const where_type = `${this.wtype};date` + whereSql = `where_sql=${where_sql}&where_value=${whereValue}&where_type=${where_type}` + } else { + const where_sql = `${this.where_sql} >= ?` + const whereValue = `${this.searchVal}` + const where_type = `date` + whereSql = `where_sql=${where_sql}&where_value=${whereValue}&where_type=${where_type}` + } } else { - whereValue = encodeURI(`\%${this.searchVal}\%`) - whereSql = `where_sql=${this.where_sql} like ?&where_value=${whereValue}&where_type=${this.where_type}` + if (this.wsql) { + const Value = encodeURI(`\%${this.searchVal}\%`) + const where_sql = `(${this.wsql}=?) and ${Value} >= ?` + const whereValue = `${this.wvalue};${Value}` + const where_type = `${this.wtype};${this.where_type}` + whereSql = `where_sql=${where_sql}&where_value=${whereValue}&where_type=${where_type}` + } else { + whereValue = encodeURI(`\%${this.searchVal}\%`) + whereSql = `where_sql=${this.where_sql} like ?&where_value=${whereValue}&where_type=${this.where_type}` + } } } else { whereSql = `where_sql=&where_value=&where_type=` diff --git a/src/views/insp_name/index.vue b/src/views/insp_name/index.vue index 9ab2aa5e..a6c716f2 100644 --- a/src/views/insp_name/index.vue +++ b/src/views/insp_name/index.vue @@ -19,6 +19,7 @@ @selection-change="handleSelectionChange" @cell-dblclick="cellDblclick" > + diff --git a/src/views/safe_insp/components/create/index.vue b/src/views/safe_insp/components/create/index.vue index fdb15edc..42b01afd 100644 --- a/src/views/safe_insp/components/create/index.vue +++ b/src/views/safe_insp/components/create/index.vue @@ -108,13 +108,13 @@ v-if="inspNameVisible" title="选择巡检名称" :visible.sync="inspNameVisible" - width="60%" + width="40%" > - - 取 消 +
diff --git a/src/views/safe_insp/components/edit_form/index.vue b/src/views/safe_insp/components/edit_form/index.vue index fc2a2a90..0c73e3e8 100644 --- a/src/views/safe_insp/components/edit_form/index.vue +++ b/src/views/safe_insp/components/edit_form/index.vue @@ -108,13 +108,13 @@ v-if="inspNameVisible" title="选择巡检名称" :visible.sync="inspNameVisible" - width="60%" + width="40%" > - +
diff --git a/src/views/safe_insp/components/inspName/index.vue b/src/views/safe_insp/components/inspName/index.vue index cb12ca51..e10d20b9 100644 --- a/src/views/safe_insp/components/inspName/index.vue +++ b/src/views/safe_insp/components/inspName/index.vue @@ -1,131 +1,135 @@ - - - - + + + + diff --git a/src/views/safe_insp/components/insp_det/api/index.js b/src/views/safe_insp/components/insp_det/api/index.js index 47acfd4a..d988b6fb 100644 --- a/src/views/safe_insp/components/insp_det/api/index.js +++ b/src/views/safe_insp/components/insp_det/api/index.js @@ -1,11 +1,11 @@ import request from '@/utils/request' export default { - getDate(id, pageSize, pageNo, whereSql) { + getDate(id, pageSize, pageNo, isWhereSql, whereValue) { return request({ url: `/commonAction.do?eventcode=query_data&funid=queryevent&pagetype=subeditgrid&query_funid=insp_det&user_id=administrator`, method: 'post', - data: `start=${pageNo}&limit=${pageSize}&${whereSql}&is_query=1&query_type=0` + data: `start=${pageNo}&limit=${pageSize}&where_sql=insp_det.safe_insp_id = ?&where_value=${id}&where_type=string&is_query=1&query_type=0` }).then(response => response.data) }, getDeptTree() { diff --git a/src/views/safe_insp/components/insp_det/index.vue b/src/views/safe_insp/components/insp_det/index.vue index a044890b..f29577d4 100644 --- a/src/views/safe_insp/components/insp_det/index.vue +++ b/src/views/safe_insp/components/insp_det/index.vue @@ -5,7 +5,7 @@
- + +