diff --git a/.env.production b/.env.production index 91c8741..8b0b51b 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ ENV = 'production' -VUE_APP_BASE_API = 'http://baozhitang.abcdefg.fun' \ No newline at end of file +VUE_APP_BASE_API = 'http://www.xbzt.cc' \ No newline at end of file diff --git a/public/index.html b/public/index.html index ff730ce..bd627f4 100644 --- a/public/index.html +++ b/public/index.html @@ -4,6 +4,7 @@ + <%= htmlWebpackPlugin.options.title %> @@ -21,5 +22,4 @@
- \ No newline at end of file diff --git a/src/components/README.md b/src/components/README.md deleted file mode 100644 index 5ec0dcf..0000000 --- a/src/components/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# 富文本编辑器插件 -uniapp 富文本编辑器插件 - -## 兼容性 -|微信小程序|H5|APP| -|:--:|:--:|:--:| -|√|√ |x| - -## 使用方式 -在 `script` 中引用组件 -```js -import myeditor from "@/components/robin-editor/editor.vue" -export default { - components: {myeditor} -} -``` -在 `template` 中使用组件 -```html - - -``` - -## Demo -https://github.com/health901/uniapp-editor-demo - -## 属性说明 -|属性|类型|默认值|说明| -|--|--|--|--| -|v-model|String| |富文本,双向绑定| -|imageUploader|function(img,callback)| |上传图片处理函数 接受参数 img:本地图片地址,callback:上传成功回调传入图片链接| -|muiltImage|Boolean|false|是否支持多图上传| -|compressImage|Boolean|true|图片上传是否压缩| -|previewMode|Boolean|false|预览模式,不可编辑| -|autoHideToolbar|Boolean|false|失去焦点时自动隐藏工具栏| -|tools|Array|['bold', 'italic', 'underline', 'strike', 'align-left', 'align-center', 'align-right', 'remove', 'font', 'color', 'backgroundColor','image', 'clear', 'preview']|工具栏| - -### 工具栏 -|名称|值| -|--|--| -|加粗|`bold`| -|斜体|`italic`| -|下划线|`underline`| -|删除线|`strike`| -|右对齐|`align-left`| -|居中|`align-center`| -|左对齐|`align-right`| -|清除格式|`remove`| -|字体大小|`font`| -|字体颜色|`color`| -|背景色|`backgroundColor`| -|插入图片|`image`| -|清空|`clear`| -|预览|`preview`| -|插入日期|`date`| -|列表|`list-check`,`list-ordered`,`list-bullet`| -|上下标|`sub`,`super`| -|撤销,恢复撤销|`undo`,`redo`| -|缩进|`indent`,`outdent`| -|分割线|`divider`| -|标题|`h1`,`h2`,`h3`,`h4`,`h5`,`h6`| -|书写方向|`rtl`| - -## 事件说明 -|事件|说明|参数| -|--|--|--| -|cancel|点击取消按钮| -|save|点击保存按钮|e={html,text,delta}| - -## 依赖 -|组件|链接|备注| -|---|--|--| -|Popup 弹出层[[1]](#注)|https://ext.dcloud.net.cn/plugin?id=329|uni-ui库| -|Transition动画|https://ext.dcloud.net.cn/plugin?id=1231|uni-ui库,Popup依赖| -|颜色选择器ColorPicker[[2]](#注)|https://ext.dcloud.net.cn/plugin?id=1237|字体颜色,背景色| - - -## 注 - -1. 修改:新增动画结束事件 -2. 修改:添加按钮,支持预设颜色值 diff --git a/src/components/colorPicker.vue b/src/components/colorPicker.vue deleted file mode 100644 index 1a01304..0000000 --- a/src/components/colorPicker.vue +++ /dev/null @@ -1,289 +0,0 @@ - - - - - diff --git a/src/components/cu-editor.vue b/src/components/cu-editor.vue index 982367f..d8331aa 100644 --- a/src/components/cu-editor.vue +++ b/src/components/cu-editor.vue @@ -1,33 +1,31 @@ \ No newline at end of file diff --git a/src/components/cu-image.vue b/src/components/cu-image.vue new file mode 100644 index 0000000..b8bdfec --- /dev/null +++ b/src/components/cu-image.vue @@ -0,0 +1,82 @@ + + + \ No newline at end of file diff --git a/src/components/robin-editor/editor-icon.css b/src/components/robin-editor/editor-icon.css deleted file mode 100644 index 8e21561..0000000 --- a/src/components/robin-editor/editor-icon.css +++ /dev/null @@ -1,236 +0,0 @@ -@font-face { - font-family: "iconfont"; - src: url('~./editor-icon.ttf') format('truetype'); -} - -.iconfont { - font-family: "iconfont" !important; - font-size: 16px; - font-style: normal; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.icon-redo:before { - content: "\e627"; -} - -.icon-undo:before { - content: "\e633"; -} - -.icon-indent:before { - content: "\eb28"; -} - -.icon-outdent:before { - content: "\e6e8"; -} - -.icon-fontsize:before { - content: "\e6fd"; -} - -.icon-format-header-1:before { - content: "\e860"; -} - -.icon-format-header-4:before { - content: "\e863"; -} - -.icon-format-header-5:before { - content: "\e864"; -} - -.icon-format-header-6:before { - content: "\e865"; -} - -.icon-clearup:before { - content: "\e64d"; -} - -.icon-preview:before { - content: "\e631"; -} - -.icon-date:before { - content: "\e63e"; -} - -.icon-fontbgcolor:before { - content: "\e678"; -} - -.icon-clearedformat:before { - content: "\e67e"; -} - -.icon-font:before { - content: "\e684"; -} - -.icon-723bianjiqi_duanhouju:before { - content: "\e65f"; -} - -.icon-722bianjiqi_duanqianju:before { - content: "\e660"; -} - -.icon-text_color:before { - content: "\e72c"; -} - -.icon-format-header-2:before { - content: "\e75c"; -} - -.icon-format-header-3:before { - content: "\e75d"; -} - -.icon--checklist:before { - content: "\e664"; -} - -.icon-baocun:before { - content: "\ec09"; -} - -.icon-line-height:before { - content: "\e7f8"; -} - -.icon-quanping:before { - content: "\ec13"; -} - -.icon-direction-rtl:before { - content: "\e66e"; -} - -.icon-direction-ltr:before { - content: "\e66d"; -} - -.icon-selectall:before { - content: "\e62b"; -} - -.icon-fuzhi:before { - content: "\ec7a"; -} - -.icon-shanchu:before { - content: "\ec7b"; -} - -.icon-bianjisekuai:before { - content: "\ec7c"; -} - -.icon-fengexian:before { - content: "\ec7f"; -} - -.icon-dianzan:before { - content: "\ec80"; -} - -.icon-charulianjie:before { - content: "\ec81"; -} - -.icon-charutupian:before { - content: "\ec82"; -} - -.icon-wuxupailie:before { - content: "\ec83"; -} - -.icon-juzhongduiqi:before { - content: "\ec84"; -} - -.icon-yinyong:before { - content: "\ec85"; -} - -.icon-youxupailie:before { - content: "\ec86"; -} - -.icon-youduiqi:before { - content: "\ec87"; -} - -.icon-zitidaima:before { - content: "\ec88"; -} - -.icon-xiaolian:before { - content: "\ec89"; -} - -.icon-zitijiacu:before { - content: "\ec8a"; -} - -.icon-zitishanchuxian:before { - content: "\ec8b"; -} - -.icon-zitishangbiao:before { - content: "\ec8c"; -} - -.icon-zitibiaoti:before { - content: "\ec8d"; -} - -.icon-zitixiahuaxian:before { - content: "\ec8e"; -} - -.icon-zitixieti:before { - content: "\ec8f"; -} - -.icon-zitiyanse:before { - content: "\ec90"; -} - -.icon-zuoduiqi:before { - content: "\ec91"; -} - -.icon-zitiyulan:before { - content: "\ec92"; -} - -.icon-zitixiabiao:before { - content: "\ec93"; -} - -.icon-zuoyouduiqi:before { - content: "\ec94"; -} - -.icon-duigoux:before { - content: "\ec9e"; -} - -.icon-guanbi:before { - content: "\eca0"; -} - -.icon-shengyin_shiti:before { - content: "\eca5"; -} - -.icon-Character-Spacing:before { - content: "\e964"; -} diff --git a/src/components/robin-editor/editor-icon.ttf b/src/components/robin-editor/editor-icon.ttf deleted file mode 100644 index 98af97e..0000000 Binary files a/src/components/robin-editor/editor-icon.ttf and /dev/null differ diff --git a/src/components/robin-editor/editor.vue b/src/components/robin-editor/editor.vue deleted file mode 100644 index 6fc3273..0000000 --- a/src/components/robin-editor/editor.vue +++ /dev/null @@ -1,488 +0,0 @@ - - - - - diff --git a/src/components/robin-editor/header.vue b/src/components/robin-editor/header.vue deleted file mode 100644 index 7153405..0000000 --- a/src/components/robin-editor/header.vue +++ /dev/null @@ -1,57 +0,0 @@ - - - - - diff --git a/src/components/select-admin-user.vue b/src/components/select-admin-user.vue index 4cb213a..b38ce5b 100644 --- a/src/components/select-admin-user.vue +++ b/src/components/select-admin-user.vue @@ -38,7 +38,7 @@ export default { perPage: 20, loading: true, // 'loading', 'nomore', 'loadmore' - status: 'loading', + status: 'loadmore', } }, created() { @@ -58,6 +58,7 @@ export default { if (refresh) { this.page = 1 this.list = [] + this.status = 'loadmore' } if (this.status == 'nomore') { return ; diff --git a/src/components/uni-popup/uni-popup.vue b/src/components/uni-popup/uni-popup.vue deleted file mode 100644 index 655b114..0000000 --- a/src/components/uni-popup/uni-popup.vue +++ /dev/null @@ -1,273 +0,0 @@ - - - - diff --git a/src/components/uni-transition/uni-transition.vue b/src/components/uni-transition/uni-transition.vue deleted file mode 100644 index 908a939..0000000 --- a/src/components/uni-transition/uni-transition.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - diff --git a/src/pages.json b/src/pages.json index feb9d3d..7af1051 100644 --- a/src/pages.json +++ b/src/pages.json @@ -64,6 +64,9 @@ "navigationBarTitleText": "宝芝堂", "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" + // #ifdef H5 + ,"navigationStyle": "custom" + // #endif }, "easycom": { "^u-(.*)": "uview-ui/components/u-$1/u-$1.vue" diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index 61eca39..dec9312 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -1,11 +1,21 @@ @@ -35,9 +45,25 @@ } diff --git a/src/pages/patient/detail.vue b/src/pages/patient/detail.vue index 2753cbf..1ec8e91 100644 --- a/src/pages/patient/detail.vue +++ b/src/pages/patient/detail.vue @@ -55,13 +55,14 @@ title="病情描述" isLink rightIcon="edit-pen" - value="点击修改" @click="openEditor" /> - + + + + + +
@@ -99,7 +100,7 @@ @confirm="selectBirthday" /> - + @@ -107,13 +108,18 @@ import gender from '../../enums/gender' import SelectAdminUser from '../../components/select-admin-user' import CuEditor from '../../components/cu-editor' +import CuImage from '../../components/cu-image' export default { - components: {SelectAdminUser, CuEditor}, + components: {SelectAdminUser, CuEditor, CuImage}, data() { return { id: '', - info: {}, + info: { + images: [], + doctor_id: '', + doctor: {}, + }, modal: { type: 'text', show: false, @@ -129,7 +135,7 @@ export default { show: false, name: '', value: (new Date).getTime(), - minDate: (new Date('1900-1-1')).getTime() + minDate: (new Date('1900/1/1')).getTime() }, } }, @@ -148,11 +154,23 @@ export default { uni.showLoading() const params = {_action: 'getData'} this.$ajax.get(`/admin-api/patient/${this.id}`, { params }).then(res => { + uni.stopPullDownRefresh() if (res.status == 0) { - this.info = res.data + this.info = { + ...res.data, + birthday: res.data.birthday ? res.data.birthday.replaceAll('-', '/') : '', + treat_at: res.data.treat_at ? res.data.treat_at.replaceAll('-', '/') : '', + } + if (res.data.images) { + this.$refs['images'].setList(res.data.images.map(value => { + return { url: value } + })) + } uni.setNavigationBarTitle({ title: this.info.name }) } - }) + }).catch(error => { + uni.stopPullDownRefresh() + }) }, openModal(title, name) { this.modal.title = title @@ -199,7 +217,11 @@ export default { toggleBirthday(name) { if (name) { this.datePicker.name = name - this.datePicker.value = this.info[name] ? Math.floor(this.info[name] * 1000) : (new Date).getTime() + const value = this.info[name] + if (value) { + + } + this.datePicker.value = (new Date(value)).getTime() } this.datePicker.show = !this.datePicker.show }, @@ -230,6 +252,14 @@ export default { }) this.closeDoctor() }, + updateImages(e) { + const list = e.map(item => item.url) + this.update({ images: list }).then(res => { + if (res.status == 0) { + console.log(res) + } + }) + }, addRecord() { return uni.navigateTo({ url: `/pages/record/form?patient=${this.id}` }) }, @@ -270,6 +300,10 @@ export default { diff --git a/src/pages/patient/form.vue b/src/pages/patient/form.vue index c4ce7b9..8acd04e 100644 --- a/src/pages/patient/form.vue +++ b/src/pages/patient/form.vue @@ -40,10 +40,13 @@ - {{form.illness ? '点击修改' : '点击填写'}} + 点击修改 + + + @@ -74,9 +77,10 @@ import gender from '../../enums/gender' import SelectAdminUser from '../../components/select-admin-user' import CuEditor from '../../components/cu-editor' +import CuImage from '../../components/cu-image' export default { - components: {SelectAdminUser, CuEditor}, + components: {SelectAdminUser, CuEditor, CuImage}, data() { return { id: '', @@ -88,7 +92,8 @@ export default { address: '', treat_at: '', doctor_id: '', - illness: '' + illness: '', + images: [] }, rules: { name: { @@ -189,6 +194,7 @@ export default { this.form.illness = e.html }, submit() { + this.form.images = this.$refs['images'].getList().map(item => item.url) this.$refs['form'].validate().then(res => { uni.showLoading() if (this.id) { @@ -230,7 +236,7 @@ export default { \ No newline at end of file diff --git a/src/pages/record/form.vue b/src/pages/record/form.vue index dc110b0..d02b40d 100644 --- a/src/pages/record/form.vue +++ b/src/pages/record/form.vue @@ -55,11 +55,14 @@ - {{form.content ? '点击修改' : '点击填写'}} + 点击修改 - + + + + {{ form.next_treat_at | date }} 请选择下次就诊时间 @@ -73,7 +76,7 @@ - + {{ form.notify_at | date }} 请选择通知时间 @@ -92,7 +95,7 @@ - + @@ -109,9 +112,10 @@ import CuEditor from '../../components/cu-editor' import SelectAdminUser from '../../components/select-admin-user' import orderStatus from '../../enums/order_status' +import CuImage from '../../components/cu-image' export default { - components: {SelectAdminUser, CuEditor}, + components: {SelectAdminUser, CuEditor, CuImage}, data() { return { id: '', @@ -155,6 +159,7 @@ export default { typeList: [], patient: {}, datePicker: { + mode: 'datetime', show: false, name: '', value: (new Date).getTime(), @@ -243,8 +248,8 @@ export default { }, methods: { submit() { + this.form.images = this.$refs['images'].getList().map(item => item.url) this.$refs['form'].validate().then(res => { - console.log(res) uni.showLoading() if (this.id) { this.update() @@ -280,11 +285,14 @@ export default { } }) }, - toggleDatePicker(name) { + toggleDatePicker(name, mode) { if (name) { this.datePicker.name = name this.datePicker.value = this.form[name] ? Math.floor(this.form[name] * 1000) : (new Date).getTime() } + if (mode) { + this.datePicker.mode = mode + } this.datePicker.show = !this.datePicker.show }, selectDatePicker(e) { @@ -323,12 +331,8 @@ export default {