WXL (wul)
4 天以前 b6b7fb2b126b749b0bb3f0582036a74ff332d10e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<template>
  <el-dialog
    title="未及时随访患者服务"
    :visible.sync="visible"
    v-loading="loading"
    width="70%"
    :close-on-click-modal="false"
    @close="handleClose"
  >
    <div class="timely-rate-dialog">
      <div class="examine-jic">
        <div class="jic-value">
          <el-row :gutter="20">
            <!-- 搜索表单 -->
            <el-form
              :model="queryParams"
              ref="queryForm"
              size="small"
              :inline="true"
              label-width="98px"
              class="search-form"
            >
              <el-form-item label="患者:">
                <el-input
                  v-model="queryParams.name"
                  placeholder="请输入患者姓名"
                  @keyup.enter.native="handleSearch"
                />
              </el-form-item>
              <el-form-item label="患者诊断:">
                <el-input
                  v-model="queryParams.leavediagname"
                  placeholder="请输入患者诊断"
                  @keyup.enter.native="handleSearch"
                />
              </el-form-item>
 
              <el-form-item>
                <el-button
                  type="primary"
                  icon="el-icon-search"
                  size="medium"
                  @click="handleSearch"
                >
                  搜索
                </el-button>
                <el-button
                  icon="el-icon-refresh"
                  size="medium"
                  @click="resetQuery"
                >
                  重置
                </el-button>
              </el-form-item>
            </el-form>
 
            <!-- 患者列表 -->
            <el-table :data="data" style="width: 100%" v-loading="loading">
              <el-table-column prop="sendname" align="center" label="姓名" width="100" />
              <el-table-column prop="taskName" align="center" width="200" show-overflow-tooltip label="任务名称" />
 
              <el-table-column prop="sendstate" align="center" width="200" label="任务状态">
                <template slot-scope="scope">
                  <el-tag
                    :type="getStateTagType(scope.row.sendstate)"
                    :disable-transitions="false"
                  >
                    {{ getStateText(scope.row.sendstate) }}
                  </el-tag>
                </template>
              </el-table-column>
 
              <el-table-column prop="visitTime" align="center" label="应随访时间" width="200" show-overflow-tooltip />
              <el-table-column prop="finishtime" align="center" label="随访完成时间" width="200" show-overflow-tooltip />
 
              <el-table-column label="出院日期" width="200" align="center" key="endtime" prop="endtime">
                <template slot-scope="scope">
                  <span>{{ formatTime(scope.row.endtime) }}</span>
                </template>
              </el-table-column>
 
              <el-table-column label="责任护士" width="120" align="center" key="nurseName" prop="nurseName" />
              <el-table-column label="主治医生" width="120" align="center" key="drname" prop="drname" />
 
              <el-table-column label="结果状态" align="center" key="excep" prop="excep" width="120">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.sys_yujing" :value="scope.row.excep" />
                </template>
              </el-table-column>
 
              <el-table-column label="处理意见" align="center" key="suggest" prop="suggest" width="120">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.sys_suggest" :value="scope.row.suggest" />
                </template>
              </el-table-column>
 
              <el-table-column prop="templatename" align="center" label="服务模板" width="200" show-overflow-tooltip />
              <el-table-column prop="remark" align="center" label="服务记录" width="200" show-overflow-tooltip />
 
              <el-table-column prop="bankcardno" align="center" label="呼叫状态" width="210" />
 
              <el-table-column label="操作" fixed="right" align="center" width="200" class-name="small-padding fixed-width">
                <template slot-scope="scope">
                  <el-button size="medium" type="text" @click="handleDetailsGo(scope.row)">
                    <span class="button-zx">
                      <i class="el-icon-s-order"></i>查看
                    </span>
                  </el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-row>
 
          <!-- 分页 -->
          <pagination
            v-show="total > 0"
            :total="total"
            :page.sync="queryParams.pn"
            :limit.sync="queryParams.ps"
            @pagination="handlePagination"
          />
        </div>
      </div>
    </div>
  </el-dialog>
</template>
 
<script>
import Pagination from '@/components/Pagination'
 
export default {
  name: 'TimelyRateDialog',
  components: {
    Pagination
  },
  dicts: ['sys_yujing', 'sys_suggest'],
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    loading: {
      type: Boolean,
      default: false
    },
    data: {
      type: Array,
      default: () => []
    },
    total: {
      type: Number,
      default: 0
    },
    queryParams: {
      type: Object,
      default: () => ({
        pn: 1,
        ps: 10
      })
    }
  },
  data() {
    return {
      localQueryParams: { ...this.queryParams }
    }
  },
  watch: {
    queryParams: {
      deep: true,
      handler(newParams) {
        this.localQueryParams = { ...newParams }
      }
    }
  },
  mounted() {
    this.localQueryParams = { ...this.queryParams }
  },
  methods: {
    handleSearch() {
      this.$emit('search', this.localQueryParams)
    },
 
    resetQuery() {
      this.localQueryParams = {
        pn: 1,
        ps: 10,
        name: '',
        leavediagname: ''
      }
      this.$emit('search', this.localQueryParams)
    },
 
    handlePagination(pagination) {
      this.localQueryParams.pn = pagination.page
      this.localQueryParams.ps = pagination.limit
      this.$emit('search', this.localQueryParams)
    },
 
    getStateTagType(state) {
      const stateMap = {
        1: 'primary',
        2: 'primary',
        3: 'success',
        4: 'info',
        5: 'danger',
        6: 'success'
      }
      return stateMap[state] || 'info'
    },
 
    getStateText(state) {
      const stateTextMap = {
        1: '表单已领取',
        2: '待随访',
        3: '表单已发送',
        4: '不执行',
        5: '发送失败',
        6: '已完成'
      }
      return stateTextMap[state] || '未知状态'
    },
 
    formatTime(time) {
      if (!time) return ''
      return this.parseTime(time)
    },
 
    handleDetailsGo(row) {
      this.$emit('details-go', row)
    },
 
    handleClose() {
      this.$emit('close')
    }
  }
}
</script>
 
<style lang="scss" scoped>
.timely-rate-dialog {
  .search-form {
    margin-bottom: 20px;
  }
 
  .button-zx {
    color: rgb(70, 204, 238);
  }
}
</style>