Browse Source

医生信息页面

admin_version1.0_2025_06_26
zq 1 month ago
parent
commit
7f98729065
  1. 1
      src/assets/form_qua_ic.svg
  2. 1
      src/assets/input_search_ic.svg
  3. 1
      src/components/GuipInput.vue
  4. 96
      src/components/GuipSelect.vue
  5. 71
      src/components/GuipTextarea.vue
  6. 2
      src/components/SliderMenu.vue
  7. 41
      src/router/index.js
  8. 21
      src/style/theme/common.scss
  9. 2
      src/style/theme/index.css
  10. 268
      src/views/AddNewTreatment.vue
  11. 290
      src/views/DoctorInformation.vue
  12. 768
      src/views/HosInformation.vue
  13. 181
      src/views/elementGroups.vue

1
src/assets/form_qua_ic.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="14.000000953674316" height="14.000114440917969" viewBox="0 0 14.000000953674316 14.000114440917969"><g><path d="M6.99997,0C3.13397,0,0,3.13402,0,7.00003C0,10.8661,3.13397,14.0001,6.99997,14.0001C10.866,14.0001,14,10.8661,14,7.00006C14,3.13405,10.8661,0,6.99997,0ZM7.67931,11.0393C7.67931,11.2326,7.52265,11.3894,7.32932,11.3894L6.27931,11.3894C6.08606,11.3894,5.92934,11.2326,5.92934,11.0393L5.92934,9.98936C5.92934,9.79601,6.08606,9.63931,6.27931,9.63931L7.32932,9.63931C7.52264,9.63931,7.67931,9.79599,7.67931,9.98936L7.67931,11.0393ZM9.41428,6.22158C9.2736,6.42218,8.95427,6.67778,8.5545,6.98942L8.11148,7.29514C7.89631,7.46204,7.70548,7.65635,7.63491,7.87882C7.61079,7.95462,7.59272,8.07919,7.58056,8.21373C7.57443,8.28143,7.51387,8.41954,7.37231,8.41954L6.2329,8.41954C6.0477,8.41954,6.01462,8.27448,6.01771,8.20352C6.03821,7.73845,6.08083,7.32557,6.27031,7.10329Q6.65395,6.65348,7.52686,6.0936C7.65976,5.99331,7.76736,5.88429,7.84873,5.76547C7.99666,5.5615,8.11939,5.33749,8.11939,5.09263C8.11939,4.8112,8.03711,4.55467,7.87201,4.32247C7.70748,4.09118,7.4061,3.97531,6.96939,3.97531C6.53948,3.97531,6.23474,4.118,6.05511,4.40325C5.9224,4.614,5.83885,4.80778,5.80426,5.01862C5.79195,5.09324,5.7441,5.25041,5.5846,5.25041L4.47332,5.25041C4.2367,5.25041,4.1846,5.09707,4.19143,5.02315C4.27709,4.09158,4.64113,3.45509,5.28481,3.04639C5.7225,2.765,6.26099,2.62379,6.89974,2.62379C7.73906,2.62379,8.43578,2.82387,8.99123,3.2246C9.5457,3.62477,9.82373,4.21775,9.82373,5.004C9.82378,5.48549,9.65479,5.89152,9.41428,6.22158L9.41428,6.22158Z" fill="#8A9099" fill-opacity="1"/></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

1
src/assets/input_search_ic.svg

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="16" height="16" viewBox="0 0 16 16"><defs><clipPath id="master_svg0_388_98546"><rect x="0" y="0" width="16" height="16" rx="0"/></clipPath></defs><g clip-path="url(#master_svg0_388_98546)"><g transform="matrix(1,0.0003452669770922512,0.0003452669770922512,1,-0.0006626046704887312,-0.0006625765588703647)"><path d="M10.552186732444763,3.9526081523895265C12.374626732444764,5.775058152389526,12.374626732444764,8.729828152389526,10.552186732444763,10.552268152389527C10.552186732444763,10.552268152389527,11.494996732444763,11.495078152389526,11.494996732444763,11.495078152389526C13.838126732444763,9.151938152389526,13.838126732444763,5.352948152389526,11.494996732444763,3.0097981523895263C11.494996732444763,3.0097981523895263,10.552186732444763,3.9526081523895265,10.552186732444763,3.9526081523895265C10.552186732444763,3.9526081523895265,10.552186732444763,3.9526081523895265,10.552186732444763,3.9526081523895265ZM10.552186732444763,10.552268152389527C8.729746732444763,12.374708152389527,5.774976732444763,12.374708152389527,3.9525267324447633,10.552268152389527C3.9525267324447633,10.552268152389527,3.009716732444763,11.495078152389526,3.009716732444763,11.495078152389526C5.352866732444763,13.838208152389527,9.151856732444763,13.838208152389527,11.494996732444763,11.495078152389526C11.494996732444763,11.495078152389526,10.552186732444763,10.552268152389527,10.552186732444763,10.552268152389527C10.552186732444763,10.552268152389527,10.552186732444763,10.552268152389527,10.552186732444763,10.552268152389527ZM3.9525267324447633,10.552268152389527C2.130081732444763,8.729828152389526,2.130081732444763,5.775058152389526,3.9525267324447633,3.9526081523895265C3.9525267324447633,3.9526081523895265,3.009716732444763,3.0097981523895263,3.009716732444763,3.0097981523895263C0.6665767324447631,5.352948152389526,0.6665767324447631,9.151938152389526,3.009716732444763,11.495078152389526C3.009716732444763,11.495078152389526,3.9525267324447633,10.552268152389527,3.9525267324447633,10.552268152389527C3.9525267324447633,10.552268152389527,3.9525267324447633,10.552268152389527,3.9525267324447633,10.552268152389527ZM3.9525267324447633,3.9526081523895265C5.774976732444763,2.1301631523895264,8.729746732444763,2.1301631523895264,10.552186732444763,3.9526081523895265C10.552186732444763,3.9526081523895265,11.494996732444763,3.0097981523895263,11.494996732444763,3.0097981523895263C9.151856732444763,0.6666581523895263,5.352866732444763,0.6666581523895263,3.009716732444763,3.0097981523895263C3.009716732444763,3.0097981523895263,3.9525267324447633,3.9526081523895265,3.9525267324447633,3.9526081523895265C3.9525267324447633,3.9526081523895265,3.9525267324447633,3.9526081523895265,3.9525267324447633,3.9526081523895265ZM10.552186732444763,11.495078152389526C10.552186732444763,11.495078152389526,13.380626732444764,14.323508152389527,13.380626732444764,14.323508152389527C13.380626732444764,14.323508152389527,14.323426732444764,13.380708152389527,14.323426732444764,13.380708152389527C14.323426732444764,13.380708152389527,11.494996732444763,10.552268152389527,11.494996732444763,10.552268152389527C11.494996732444763,10.552268152389527,10.552186732444763,11.495078152389526,10.552186732444763,11.495078152389526C10.552186732444763,11.495078152389526,10.552186732444763,11.495078152389526,10.552186732444763,11.495078152389526Z" fill="#626573" fill-opacity="1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

1
src/components/GuipInput.vue

@ -6,7 +6,6 @@
<p v-if="desc" class="desc_right">{{ desc }}</p> <p v-if="desc" class="desc_right">{{ desc }}</p>
<el-input <el-input
:type="type" :type="type"
v-bind="$attrs" v-bind="$attrs"
:placeholder="placeholder1" :placeholder="placeholder1"
:disabled="disabled" :disabled="disabled"

96
src/components/GuipSelect.vue

