|
|
|
@ -2,12 +2,21 @@
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="head">
|
|
|
|
<div class="head">
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-form-item>
|
|
|
|
<div style="display: flex;width: 100%; justify-content: space-between;">
|
|
|
|
<el-input v-model="searchInfo.name" />
|
|
|
|
<div style="display: flex;">
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-input v-model="searchInfo.name" />
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="GetList()">搜索</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-button type="primary" style="margin-left: 10px;" @click="GetList()">搜索</el-button>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-button v-if="!Is_PaiXv" type="success" style="margin-left: 10px;" @click="GetList('all')">开启排序</el-button>
|
|
|
|
|
|
|
|
<el-button v-if="Is_PaiXv" type="warning" style="margin-left: 10px;" @click="SaveOrder()">保存排序</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-table :data="tableData" style="width: 100%;" row-key="id" v-loading="loading">
|
|
|
|
<el-table :data="tableData" style="width: 100%;" row-key="id" v-loading="loading">
|
|
|
|
<el-table-column prop="hospital_name" label="医院" />
|
|
|
|
<el-table-column prop="hospital_name" label="医院" />
|
|
|
|
@ -22,7 +31,18 @@
|
|
|
|
<el-tag v-if="scope.row.sex==2" class="ml-2" type="success">女</el-tag>
|
|
|
|
<el-tag v-if="scope.row.sex==2" class="ml-2" type="success">女</el-tag>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="order" label="排序" />
|
|
|
|
<el-table-column prop="order" label="排序">
|
|
|
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div v-if="!Is_PaiXv">{{scope.row.order}}</div>
|
|
|
|
|
|
|
|
<div v-else>
|
|
|
|
|
|
|
|
<el-button type="primary" plain style="margin-left: 10px;" :disabled="scope.$index==0" @click="OptionUp(scope.$index)"
|
|
|
|
|
|
|
|
:icon="Top" />
|
|
|
|
|
|
|
|
<el-button type="primary" plain style="margin-left: 10px;" :disabled="scope.$index==tableData.length-1" @click="OptionDown(scope.$index)"
|
|
|
|
|
|
|
|
:icon="Bottom" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="sale_count" label="销量(手输)" />
|
|
|
|
<el-table-column prop="sale_count" label="销量(手输)" />
|
|
|
|
<el-table-column prop="updated_at" label="更新时间" />
|
|
|
|
<el-table-column prop="updated_at" label="更新时间" />
|
|
|
|
<el-table-column label="操作" width="100">
|
|
|
|
<el-table-column label="操作" width="100">
|
|
|
|
@ -32,7 +52,7 @@
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="page">
|
|
|
|
<div class="page" v-if="!Is_PaiXv">
|
|
|
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize"
|
|
|
|
<el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize"
|
|
|
|
:page-sizes="[15, 50, 100, 200]" layout="total,sizes, prev, pager, next" :total="total"
|
|
|
|
:page-sizes="[15, 50, 100, 200]" layout="total,sizes, prev, pager, next" :total="total"
|
|
|
|
@size-change="PageSizeChange" @current-change="PageCurrentChange" />
|
|
|
|
@size-change="PageSizeChange" @current-change="PageCurrentChange" />
|
|
|
|
@ -133,10 +153,12 @@
|
|
|
|
ComboSave,
|
|
|
|
ComboSave,
|
|
|
|
ComboTypeGetList,
|
|
|
|
ComboTypeGetList,
|
|
|
|
ComboCrowdGetList,
|
|
|
|
ComboCrowdGetList,
|
|
|
|
CheckUpTypeGetEnableList
|
|
|
|
CheckUpTypeGetEnableList,
|
|
|
|
|
|
|
|
ComboSaveOrder
|
|
|
|
} from '@/api/api.js'
|
|
|
|
} from '@/api/api.js'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
Edit
|
|
|
|
Edit,Top,
|
|
|
|
|
|
|
|
Bottom
|
|
|
|
} from '@element-plus/icons-vue'
|
|
|
|
} from '@element-plus/icons-vue'
|
|
|
|
let loading = ref(false)
|
|
|
|
let loading = ref(false)
|
|
|
|
let tableData = ref([])
|
|
|
|
let tableData = ref([])
|
|
|
|
@ -165,12 +187,17 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let searchInfo = ref({});
|
|
|
|
let searchInfo = ref({});
|
|
|
|
let Info = ref({});
|
|
|
|
let Info = ref({});
|
|
|
|
const GetList = () => {
|
|
|
|
let Is_PaiXv=ref(false);
|
|
|
|
|
|
|
|
const GetList = (type='') => {
|
|
|
|
|
|
|
|
if(type=='all'){
|
|
|
|
|
|
|
|
Is_PaiXv.value=true;
|
|
|
|
|
|
|
|
}
|
|
|
|
loading.value = true
|
|
|
|
loading.value = true
|
|
|
|
ComboGetList({
|
|
|
|
ComboGetList({
|
|
|
|
page: currentPage.value,
|
|
|
|
page: currentPage.value,
|
|
|
|
pageSize: pageSize.value,
|
|
|
|
pageSize: pageSize.value,
|
|
|
|
searchInfo: searchInfo.value
|
|
|
|
searchInfo: searchInfo.value,
|
|
|
|
|
|
|
|
type:type
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
if (res.status) {
|
|
|
|
if (res.status) {
|
|
|
|
@ -305,6 +332,39 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const OptionUp=(index)=>{
|
|
|
|
|
|
|
|
let temp = tableData.value[index-1];
|
|
|
|
|
|
|
|
tableData.value[index-1]=tableData.value[index]
|
|
|
|
|
|
|
|
tableData.value[index]=temp
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const OptionDown=(index)=>{
|
|
|
|
|
|
|
|
let temp = tableData.value[index+1];
|
|
|
|
|
|
|
|
tableData.value[index+1]=tableData.value[index]
|
|
|
|
|
|
|
|
tableData.value[index]=temp
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
//保存排序
|
|
|
|
|
|
|
|
const SaveOrder=()=>{
|
|
|
|
|
|
|
|
let ldate=[];
|
|
|
|
|
|
|
|
tableData.value.forEach((v,i)=>{
|
|
|
|
|
|
|
|
ldate.push({id:v.id,order:i})
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
loading.value = true
|
|
|
|
|
|
|
|
ComboSaveOrder({
|
|
|
|
|
|
|
|
order_list:ldate
|
|
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
|
|
loading.value = false
|
|
|
|
|
|
|
|
if (res.status) {
|
|
|
|
|
|
|
|
Is_PaiXv.value=false;
|
|
|
|
|
|
|
|
ElMessage({
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
message: '排序完成',
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
GetList()
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ElMessage.error(res.msg)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
GetList()
|
|
|
|
GetList()
|
|
|
|
GetCheckUpTypeEnableList_Func()
|
|
|
|
GetCheckUpTypeEnableList_Func()
|
|
|
|
|