manage-client 4.1.65 → 4.1.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manage-client",
3
- "version": "4.1.65",
3
+ "version": "4.1.66",
4
4
  "description": "经营管控模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -4,6 +4,28 @@
4
4
  <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:criteria>
5
5
  <div novalidate class="form-horizontal select-overspread container-fluid auto" partial >
6
6
  <div class="row">
7
+ <div class="col-sm-2 form-group" >
8
+ <label class="font_normal_body" for="startDate">开始日期:</label>
9
+ <datepicker id="startDate" placeholder="建档开始日期" style="width: 60%"
10
+ v-model="model.startDate"
11
+ :value.sync="model.startDate"
12
+ :disabled-days-of-Week="[]"
13
+ :format="'yyyy-MM-dd'"
14
+ condition="ui.f_createfile_date >= '{} 00:00:00'"
15
+ :show-reset-button="reset">
16
+ </datepicker>
17
+ </div>
18
+ <div class="col-sm-2 form-group" >
19
+ <label class="font_normal_body" for="endDate">结束日期:</label>
20
+ <datepicker id="endDate" placeholder="建档结束日期" style="width: 60%"
21
+ v-model="model.endDate"
22
+ :value.sync="model.endDate"
23
+ :disabled-days-of-Week="[]"
24
+ :format="'yyyy-MM-dd'"
25
+ condition="ui.f_createfile_date <= '{} 23:59:59'"
26
+ :show-reset-button="reset">
27
+ </datepicker>
28
+ </div>
7
29
  <div class="col-sm-2 form-group">
8
30
  <label class="font_normal_body">用气性质</label>
9
31
  <v-select :value.sync="model.f_gasproperties"
@@ -113,12 +135,20 @@ export default {
113
135
  }
114
136
  },
115
137
  ready () {
116
- // this.$refs.paged.$refs.criteria.model.startDate = this.$login.toStandardDateString() + ' 00:00:00'
117
- // this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString() + ' 23:59:59'
138
+ this.$refs.paged.$refs.criteria.model.startDate = this.toFirstDayOfYearDateString()
139
+ this.$refs.paged.$refs.criteria.model.endDate = this.$login.toStandardDateString()
118
140
  // this.$refs.paged.$refs.criteria.search()
119
141
  console.log(this.$login.f)
120
142
  },
121
143
  methods: {
144
+ toFirstDayOfYearDateString () {
145
+ // 若未传参,使用当前年份
146
+ const targetYear = new Date().getFullYear()
147
+ const firstDay = new Date(targetYear, 0, 1)
148
+ const month = firstDay.getMonth() + 1
149
+ const date = firstDay.getDate()
150
+ return `${targetYear}-${month < 10 ? '0' + month : month}-${date < 10 ? '0' + date : date}`
151
+ },
122
152
  getRes (condition, obj) {
123
153
  this.orgCondtionStr = condition.replace('f_orgid', 'ui.f_orgid')
124
154
  this.orgCondtionStr = this.orgCondtionStr.replace('f_depid', 'ui.f_depid')