This commit is contained in:
liuxin 2024-04-09 22:04:35 +08:00
commit 76e93d2631
4 changed files with 102 additions and 83 deletions

View File

@ -22,6 +22,13 @@ export function addWorkFlow(data) {
return postData('workflow/addWorkFlow',data);
}
// 项目列表维护查询
export function commonDate(url,data) {
return postData(url,data);
export function commonPost(url,data) {
try {
return postData(url,data);
} catch (error) {
return { code:500, message:'接口连接错误' }
}
}

View File

@ -146,7 +146,7 @@ export default {
this.queryFrom.hospitalName=options.hospitalName
},
async onShow() {
onShow() {
},

71
pages/project/project.css Normal file
View File

@ -0,0 +1,71 @@
.list-view-item{
font-size:1ex;
padding: 1ex;
box-shadow: .8ex .7ex 1ex #22222215;
margin-bottom: 2ex;
margin-left: 4.5vw;
width: 88vw;
height: 16vh;
display: flex;
border-radius: 1ex;
border: 1px solid #5d7bdd4f;
}
.query-view {
position: fixed;
top: 0ex;
width: 100%;
}
.list-view {
margin-top: 2.3ex;
height: 90vh;
overflow-y: auto;
}
.foot-view {
position: fixed;
bottom: 0.2ex;
width: 100%;
}
.span-porject-top{
margin-top: 1.5ex;
}
.span-porject > ul:nth-child(2){
font-size: 2.1ex;
color: #1d1d1d;
}
.span-porject > ul:nth-child(1){
font-size: 1.9ex;
color: #5f5f5f;
}
.span-porject{
margin-bottom: .3ex;
}
.hqs-popup {
padding: 2ex;
}
.from-item {
display: flex;
flex-direction: column;
}
.from-item-input {}
.from-item-label {
font-size: 1.8ex;
text-align: left;
line-height: 4.8ex;
margin-right: 1.8ex;
}
.chaxunx {
display: flex;
}
.query-view .u-picker {
position: fixed;
/* 或者使用 absolute 或 relative根据你的布局需求 */
bottom: 0;
}

View File

@ -30,9 +30,9 @@
<u-search placeholder="请查询" input-align="center" :show-action="false" @focus="onShowPopup"></u-search>
</view>
</view>
<view class="list-view" style="max-height: 90vh;">
<view class="list-view" >
<view
style="font-size:1ex;padding: 1ex;box-shadow: .8ex .7ex 1ex #22222215;margin-left: 4.5vw;width: 88vw;height: 16vh;display: flex;" :key="index"
style="" class="list-view-item" :key="index"
v-for="(item,index) in tableData">
<view style="display: flex;flex-direction: column;flex:4.5">
<span class="span-porject span-porject-top">
@ -107,7 +107,7 @@
</template>
<script>
import { commonDate } from "../../api/api.js"
import { commonPost } from "../../api/api.js"
export default {
data() {
return {
@ -119,24 +119,15 @@ export default {
queryFrom: {projectName:'',createdStartDt:'',createdEndDt:''},
selectShow: false,
showTime: false,
columns: [['全部', '针灸', '拔火罐']],
columns: [],
time: '',
tableData: [{
"sid": 5,
"createdBy": "带头大哥",
"createdDt": "2024-04-06T11:27:11.000+00:00",
"projectName": "针灸1225",
"unitPrice": 1750.00,
"updateBy": "带头大哥",
"updateDt": "2024-04-08 15:06:42",
"createdDtFormatted": "2024-04-06 11:27:11"
}]
tableData: []
}
},
async onShow() {
this.queryFunc()
const res = await commonDate('project/findProjectNameList',{})
const res = await commonPost('project/findProjectNameList',{})
this.columns = res.data
},
@ -162,7 +153,7 @@ export default {
},
async queryFunc() {
this.showPop = false
const res = await commonDate('project/findProjectList',this.queryFrom)
const res = await commonPost('project/findProjectList',this.queryFrom)
// console.log(res)
if(res.code == 200){
this.tableData = res.data
@ -191,7 +182,7 @@ export default {
this.addAndEditShow = true
},
async delItem(item) {
const res = await commonDate('project/delProject',{sid:item.sid})
const res = await commonPost('project/delProject',{sid:item.sid})
if(res.code == 200){
this.queryFunc()
this.$refs.uNotify.show({
@ -203,11 +194,13 @@ export default {
safeAreaInsetTop:false
})
}
this.queryFunc()
}
},
async commitInfo(){
const {projectName,unitPrice,sid} = this.selectRow
console.log(projectName,unitPrice,sid)
console.log(this.selectRow)
if(!projectName){
return
}
@ -215,7 +208,7 @@ export default {
return
}
if(sid){
const res = await commonDate('project/editProject',this.selectRow)
const res = await commonPost('project/editProject',this.selectRow)
if(res.code == 200){
this.addAndEditShow = false
this.$refs.uNotify.show({
@ -228,8 +221,11 @@ export default {
})
this.queryFunc()
}
if(res.code == 500){
console.log(res.message)
}
}else{
const res = await commonDate('project/addProject',this.selectRow)
const res = await commonPost('project/addProject',this.selectRow)
if(res.code == 200){
this.addAndEditShow = false
this.$refs.uNotify.show({
@ -242,6 +238,9 @@ export default {
})
this.queryFunc()
}
if(res.code == 500){
console.log(res.message)
}
}
}
}
@ -249,63 +248,5 @@ export default {
</script>
<style>
.query-view {
position: fixed;
top: 0ex;
width: 100%;
}
.list-view {
margin-top: 2.3ex;
height: 90vh;
overflow-y: auto;
}
.foot-view {
position: fixed;
bottom: 0.2ex;
width: 100%;
}
.span-porject-top{
margin-top: 1.5ex;
}
.span-porject > ul:nth-child(2){
font-size: 2.1ex;
color: #1d1d1d;
}
.span-porject > ul:nth-child(1){
font-size: 1.9ex;
color: #5f5f5f;
}
.span-porject{
margin-bottom: .3ex;
}
.hqs-popup {
padding: 2ex;
}
.from-item {
display: flex;
flex-direction: column;
}
.from-item-input {}
.from-item-label {
font-size: 1.8ex;
text-align: left;
line-height: 4.8ex;
margin-right: 1.8ex;
}
.chaxunx {
display: flex;
}
.query-view .u-picker {
position: fixed;
/* 或者使用 absolute 或 relative根据你的布局需求 */
bottom: 0;
}
@import 'project.css'
</style>