@ -1,12 +1,12 @@
<template> <template>
<el-form-item :style="{ ...style, height: height, ...styleObject }" <el-form-item :style="{ ...style, height: height, ...styleObject }"
:class="[{ 'column': column }, { 'w510': addClass == 'w510' }, { 'w388': addClass == 'w388' }, 'form-item']" :label="label" :class="[{ 'column': column }, { 'w510': addClass == 'w510' }, { 'w388': addClass == 'w388' }, 'form-item']"
:prop="prop" :rules="rules"> :label="label" :prop="prop" :rules="rules">
<p v-if="desc" class="desc_right">{{ desc }}</p> <p v-if="desc" class="desc_right">{{ desc }}</p>
<el-select :style="{ width: width }" :placeholder="placeholder1" @change="handleChange" v-model="selectedValue" v-bind="$attrs"> <el-select :style="{ width: width }" :placeholder="placeholder1" @change="handleChange" v-model="selectedValue"
<el-option v-for="item in options" :key="item.value" :label="item.label" :disabled="item.disabled" v-bind="$attrs">
:value="item.value"> <el-option v-for="item in processedOptions" :key="getItemValue(item)" :label="getItemLabel(item)"
:disabled="item.disabled" :value="getItemValue(item)">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -14,9 +14,36 @@
<script> <script>
export default { export default {
name: 'GuipTextarea', name: 'GuipSelect',
props: ['value','options', 'styleObject', 'disabled', 'defaultValue', 'placeholder', props: {
'width', 'height', 'label', 'type', 'prop', 'rules', 'column', 'addClass', 'desc'], value: [String, Number, Array],
options: {
type: Array,
default: () => []
},
//
valueKey: {
type: String,
default: 'value'
},
labelKey: {
type: String,
default: 'label'
},
styleObject: Object,
disabled: Boolean,
defaultValue: [String, Number, Array],
placeholder: String,
width: String,
height: String,
label: String,
type: String,
prop: String,
rules: [Object, Array],
column: Boolean,
addClass: String,
desc: String
},
data() { data() {
return { return {
selectedValue: '', selectedValue: '',
@ -24,43 +51,48 @@ export default {
placeholder1: '请选择', placeholder1: '请选择',
} }
}, },
computed: {
// options
processedOptions() {
return this.options || []
}
},
watch: { watch: {
value(newVal) { value(newVal) {
this.selectedValue = newVal; this.selectedValue = newVal
}, },
// defaultValue(newVal) { defaultValue(newVal) {
// this.selectedValue = newVal; if (newVal !== undefined && newVal !== null) {
// } this.selectedValue = newVal
}
}
}, },
mounted() { mounted() {
// //
if (this.defaultValue != null) { if (this.defaultValue !== undefined && this.defaultValue !== null) {
this.selectedValue = this.defaultValue; this.selectedValue = this.defaultValue
} }
if (this.value != null) { if (this.value !== undefined && this.value !== null) {
this.selectedValue = this.value; this.selectedValue = this.value
} }
// //
if (this.placeholder) { if (this.placeholder) {
this.placeholder1 = this.placeholder; this.placeholder1 = this.placeholder
} }
this.$nextTick(() => {
// let els = document.querySelectorAll('.el-select .el-input');
// els.forEach(item => {
// item.onmouseover = function () {
// item.classList.add("hoverclass")
// }
// item.onmouseout = function () {
// item.classList.remove("hoverclass")
// }
// })
})
}, },
methods: { methods: {
handleChange(value) { // value
this.$emit('input', value); getItemValue(item) {
this.$emit('change', value); return item[this.valueKey]
}, },
// label
getItemLabel(item) {
return item[this.labelKey]
},
handleChange(value) {
this.$emit('input', value)
this.$emit('change', value)
}
} }
} }
</script> </script>

71
src/components/GuipTextarea.vue

@ -1,26 +1,77 @@
<template> <template>
<el-form-item :label="label" :prop="prop" :rules="rules">
<el-input <el-input
type="textarea" type="textarea"
v-bind="$attrs" v-bind="$attrs"
:style="{...styleObject}" v-model="innerValue"
:style="{ width: width, height: height }"
:rows="rows" :rows="rows"
:placeholder="placeholder" @input="handleInput"
v-model="textarea"> @change="handleChange"
</el-input> ></el-input>
</el-form-item>
</template> </template>
<script> <script>
// autosize
export default { export default {
name: 'GuipTextarea', name: 'MyTextarea',
props:['styleObject','rows','placeholder'], inheritAttrs: false,
props: {
// v-model
value: {
type: [String, Number],
default: ''
},
// '100px' '100%'
width: {
type: String,
default: '100%'
},
// '100px' '100%'
height: {
type: String,
default: 'auto'
},
//
rows: {
type: Number,
default: 4
},
//
label: {
type: String,
default: ''
},
// prop
prop: {
type: String,
default: ''
},
//
rules: {
type: [Object, Array],
default: () => []
}
},
data() { data() {
return { return {
textarea: '' innerValue: this.value
} }
}, },
mounted(){ watch: {
value(newVal) {
if (newVal !== this.innerValue) {
this.innerValue = newVal
}
}
},
methods: {
handleInput(value) {
this.$emit('input', value)
},
handleChange(value) {
this.$emit('change', value)
}
} }
} }
</script> </script>

2
src/components/SliderMenu.vue

@ -44,7 +44,7 @@
</template> </template>
<script> <script>
import SetLeftMenu from '@/components/SetLeftMenu.vue' import SetLeftMenu from '@/components/SetLeftMenu.vue'
import SvgIcon1 from '@/components/SvgIcon1.vue'; import SvgIcon1 from '@/components/SvgIcon1.vue'
import GuipToolTip from '@/components/GuipToolTip.vue'; import GuipToolTip from '@/components/GuipToolTip.vue';
export default { export default {
name: 'SliderMenu', name: 'SliderMenu',

41
src/router/index.js

@ -6,17 +6,10 @@ import HomeView from '../views/HomeView.vue';
// import Franchise from '../views/Franchise.vue' // import Franchise from '../views/Franchise.vue'
Vue.use(VueRouter) Vue.use(VueRouter)
const whiteSlideList = ['/', '/ui', '/siteList']; //侧边导航白名单 const whiteSlideList = [ '/ui', '/hosInformation']; //侧边导航白名单
const whiteHeaderList = ['/', '/ui', '/register', '/configureServicePrices', '/siteList','/siteSetting/siteBaseSetting','/siteSetting/sitePersonalization' const whiteHeaderList = ['/','/doctorInformation', 'hosInformation'
,'/siteSetting/siteH5','/siteSetting/siteSem','/pageTemplete','/demo',
'/super/ranking/yearProfit', '/super/ranking/monthProfit', '/super/ranking/checkProfit', '/super/ranking/checkOrdernum',
'/super/ranking/checkRefund', '/super/ranking/agentProfit', '/super/ranking/agentRecharge', '/super/ranking/agentNew',
'/super/ranking/purchase','/super/ranking/stagePurchase','/super/ranking/loss'
]; //头部导航白名单 ]; //头部导航白名单
const whiteFooterList = ['/', '/ui', '/configureServicePrices', const whiteFooterList = ['/','/doctorInformation' ,'/hosInformation'
'/super/ranking/yearProfit', '/super/ranking/monthProfit', '/super/ranking/checkProfit', '/super/ranking/checkOrdernum',
'/super/ranking/checkRefund', '/super/ranking/agentProfit', '/super/ranking/agentRecharge', '/super/ranking/agentNew',
'/super/ranking/purchase','/super/ranking/stagePurchase','/super/ranking/loss'
]; //底部白名单 ]; //底部白名单
const routes = [{ const routes = [{
path: '/', path: '/',
@ -24,13 +17,27 @@ const routes = [{
component: HomeView, component: HomeView,
// component: Franchise // component: Franchise
}, },
// { {
// path: '/register', path: '/doctorInformation',
// name: 'register', component: () => import( /* webpackChunkName: "doctorInformation" */ '../views/DoctorInformation.vue'),
// component: () => import( /* webpackChunkName: "register" */ '../views/Register.vue'), name: '医生信息',
// children: [ children: [
// ] ]
// }, },
{
path: '/hosInformation',
component: () => import( /* webpackChunkName: "hosInformation" */ '../views/HosInformation.vue'),
name: '医院信息',
children: [
]
},
{
path: '/addNewTreatment',
component: () => import( /* webpackChunkName: "addNewTreatment" */ '../views/AddNewTreatment.vue'),
name: '新增套餐',
children: [
]
},
{ {
path: '/ui', path: '/ui',
name: 'ui组件', name: 'ui组件',

21
src/style/theme/common.scss

@ -13,8 +13,25 @@ body {
padding: 0; padding: 0;
} }
} }
.short-width {
width: calc((100% - 12px) / 2);
}
.pagePadding{
padding: 12px;
box-sizing: border-box;
}
.pageTitle{ .pageTitle{
font-family: Microsoft YaHei UI; font-family: Microsoft YaHei UI;
font-size: 16px;
font-weight: bold;
line-height: normal;
letter-spacing: 0.08em;
color: #1E2226;
text-align: left;
padding: 24px 0;
}
.littleTitle{
font-family: Microsoft YaHei UI;
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
line-height: normal; line-height: normal;
@ -210,7 +227,7 @@ body {
} }
.min-flex-right { .min-flex-right {
min-width: 1020px; min-width: 1020px;
// max-width: 1556px; max-width: 1556px;
width: 84.75%; width: 84.75%;
margin: 0 auto; margin: 0 auto;
.flex-common{ .flex-common{
@ -613,7 +630,7 @@ body {
.el-textarea__inner { .el-textarea__inner {
padding: 10px 12px; padding: 10px 12px;
border-radius: 2px; border-radius: 2px;
height: 100%; height: 100% !important;
} }
.el-textarea__inner:hover { .el-textarea__inner:hover {

2
src/style/theme/index.css

@ -15521,7 +15521,7 @@ border-color:#006AFF !important;
} }
.el-form-item { .el-form-item {
margin-bottom: 22px /* margin-bottom: 22px */
} }
.el-form-item::after, .el-form-item::after,

268
src/views/AddNewTreatment.vue

@ -0,0 +1,268 @@
<template>
<div class="site-setting-wrap pagePadding min-flex-right">
<p class="pageTitle bold">新增套餐</p>
<div class="siteMessage flex-common" id="siteMessage2">
<p class="littleTitle mb32">套餐信息</p>
<el-form :model="siteForm1" :rules="siteFormrules1" ref="siteForm1">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="套餐名称" :required="true">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.times"
prop="times" placeholder="输入" />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" class="mb24" label="套餐价格" :required="true">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.times"
prop="times" placeholder="输入" unit="元" />
</GuipFormItem>
</div>
</div>
</el-form>
</div>
</div>
</template>
<script>
import store from '../store';
import { mapState } from 'vuex';
import GuipFormItem from '@/components/GuipFormItem.vue';
import GuipInput from '@/components/GuipInput.vue';
export default {
//
name: '',
props: [''],
components: {
GuipFormItem,
GuipInput,
},
data() {
return {
numSettingForm: {
times: '',
hours: '',
nums: '',
days: ''
},
numSettingFormRule: {
times: [
{ required: true, message: '请输入', trigger: 'blur' }
],
hours: [
{ required: true, message: '请输入', trigger: 'blur' }
],
nums: [
{ required: true, message: '请输入', trigger: 'blur' }
],
days: [
{ required: true, message: '请输入', trigger: 'blur' }
],
},
fileList: [
{ name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }
],
options_payword: [{
value: '选项1',
name:'hhahhaa',
id:'11',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶',
name:'hha222hhaa',
id:'1111',
}, {
value: '选项3',
name:'hha333haa',
id:'1331',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
siteForm: {
company_name: '',
company_address: '',
company_phone: '',
site_alias: '',
},
form: {
description: '',
detailDesc: '',
tags:'1331'
},
siteFormrules: {
site_alias: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
siteForm1: {
domain_set: '',
domain_source: '平台免费域名',
},
siteForm2: {
zhifubao_pay: '',
weixin_pay: '',
},
siteFormrules1: {
domain_source: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
domain_source: [
{ label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" },
{ label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" },
],
options_weixin_null: {
label: '暂无收款账号',
value: '暂时没有收款账号,我想稍后配置',
desc: '暂无收款账号,稍后配置'
},
select_placeholder_weixin: '暂无收款账号,稍后配置',
selectedItemWeixin: {},//
options_weixin: [],
options_zhifubao: [],
}
},
computed: {
...mapState(['pageTitle']) // VuexshowSidebar
},
mounted() {
store.commit('SET_PAGETITLE', '基本设置');
},
methods: {
changeSelect(value){
console.log(value,'--');
},
btnClick() {
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
//
handleAvatarSuccess(res, file) {
this.imageUrl1 = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
},
changeNormalWeixin() {
},
changeSelectWeixin(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
}
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
//
domain_radioChange(type) {
console.log(type, '--');
},
onSwitchChange(data) {
console.log(data, '---');
},
submitForm(form) {
console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
if (valid) {
alert('提交成功!');
} else {
return false;
}
});
},
cancelClick() {
console.log('quxiao');
},
confirmClick(type) {
console.log(type, '确认');
}
}
}
</script>
<style lang="scss">
.siteMessage {
border-radius: 4px;
transition: all .5s;
border: 1px solid transparent;
}
.addStore {
margin-top: 12px;
}
.qqCode-wrap {
margin-bottom: 14px;
.labelImg {
opacity: .7;
margin-left: 8px;
}
.avatar-uploader {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
margin: 12px 0 8px;
}
.avatar-desc {
text-align: left;
}
}
.site-setting-wrap {
width: 100%;
}
#siteMessage2 {
margin: 12px 0;
}
.domain-wrap {
.domain-item {
margin-bottom: 10px;
}
.domain-item p:last-child {
padding-left: 23px;
color: #8A9099;
}
p {
text-align: left;
line-height: 18px;
margin-bottom: 8px;
}
.domain-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
}
</style>

290
src/views/DoctorInformation.vue

@ -0,0 +1,290 @@
<template>
<div class="site-setting-wrap pagePadding min-flex-right">
<div class="siteMessage flex-common" id="siteMessage1">
<h3>基础信息</h3>
<el-form :model="siteForm" :rules="siteFormrules" ref="siteForm">
<div class="flex-wrap">
<div class="flex-left">
<div class="qqCode-wrap right">
<div class="flex">医生照片
<img class="labelImg" src="@/assets/form_qua_ic.svg" alt="">
</div>
<el-upload class="avatar-uploader upload-demo" accept=".jpg,.png"
action="https://jsonplaceholder.typicode.com/posts/" :file-list="fileList"
:on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<hover-button button-text="重新上传" :default-icon="require('../assets/upLoad_grey.svg')"
:hover-icon="require('../assets/upLoad_active.svg')" default-text-color="#23242B"
hover-text-color="#006AFF" @click="btnClick" />
<div slot="tip" class="el-upload__tip desc">支持pngjpg格式尺寸32PX*32PX</div>
</el-upload>
</div>
<GuipInput ref="GuipInput" column="column" label="医生姓名" v-model="siteForm.company_name"
prop="company_name" placeholder="请输入" />
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipInput ref="GuipInput" column="column" label="身份证号码" v-model="siteForm.company_address"
prop="company_address" placeholder="请输入" />
<GuipInput ref="GuipInput" column="column" label="手机号码" v-model="siteForm.phone"
prop="company_phone" placeholder="常用手机号" />
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" />
</div>
<div class="siteMessage flex-common" id="siteMessage2">
<h3>个人介绍</h3>
<el-form :model="siteForm1" :rules="siteFormrules1" ref="siteForm1">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="" label="一句话介绍">
<GuipTextarea slot="formDom" v-model="form.description" prop="description" width="100%"
height="56px" placeholder="请输入描述内容" maxlength="14" show-word-limit />
</GuipFormItem>
<GuipFormItem column="column" class="" label="详细介绍">
<GuipTextarea slot="formDom" v-model="form.detailDesc" prop="description" width="100%"
height="86px" autosize placeholder="请输入描述内容" maxlength="不限" show-word-limit />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" label="个人标签">
<div slot="formLeft" class="form-top-icon"> </div>
<span slot="formRight" class="desc">展示给患者体现您的专业性</span>
<GuipSelect slot="formDom" v-model="form.tags" multiple :options="options_payword"
placeholder="点击选择">
</GuipSelect>
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" />
</div>
</div>
</template>
<script>
import store from '../store';
import { mapState } from 'vuex';
import HoverButton from '@/components/HoverButton.vue';
import GuipFormItem from '@/components/GuipFormItem.vue';
import GuipInput from '@/components/GuipInput.vue';
import GuipTextarea from '@/components/GuipTextarea.vue';
import GroupFormBtns from '@/components/GroupFormBtns.vue';
import GuipSelect from '@/components/GuipSelect.vue';
// import {setHighActive} from '@/utils/common';
export default {
//
name: '',
props: [''],
components: {
GuipFormItem,
HoverButton,
GuipInput,
GuipSelect,
GuipTextarea,
GroupFormBtns
},
data() {
return {
fileList: [
{ name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }
],
options_payword: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
siteForm: {
company_name: '',
company_address: '',
company_phone: '',
site_alias: '',
},
form: {
description: '',
detailDesc: '',
tags:''
},
siteFormrules: {
site_alias: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
siteForm1: {
domain_set: '',
domain_source: '平台免费域名',
},
siteForm2: {
zhifubao_pay: '',
weixin_pay: '',
},
siteFormrules1: {
domain_source: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
domain_source: [
{ label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" },
{ label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" },
],
options_weixin_null: {
label: '暂无收款账号',
value: '暂时没有收款账号,我想稍后配置',
desc: '暂无收款账号,稍后配置'
},
select_placeholder_weixin: '暂无收款账号,稍后配置',
selectedItemWeixin: {},//
options_weixin: [],
options_zhifubao: [],
}
},
computed: {
...mapState(['pageTitle']) // VuexshowSidebar
},
mounted() {
store.commit('SET_PAGETITLE', '基本设置');
},
methods: {
btnClick() {
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
//
handleAvatarSuccess(res, file) {
this.imageUrl1 = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
},
changeNormalWeixin() {
},
changeSelectWeixin(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
}
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
//
domain_radioChange(type) {
console.log(type, '--');
},
onSwitchChange(data) {
console.log(data, '---');
},
submitForm(form) {
console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
if (valid) {
alert('提交成功!');
} else {
return false;
}
});
},
cancelClick() {
console.log('quxiao');
},
confirmClick(type) {
console.log(type, '确认');
}
}
}
</script>
<style lang="scss">
.siteMessage {
border-radius: 4px;
transition: all .5s;
border: 1px solid transparent;
}
.addStore {
margin-top: 12px;
}
.qqCode-wrap {
margin-bottom: 14px;
.labelImg {
opacity: .7;
margin-left: 8px;
}
.avatar-uploader {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
margin: 12px 0 8px;
}
.avatar-desc {
text-align: left;
}
}
.site-setting-wrap {
width: 100%;
}
#siteMessage2 {
margin: 12px 0;
}
.domain-wrap {
.domain-item {
margin-bottom: 10px;
}
.domain-item p:last-child {
padding-left: 23px;
color: #8A9099;
}
p {
text-align: left;
line-height: 18px;
margin-bottom: 8px;
}
.domain-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
}
</style>

768
src/views/HosInformation.vue

@ -0,0 +1,768 @@
<template>
<div class="site-setting-wrap pagePadding min-flex-right">
<p class="pageTitle bold">基础信息</p>
<div class="siteMessage flex-common" id="siteMessage1">
<p class="littleTitle mb32">基础信息</p>
<el-form :model="siteForm" :rules="siteFormrules" ref="siteForm">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="出诊医院省市" :required="true">
<div class="flex-between" slot="formDom">
<div class="short-width">
<GuipSelect width="100%" v-model="form.tags" multiple :options="options_payword"
placeholder="选择省份">
</GuipSelect>
</div>
<div class="short-width">
<GuipSelect width="100%" v-model="form.tags" multiple :options="options_payword"
placeholder="选择城市">
</GuipSelect>
</div>
</div>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="出诊医院名称" :required="true">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_name"
prop="company_name" placeholder="请输入">
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" />
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="医院简称">
<span slot="formRight" class="desc">方便患者记忆非必填</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_address"
prop="company_address" placeholder="请输入" />
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="所在科室" :required="true">
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="siteForm.company_address"
prop="company_address" placeholder="请输入" />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" class="mb24">
<div slot="formLeft" class="form-top-icon">医保定点</div>
<div class="flex" slot="formDom" style="padding: 9px 0px;">
<GuipSwitch :modelValue="yibao" @change="onSwitchChange" activeText="非医保定点"
inactiveText="非医保定点">
</GuipSwitch>
</div>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="使用功能">
<el-checkbox-group slot="formDom" v-model="checkList" class="checkboxGroup">
<div class="flex">
<el-checkbox label="医生名片(基础功能不可取消)"></el-checkbox>
<el-checkbox label="患者预约"></el-checkbox>
</div>
<el-checkbox label="项目计数"></el-checkbox>
</el-checkbox-group>
</GuipFormItem>
<GuipFormItem column="column" class="" label="就诊提醒">
<div slot="formRight" class="desc">就诊前的注意事项非必填</div>
<GuipTextarea slot="formDom" v-model="form.detailDesc" prop="description" width="100%"
height="84px" autosize placeholder="输入" />
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm')" />
</div>
<div class="siteMessage flex-common" id="siteMessage2">
<p class="littleTitle mb32">出诊时间</p>
<el-form :model="siteForm1" :rules="siteFormrules1" ref="siteForm1">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="工作时间( 上午 )" :required="true">
<el-time-picker slot="formDom" style="width:100%" is-range v-model="time1"
range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"
@change="ChangeTime('time1')">
</el-time-picker>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="工作时间( 下午 )" :required="true">
<el-time-picker slot="formDom" style="width:100%" is-range v-model="time2"
range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" placeholder="选择时间范围"
@change="ChangeTime('time1')">
</el-time-picker>
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" label="每周出诊安排" :required="true">
<div class="flex weekPlan" slot="formDom">
<GuipSelect v-for="[key] in Object.entries(weekPlan)" :key="key" v-model="weekPlan[key]"
:options="options_weekPlan" @change="weekChange()" :label="key" placeholder="休息">
</GuipSelect>
</div>
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('siteForm1')" />
</div>
<div class="siteMessage flex-common" id="siteMessage3">
<p class="littleTitle mb32">放号设置</p>
<el-form :model="numSettingForm" :rules="numSettingFormRule" ref="numSettingForm">
<div class="flex-wrap">
<div class="flex-left">
<GuipFormItem column="column" class="mb24" label="号源单位时段" :required="true">
<span class="desc" slot="formRight">如30分钟放号时9:00-9:309:30-10:00来划分</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.times"
prop="times" placeholder="请输入" unit="分钟/时段" />
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="放号量" :required="true">
<span class="desc" slot="formRight">放号量可少于实际数量以便为现场约号患者预留</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.nums"
prop="nums" placeholder="请输入" unit="个号/时段" />
</GuipFormItem>
</div>
<div class="flex-line"></div>
<div class="flex-right">
<GuipFormItem column="column" class="mb24" label="开放预约" :required="true">
<span class="desc" slot="formRight">患者可提前多久约号</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.hours"
prop="hours" placeholder="请输入" unit="小时">
<span slot="prependshow">提前</span>
</GuipInput>
</GuipFormItem>
<GuipFormItem column="column" class="mb24" label="超时未就诊提醒">
<span class="desc" slot="formRight">不输入即无期限</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="numSettingForm.days"
prop="days" placeholder="请输入" unit="天" />
</GuipFormItem>
</div>
</div>
</el-form>
<GroupFormBtns @cancel="cancelClick" @confirm="submitForm('numSettingForm')" />
</div>
<p class="pageTitle bold">项目管理</p>
<div class="siteMessage flex-common" id="siteMessage4">
<el-form>
<div class=" mb32 flex-between">
<span class="littleTitle">项目列表</span>
<div class="flex-between" style="gap:10px">
<GuipButton size="table" type="ignore">新增分组</GuipButton>
<GuipButton size="table" type="primary">新增项目</GuipButton>
</div>
</div>
<div class="selectAllTable-wrap flex-between mt32">
<div class="left flex">
<div class="checkboxAll">
<el-checkbox @change="handleSelectAllChange" v-model="selectAll"
:indeterminate="isIndeterminate">全选</el-checkbox>
</div>
<span class="totalCount">{{ projectList.length }}已选{{ selectedCount }}</span>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }"
@click="batchOperate('1')">批量禁用</GuipButton>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }"
@click="batchOperate('2')">
批量启用</GuipButton>
</div>
</div>
<div class="flex-between mb32 mt32">
<div class="tabProject flex">
<div :class="['tab-item ', projectSearchId == item.id ? 'active' : '']"
v-for="item in projectTagData" :key="item.name">{{ item.name }}</div>
</div>
<div class="right flex">
<span>搜索项目</span>
<GuipInput slot="formDom" ref="GuipInput" column="column" v-model="projectSearchName"
prop="company_name" placeholder="请输入">
<img src="@/assets/input_search_ic.svg" slot="suffix" @click="handleClear" />
</GuipInput>
</div>
</div>
<GuipTable :tableData="projectList" style="width: 100%" ref="multipleTable"
@selection-change="handleSelectionChange" :loading="loading">
<el-table-column type="selection" label="选择" width="80"></el-table-column>
<el-table-column prop="name" label="项目名称" min-width="225"></el-table-column>
<el-table-column prop="price" label="项目价格" min-width="125"></el-table-column>
<el-table-column prop="group" label="分组" min-width="125"></el-table-column>
<el-table-column prop="time" label="添加时间" min-width="225"></el-table-column>
<el-table-column prop="status" label="状态" min-width="125">
<template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.status" @change="onSwitchChange1(scope.row)">
</GuipSwitch>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" min-width="100px">
<template slot-scope="scope">
<div class="flex">
<el-button type="text" @click="handleClick(scope.row)">编辑</el-button>
</div>
</template>
</el-table-column>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="projectList.length">
</el-pagination>
</el-form>
</div>
<div class="siteMessage flex-common mt12" id="siteMessage5">
<el-form>
<div class=" mb32 flex-between">
<span class="littleTitle">疗程套餐</span>
<div class="flex-between" style="gap:10px">
<GuipButton size="table" type="primary" @click="addNewSetMenu">新增套餐</GuipButton>
</div>
</div>
<div class="selectAllTable-wrap flex-between mt32 mb32">
<div class="left flex">
<div class="checkboxAll">
<el-checkbox @change="handleSelectAllChange1" v-model="selectAll"
:indeterminate="isIndeterminate">全选</el-checkbox>
</div>
<span class="totalCount">{{ courseList.length }}已选{{ selectedCount }}</span>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px', margin: '0 26px' }"
@click="batchOperate('1')">批量禁用</GuipButton>
<GuipButton type="ignore" :btnstyle="{ width: '99px', height: '32px' }"
@click="batchOperate('2')">
批量启用</GuipButton>
</div>
</div>
<GuipTable :tableData="courseList" style="width: 100%" ref="multipleTable1"
@selection-change="handleSelectionChange1" :loading="loading1">
<el-table-column type="selection" label="选择" width="80"></el-table-column>
<el-table-column prop="name" label="项目名称" min-width="225"></el-table-column>
<el-table-column prop="price" label="项目价格" min-width="125"></el-table-column>
<el-table-column prop="group" label="分组" min-width="125"></el-table-column>
<el-table-column prop="time" label="添加时间" min-width="225"></el-table-column>
<el-table-column prop="status" label="状态" min-width="125">
<template slot-scope="scope">
<GuipSwitch :modelValue="scope.row.status" @change="onSwitchChange2(scope.row)">
</GuipSwitch>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" min-width="100px">
<template slot-scope="scope">
<div class="flex">
<el-button type="text" @click="handleClick(scope.row)">编辑</el-button>
</div>
</template>
</el-table-column>
</GuipTable>
<el-pagination background @size-change='handleSizeChange' @current-change='handleCurrentChange'
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="courseList.length">
</el-pagination>
</el-form>
</div>
</div>
</template>
<script>
import store from '../store';
import GuipFormItem from '@/components/GuipFormItem.vue';
import GuipButton from '@/components/GuipButton.vue';
import GuipInput from '@/components/GuipInput.vue';
import GuipTextarea from '@/components/GuipTextarea.vue';
import GroupFormBtns from '@/components/GroupFormBtns.vue';
import GuipSelect from '@/components/GuipSelect.vue';
import GuipSwitch from '@/components/GuipSwitch.vue';
import GuipTable from '@/components/GuipTable.vue';
// import {setHighActive} from '@/utils/common';
export default {
//
name: '',
props: [''],
components: {
GuipFormItem,
GuipButton,
GuipInput,
GuipTable,
GuipSwitch,
GuipSelect,
GuipTextarea,
GroupFormBtns
},
data() {
return {
currentPage:1,
pageSize:10,
currentPage1:1,
pageSize1:10,
loading: false,
loading1: false,
selectedRows: [],//
selectedRows1: [],//
isIndeterminate: false,
isIndeterminate1: false,
projectSearchId: '',
projectSearchName: '',
projectList: [
{
name: '针灸',
price: '88',
group: '针灸1',
time: '2077 - 12 - 20',
status: true,
id: '1'
},
{
name: '拔罐',
price: '188',
group: '针灸2',
time: '2077 - 12 - 20',
status: true,
id: '2'
},
{
name: '火刺',
price: '55',
group: '针灸1',
time: '2077 - 12 - 20',
status: true,
id: '3'
},
],
projectTagData: [
{
name: '全部分类',
id: '0'
},
{
name: '针灸1',
id: '1'
},
{
name: '针灸2',
id: '11'
},
{
name: '针灸3',
id: '12'
},
{
name: '针灸4',
id: '13'
},
],
courseList: [
{
name: '针灸',
price: '88',
group: '针灸1',
time: '2077 - 12 - 20',
status: true,
id: '1'
},
{
name: '拔罐',
price: '188',
group: '针灸2',
time: '2077 - 12 - 20',
status: true,
id: '2'
},
{
name: '火刺',
price: '55',
group: '针灸1',
time: '2077 - 12 - 20',
status: true,
id: '3'
},
],
selectAll: false,
selectAll1: false,
numSettingForm: {
times: '',
hours: '',
nums: '',
days: ''
},
numSettingFormRule: {
times: [
{ required: true, message: '请输入', trigger: 'blur' }
],
hours: [
{ required: true, message: '请输入', trigger: 'blur' }
],
nums: [
{ required: true, message: '请输入', trigger: 'blur' }
],
days: [
{ required: true, message: '请输入', trigger: 'blur' }
],
},
options_payword: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
weekPlan: {
'周一': '',
'周二': '',
'周三': '',
'周四': '',
'周五': '',
'周六': '',
'周日': '',
},
time1: '',
time2: '',
checkList: ['医生名片(基础功能不可取消)'],
fileList: [
{ name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100' }
],
yibao: '',
options_weekPlan: [{
value: '1',
label: '上午班'
}, {
value: '2',
label: '下午班'
}, {
value: '3',
label: '全天'
}, {
value: '4',
label: '休息'
},],
siteForm: {
company_name: '',
company_address: '',
company_phone: '',
site_alias: '',
},
form: {
description: '',
detailDesc: '',
tags: ''
},
siteFormrules: {
site_alias: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
siteForm1: {
domain_set: '',
domain_source: '平台免费域名',
},
siteForm2: {
zhifubao_pay: '',
weixin_pay: '',
},
siteFormrules1: {
domain_source: [
{ required: true, message: '请输入站点简称', trigger: 'blur' }
]
},
domain_source: [
{ label: '平台免费域名', value: '平台免费域名', selectedLabel: "平台免费域名" },
{ label: '我自己有域名', value: '我自己有域名', selectedLabel: "我自己有域名" },
],
options_weixin_null: {
label: '暂无收款账号',
value: '暂时没有收款账号,我想稍后配置',
desc: '暂无收款账号,稍后配置'
},
select_placeholder_weixin: '暂无收款账号,稍后配置',
selectedItemWeixin: {},//
options_weixin: [],
options_zhifubao: [],
}
},
computed: {
selectedCount() {
return this.selectedRows.length;
} // VuexshowSidebar
},
mounted() {
store.commit('SET_PAGETITLE', '基本设置');
},
methods: {
onSwitchChange1(row) {
row.status = !row.status;
this.$set(this.projectList, row)
},
onSwitchChange2(row) {
row.status = !row.status;
this.$set(this.courseList, row)
},
handleClick(row) {
console.log(row);
//
},
//
handleSelectAllChange(val) {
console.log(this.$refs.multipleTable,'multipleTable-');
if (val) {
//
const unselectedRows = this.projectList.filter(
row => !this.selectedRows.includes(row)
);
unselectedRows.forEach(row => {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, true);
});
} else {
//
this.selectedRows.forEach(row => {
this.$refs.multipleTable.$refs.guiptable.toggleRowSelection(row, false);
});
}
},
//
handleSelectionChange(rows) {
this.selectedRows = rows;
//
const allSelected = rows.length === this.projectList.length;
const noneSelected = rows.length === 0;
this.selectAll = allSelected;
this.isIndeterminate = !noneSelected && !allSelected;
},
handleSelectAllChange1(val) {
console.log(this.$refs.multipleTable,'multipleTable-');
if (val) {
//
const unselectedRows = this.courseList.filter(
row => !this.selectedRows1.includes(row)
);
unselectedRows.forEach(row => {
this.$refs.multipleTable1.$refs.guiptable.toggleRowSelection(row, true);
});
} else {
//
this.selectedRows.forEach(row => {
this.$refs.multipleTable1.$refs.guiptable.toggleRowSelection(row, false);
});
}
},
//
handleSelectionChange1(rows) {
this.selectedRows = rows;
//
const allSelected = rows.length === this.courseList.length;
const noneSelected = rows.length === 0;
this.selectAll1 = allSelected;
this.isIndeterminate1 = !noneSelected && !allSelected;
},
//
batchOperate(type) {
if (type == '1') {
//
} else {
//
}
},
ChangeTime(type) {
console.log(type, '===');
},
btnClick() {
},
handleClear(value) {
// this.handleInput('')
console.log(value, 'value===qinghcu');
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
handlePreview(file) {
console.log(file);
},
//
handleAvatarSuccess(res, file) {
this.imageUrl1 = URL.createObjectURL(file.raw);
},
beforeAvatarUpload(file) {
const isJPG = file.type === 'image/jpeg' || file.type === 'image/png';
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG) {
this.$message.error('上传头像图片只能是 JPG 或 PNG 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M;
},
changeNormalWeixin() {
},
changeSelectWeixin(item, flag) {
if (flag) {
this.select_placeholder_weixin = this.options_weixin_null.desc;
return
}
this.selectedItem = { ...item };
console.log(this.selectedItem, 'this.selectedItem====');
},
//
domain_radioChange(type) {
console.log(type, '--');
},
onSwitchChange(data) {
console.log(data, '---');
},
submitForm(form) {
console.log(this.$refs[form], '-----');
this.$refs[form].validate((valid) => {
console.log(this[form], '======formxinxi');
if (valid) {
alert('提交成功!');
} else {
return false;
}
});
},
cancelClick() {
console.log('quxiao');
},
confirmClick(type) {
console.log(type, '确认');
}
}
}
</script>
<style lang="scss">
.weekPlan {
display: grid;
grid-gap: 12px 44px;
grid-template-columns: repeat(2, 1fr);
}
.totalCount {
font-size: 12px;
font-weight: normal;
line-height: 13px;
letter-spacing: 0.08em;
color: #8A9099;
margin-left: 12px;
}
.tabProject {
gap: 12px;
.tab-item {
/* 自动布局子元素 */
height: 28px;
min-width: 74px;
/* 自动布局 */
display: flex;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: 4px 12px;
gap: 4px;
align-self: stretch;
z-index: 2;
border-radius: 14px;
background: #FFFFFF;
box-sizing: border-box;
/* middle/middle_line_1 */
border: 1px solid #DFE2E6;
/* body/body 2_regular */
font-family: Microsoft YaHei UI;
font-size: 14px;
text-align: justify;
/* 浏览器可能不支持 */
letter-spacing: 0.08em;
/* text/text_4 */
color: #8A9099;
}
.active {
color: #006AFF;
background: #F2F3F5;
}
}
.el-form-item {
margin-bottom: 0;
}
.siteMessage {
border-radius: 4px;
transition: all .5s;
border: 1px solid transparent;
}
.checkboxGroup {
display: flex;
align-items: flex-start;
flex-direction: column;
gap: 24px;
height: 72px;
padding: 10px 0;
}
.addStore {
margin-top: 12px;
}
.qqCode-wrap {
margin-bottom: 14px;
.labelImg {
opacity: .7;
margin-left: 8px;
}
.avatar-uploader {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: flex-start;
margin: 12px 0 8px;
}
.avatar-desc {
text-align: left;
}
}
.site-setting-wrap {
width: 100%;
}
#siteMessage2 {
margin: 12px 0;
}
.domain-wrap {
.domain-item {
margin-bottom: 10px;
}
.domain-item p:last-child {
padding-left: 23px;
color: #8A9099;
}
p {
text-align: left;
line-height: 18px;
margin-bottom: 8px;
}
.domain-box {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
}
</style>

181
src/views/elementGroups.vue

@ -1,4 +1,5 @@
<template> <template>
<div class="main-content12">
<div class="elementWrap"> <div class="elementWrap">
<!-- ele-item 为类名的这种div label h3 仅在此页面进行布局使用复制时无需复制此元素 --> <!-- ele-item 为类名的这种div label h3 仅在此页面进行布局使用复制时无需复制此元素 -->
<el-form :model="form" :rules="rules" class="el-row demo-ruleForm" ref="formRef"> <el-form :model="form" :rules="rules" class="el-row demo-ruleForm" ref="formRef">
@ -17,22 +18,11 @@
<h3 for="">表格(表头自定义自定义渲染固定列)</h3> <h3 for="">表格(表头自定义自定义渲染固定列)</h3>
<GuipButton type="primary" @click="toggleAllSelection">全选按钮</GuipButton> <GuipButton type="primary" @click="toggleAllSelection">全选按钮</GuipButton>
<el-form>
<GuipTable :tableData="tableData" ref="multipleTable" @selectChange="handleSelectionChange" <GuipTable :tableData="tableData2" ref="multipleTable" @selectChange="handleSelectionChange"
:multiple="true" autoColumn="true" :loading="tableLoading"> :multiple="true" autoColumn="true" :loading="tableLoading" :border="true">
<!-- <template slot="header"> --> <!-- <template slot="header"> -->
<el-table-column width="180" fixed="left" label="名称(固定左)"></el-table-column> <el-table-column width="180" fixed="left" label="名称(固定左)"></el-table-column>
<!-- <el-table-column prop="type">
<template slot="header">
<GuipSelect class="custom-select" v-model="chktype" :options="type2filterOptions"
defaultValue="全部检测类型" @change="changeSelectType" />
</template>
<template slot-scope="scope">
{{ type2name[scope.row.type] }}
</template>
</el-table-column> -->
<el-table-column prop="created_at" label="时间" width="200"> <el-table-column prop="created_at" label="时间" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="flex cell_render"> <div class="flex cell_render">
@ -43,8 +33,8 @@
'0' ? '文字居中' : '文字居中' }}</span> '0' ? '文字居中' : '文字居中' }}</span>
</GuipToolTip> </GuipToolTip>
<GuipToolTip content="图标居中"> <GuipToolTip content="图标居中">
<svg-icon :size="16" :path="require('@/assets/tableEdit.svg')" :color="'#8A9099'" <svg-icon :size="16" :path="require('@/assets/tableEdit.svg')"
:hoverColor="'#006AFF'" /> :color="'#8A9099'" :hoverColor="'#006AFF'" />
</GuipToolTip> </GuipToolTip>
</div> </div>
@ -58,8 +48,8 @@
scope.row.payment scope.row.payment
== ==
'0' ? '单元格局中' : '单元格局中' }}</span> '0' ? '单元格局中' : '单元格局中' }}</span>
<svg-icon :size="16" :path="require('@/assets/tableEdit.svg')" :color="'#8A9099'" <svg-icon :size="16" :path="require('@/assets/tableEdit.svg')"
:hoverColor="'#006AFF'" /> :color="'#8A9099'" :hoverColor="'#006AFF'" />
</div> </div>
</GuipToolTip> </GuipToolTip>
@ -68,24 +58,15 @@
</el-table-column> </el-table-column>
<el-table-column prop="name2" label="姓名" width="150"></el-table-column> <el-table-column prop="name2" label="姓名" width="150"></el-table-column>
<el-table-column prop="price" label="价格" width="150"> <el-table-column prop="price" label="价格" width="150">
<!-- <template slot-scope="scope"> <template slot-scope="scope">
<span @click="handlePriceClick(scope.row)">{{ scope.row.price }}</span> <span @click="handlePriceClick(scope.row)">{{ scope.row.price }}</span>
</template> --> </template>
<!-- 气泡弹出框 后期样式自定义-->
<!-- <template slot-scope="scope">
<el-popover trigger="click" placement="top">
<input type="text">
<div slot="reference" class="name-wrapper">
<el-tag size="medium">{{ scope.row.price }}</el-tag>
</div>
</el-popover>
</template> -->
</el-table-column> </el-table-column>
<el-table-column prop="address" label="地址1" width="150"> </el-table-column> <el-table-column prop="address" label="地址1" width="150"> </el-table-column>
<el-table-column prop="address" label="地址2" width="250"> </el-table-column> <el-table-column prop="address" label="地址2" width="250"> </el-table-column>
<el-table-column prop="address" label="地址3" width="150"> </el-table-column> <el-table-column prop="address" label="地址3" width="150"> </el-table-column>
<el-table-column prop="address1" label="地址测试" width="100"></el-table-column> <el-table-column prop="address1" label="地址测试" width="100"></el-table-column>
<el-table-column prop="price2" label="价格" width="300"> <el-table-column prop="price" label="价格" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<GuipSelect width="200px" @change="changeSelect(scope.row)" v-model="form.card" <GuipSelect width="200px" @change="changeSelect(scope.row)" v-model="form.card"
prop="card" :options="options" defaultValue="选项1" /> prop="card" :options="options" defaultValue="选项1" />
@ -104,28 +85,26 @@
:current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper" :current-page="currentPage" :page-size=pageSize layout="prev, pager, next,jumper"
:total="total"> :total="total">
</el-pagination> </el-pagination>
</el-form>
</div> </div>
<div class="flex">
<div>
<h3 for="">表格(带气泡框),内容自定义</h3> <h3 for="">表格(带气泡框),内容自定义</h3>
<el-form> <a href="/register">点击一下跳转参照页面</a>
<GuipTable :tableData="tableData2" :key="random()" ref="multipleTable" <!-- 暂时废弃此版本 -->
<!-- <GuipTable :tableData="tableData4" :key="random()" ref="multipleTable"
@selectChange="handleSelectionChange" :multiple="true" autoColumn="true" width="900px" @selectChange="handleSelectionChange" :multiple="true" autoColumn="true" width="900px"
:columns="columns" @confirm="onConfirm" @cancel="onCancel"> :columns="columns" @confirm="onConfirm" @cancel="onCancel">
<!-- 自定义姓名列的气泡框内容 -->
<template #popover-content-name="{ row, column }"> <template #popover-content-name="{ row, column }">
<div> <div>
<GuipInput ref="GuipInput" width="252px" v-model="row[`edit_${column.prop}`]" label="排序" <GuipInput ref="GuipInput" width="252px" type="text"
:prop="column.label" placeholder="这是" /> v-model="row[`edit_${column.prop}`]" label="排序" :prop="column.label"
placeholder="这是" />
</div> </div>
</template> </template>
<template #popover-content-age="{ row, column }"> <template #popover-content-age="{ row, column }">
<GuipInput ref="GuipInput" width="252px" v-model="row[`edit_${column.prop}`]" label="年龄" <GuipInput ref="GuipInput" width="252px" v-model="row[`edit_${column.prop}`]" type="text"
:prop="column.label" placeholder="这是" unit="岁"> label="年龄" :prop="column.label" placeholder="这是" unit="岁">
</GuipInput> </GuipInput>
</template> </template>
<!-- 自定义地址列的气泡框内容 -->
<template #popover-content-address="{ row, column }"> <template #popover-content-address="{ row, column }">
<div> <div>
<p>自定义内容{{ column.label }}</p> <p>自定义内容{{ column.label }}</p>
@ -136,32 +115,33 @@
</el-select> </el-select>
</div> </div>
</template> </template>
</GuipTable> </GuipTable> -->
</el-form>
</div> </div>
<div class="ele-item"> <div class="ele-item">
<label for="">文本域</label> <label for="">文本域固定行数</label>
<GuipTextarea disabled :styleObject="styleObject" /> <GuipTextarea :styleObject="{ width: '450px' }" placeholder="固定行数" :rows="4" />
</div>
<div class="ele-item">
<label for="">文本域自适应高度</label>
<GuipTextarea :styleObject="{ width: '450px' }" placeholder="自适应高度" autosize />
</div> </div>
<div class="ele-item"> <div class="ele-item">
<label for="">输入框</label> <label for="">输入框</label>
<GuipInput ref="GuipInput" width="200px" height="30px" disabled placeholder="这是自定义默认提示语" /> <GuipInput ref="GuipInput" v-model="form.input1" width="200px" height="30px"
placeholder="这是自定义默认提示语" />
<div style="width: 20px;height: 10px;"></div> <div style="width: 20px;height: 10px;"></div>
<GuipInput ref="GuipInput" :styleObject="styleObject1" defaultValue="爱吃麻辣烫" :maxlength="100" <GuipInput ref="GuipInput" v-model="form.input2" :maxlength="100" @change="handleInput"
@change="handleInput" @blur="handleInput" @input="handleInput" @focus="handleInput" @blur="handleInput" @input="handleInput" @focus="handleInput" placeholder="这是自定义默认提示语" />
placeholder="这是自定义默认提示语" />
<div style="width: 20px;height: 10px;"></div> <div style="width: 20px;height: 10px;"></div>
<GuipInput :defaultValue="defaultValue" @clear="handleClear" width="400px"> <GuipInput v-model="form.input3" width="400px">
<span slot="prependshow">http:</span> <span slot="prependshow">http:</span>
<img slot="prefix" src="../assets/radio_checked.svg" alt=""> <!-- <img slot="prefix" src="../assets/radio_checked.svg" alt=""> -->
<!-- 输入框后面小图标 -事件自定义 --> <!-- 输入框后面小图标 -事件自定义 -->
<i slot="suffix" class="el-icon-close" @click="handleClear"></i> <i slot="suffix" class="el-icon-close" @click="handleClear"></i>
<!-- <img slot="suffix" src="../assets/radio_nochecked.svg" alt="" @click="handleClear"> --> <!-- <img slot="suffix" src="../assets/radio_nochecked.svg" alt="" @click="handleClear"> -->
@ -283,42 +263,15 @@
<div style="width: 800px;height: 150px;"> <div style="width: 800px;height: 150px;">
<h3>表单上下布局 (宽度 510 388 用的最多 已有这2种宽度类名设置)</h3> <h3>表单上下布局 (宽度 510 388 用的最多 已有这2种宽度类名设置)</h3>
<GuipInput ref="GuipInput" column="column" addClass="w510" label="age" desc="这是是右侧文案" v-model="form.age" <GuipInput ref="GuipInput" column="column" addClass="w510" label="age" desc="这是是右侧文案"
prop="age" placeholder="这是自定义默认提示语" /> v-model="form.age" prop="age" placeholder="这是自定义默认提示语" />
</div> </div>
<div class="ele-item"> <div class="ele-item">
<label for="">开关L</label> <label for="">开关L</label>
<GuipSwitch v-model="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange"> <GuipSwitch :modelValue="switchValue" activeText="开启" inactiveText="关闭" @change="onSwitchChange">
</GuipSwitch> </GuipSwitch>
</div> </div>
<el-table
:data="tableData3"
:span-method="objectSpanMethod"
:border="true"
style="width: 100%; margin-top: 20px">
<el-table-column
prop="id"
label="ID"
width="180">
</el-table-column>
<el-table-column
prop="name"
label="姓名">
</el-table-column>
<el-table-column
prop="amount1"
label="数值 1(元)">
</el-table-column>
<el-table-column
prop="amount2"
label="数值 2(元)">
</el-table-column>
<el-table-column
prop="amount3"
label="数值 3(元)">
</el-table-column>
</el-table>
<el-button type="primary" @click="submitForm">Submit</el-button> <el-button type="primary" @click="submitForm">Submit</el-button>
</el-form> </el-form>
@ -376,14 +329,15 @@
</div> </div>
<GuipDialog :dialogVisible="dialogVisible" title="自定义标题" :show-close-button="false" <GuipDialog :dialogVisible="dialogVisible" title="自定义标题" :show-close-button="false"
:show-cancel-button="showCancelButton" @confirm="handleConfirm" @cancel="handleCancel" @close="handleClose" :show-cancel-button="showCancelButton" @confirm="handleConfirm" @cancel="handleCancel"
@dialogVisibleChange="dialogVisibleChange"> @close="handleClose" @dialogVisibleChange="dialogVisibleChange">
<!-- 自定义内容 --> <!-- 自定义内容 -->
<div> <div>
<p>这是一个自定义内容的弹框</p> <p>这是一个自定义内容的弹框</p>
</div> </div>
</GuipDialog> </GuipDialog>
</div> </div>
</div>
</template> </template>
<script> <script>
@ -467,6 +421,9 @@ export default {
form: { form: {
username: '', username: '',
language: '', language: '',
input1: '',
input2: '',
input3: '',
}, },
languageOptions: [ languageOptions: [
{ label: 'JavaScript', value: 'js', selectedLabel: 'JavaScripthhhhhhhhhh' }, { label: 'JavaScript', value: 'js', selectedLabel: 'JavaScripthhhhhhhhhh' },
@ -561,6 +518,44 @@ export default {
name: '王小虎', name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄' address: '上海市普陀区金沙江路 1518 弄'
}], }],
tableData4: [{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
price: '20',
age: 20,
//
edit_name: '王小虎', edit_address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-02',
name: '王小虎11',
address: '上海市普陀区金沙江路 151811 弄',
price: '10',
age: 30,
edit_name: '王小虎11', edit_address: '上海市普陀区金沙江路 151811 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄',
price: '200',
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-08',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-06',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-07',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}],
// //
columns: [ columns: [
{ prop: 'name', label: '姓名(带气泡)', popover: true }, // { prop: 'name', label: '姓名(带气泡)', popover: true }, //
@ -632,8 +627,9 @@ export default {
borderRadius: '4px', borderRadius: '4px',
}, },
styleObject: { styleObject: {
width: '200px', minWidth: '200px',
height: '40px' maxWidth: '400px',
// height: '40px'
}, },
styleObject1: { styleObject1: {
width: '600px', width: '600px',
@ -679,6 +675,9 @@ export default {
}, },
methods: { methods: {
changeInputtest(e) {
console.log(e, '---000changeInputtest');
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) { arraySpanMethod({ row, column, rowIndex, columnIndex }) {
console.log(row, column); console.log(row, column);
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {
@ -827,8 +826,8 @@ export default {
onConfirm(row, prop) { onConfirm(row, prop) {
console.log('确认修改:', row, prop); console.log('确认修改:', row, prop);
this.$message.success('修改成功'); this.$message.success('修改成功');
this.$set(this.tableData, row) this.$set(this.tableData4, row)
console.log(this.tableData, 'this.tableData====='); console.log(this.tableData4, 'this.tableData=====');
}, },
// //
onCancel(row, prop) { onCancel(row, prop) {
@ -875,7 +874,7 @@ export default {
console.log(value, 'value===输入框输入得知'); console.log(value, 'value===输入框输入得知');
}, },
handleClear(value) { handleClear(value) {
this.defaultValue = '这是我清除后给的文案' this.form.input3 = '这是我清除后给的文案'
// this.handleInput('') // this.handleInput('')
console.log(value, 'value===qinghcu'); console.log(value, 'value===qinghcu');
}, },

Loading…
Cancel
Save