...
 
Commits (14)
NODE_ENV = 'development'
VUE_APP_URL = 'https://zcas.wzswsj.gov.cn:8079/screening-api/'
VUE_APP_IMG = 'https://inno.sh-sict.com/gastric/'
# VUE_APP_URL = 'https://zcas.wzswsj.gov.cn:8079/screening-api/'
# VUE_APP_IMG = 'https://inno.sh-sict.com/gastric/'
NODE_ENV = 'production'
VUE_APP_URL = 'https://inno.sh-sict.com/gastric-api/'
VUE_APP_IMG = 'https://inno.sh-sict.com/wjy-mobile/'
\ No newline at end of file
VUE_APP_BASE_API = '/wrm-api/'
VUE_APP_URL = '/wrm-api/'
\ No newline at end of file
.DS_Store
node_modules
dist
/cssc-mobile
# local env files
......
......@@ -18,8 +18,8 @@
<META HTTP-EQUIV="expires" CONTENT="0">
<!-- 标签图标 -->
<!-- <link type="favicon" rel="shortcut icon" href="./static/favicon.ico" /> -->
<title>视频诊断</title>
<script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script>
<title>随访反馈</title>
<!-- <script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script> -->
<script type="text/javascript">
var _hmt = _hmt || [];
</script>
......@@ -28,5 +28,5 @@
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<script src="https://hm.baidu.com/hm.js?08c72ecbd029d05f93ebb4a14a36dccf6" async></script>
<!-- <script src="https://hm.baidu.com/hm.js?08c72ecbd029d05f93ebb4a14a36dccf6" async></script> -->
</html>
......@@ -7,29 +7,43 @@ import {
expoertExcel,
getExcel,
downloadExcel
} from "../request/http.js";
import { prototype } from "events";
const v1 = `/gastric-cancer${process.env.VUE_APP_MOD || ""}-user`;
const ewellDefectData = `/gastric-cancer${process.env.VUE_APP_MOD || ""}-data`;
const im = `/gastric-cancer${process.env.VUE_APP_MOD || ""}-im`;
} from "../request/http.js"
import { prototype } from "events"
const v1 = `/gastric-cancer${process.env.VUE_APP_MOD || ""}-user`
const ewellDefectData = `/gastric-cancer${process.env.VUE_APP_MOD || ""}-data`
const im = `/gastric-cancer${process.env.VUE_APP_MOD || ""}-im`
export const API = {
//登录
login: (data) => {
return post(`${v1}/user/login`, data);
// login: (data) => {
// return post(`${v1}/user/login`, data);
// },
getFeedback: (data) => {
return get(`/disease-data/follow-up/feedback`, data)
},
putFeedback: (data) => {
return post(`/disease-data/follow-up/feedback`, data)
},
getPeopleList: (data) => {
return post(`${ewellDefectData}/report/hospital`, data);
////////////
// 获取问卷调查
getQuestionnaireList: (data) => {
return get(`/disease-data/questionnaire/list`, data)
},
getVideoList: (data) => {
return get(
`${ewellDefectData}/app/report/video/mine?pageNum=${data.pageNum}&pageSize=${data.pageSize}&dataId=${data.dataId}`,
data
);
// 获取问卷记录
getQuestionnaireRecords: (data) => {
return get(`/disease-data/questionnaire/records`, data)
},
fileUpload: (data) => {
return post(`${ewellDefectData}/app/report/video/chunk`, data);
// 获取用户信息
getPatientInfo: (data) => {
return get(`/disease-data/patient/info`, data)
},
fileMerge: (data) => {
return post(`${ewellDefectData}/app/report/video/merge`, data);
// 提交问卷
setQuestionnaire: (data) => {
return post(`/disease-data/questionnaire`, data)
},
login: (data) => {
return get(`/cloud-auth/oauth/token?grant_type=client_credentials`, data)
}
};
}
import axios from "axios";
import router from "../../router";
import qs from "qs";
import axios from "axios"
import router from "../../router"
import qs from "qs"
// import { Message as iviewMessage, Notice as iviewNotice } from 'view-design'
import { MessageBox, Toast } from "mint-ui";
import { MessageBox, Toast } from "mint-ui"
//接口报错弹出
let CommonAlert = function (msg) {
if (msg.length > 0) {
if (msg && msg.length > 0) {
return Toast({
message: msg,
duration: 1500
});
})
}
};
}
// axios.defaults.timeout = 5000;
if (process.env.NODE_ENV == "development") {
axios.defaults.baseURL = "https://inno.sh-sict.com/gastric-api/";
axios.defaults.baseURL = "/api"
} else {
axios.defaults.baseURL = process.env.VUE_APP_URL;
axios.defaults.baseURL = process.env.VUE_APP_URL
}
window.baseURL = axios.defaults.baseURL;
window.baseURL = axios.defaults.baseURL
//http request 拦截器
axios.create({
withCredentials: true
});
})
axios.interceptors.request.use(
(config) => {
config.data = config.data;
config.headers["user-cookie"] = localStorage.getItem("vd_token");
return config;
config.data = config.data
config.headers["user-cookie"] = localStorage.getItem("vd_token")
if (config.url.includes("oauth/token")) {
config.headers["Authorization"] = `Bearer YXBwOmNsb3VkX2FwcA==`
}
return config
},
(error) => {
return Promise.reject(err);
return Promise.reject(err)
}
);
)
/**
* 跳转登录页
......@@ -42,83 +45,83 @@ axios.interceptors.request.use(
const toLogin = () => {
router.replace({
path: "/login"
});
};
})
}
//响应拦截器即异常处理
axios.interceptors.response.use(
(response) => {
if (response.data.code === 0 || response.data.code === -1) {
CommonAlert(response.data.message);
CommonAlert(response.data.message || response.data.msg)
} else if (response.data.code === -100) {
localStorage.removeItem("vd_token");
window.location.hash = "/login";
localStorage.removeItem("vd_token")
// window.location.hash = "/login";
}
return response;
return response
},
(err) => {
if (err && err.response) {
switch (err.response.status) {
case 400:
CommonAlert("错误请求");
console.log("错误请求");
break;
CommonAlert("错误请求")
console.log("错误请求")
break
case 401:
CommonAlert("未授权,请重新登录");
toLogin();
console.log("未授权,请重新登录");
break;
CommonAlert("未授权,请重新登录")
// toLogin();
console.log("未授权,请重新登录")
break
case 403:
CommonAlert("拒绝访问");
console.log("拒绝访问");
break;
CommonAlert("拒绝访问")
console.log("拒绝访问")
break
case 404:
CommonAlert("请求错误,未找到该资源");
console.log("请求错误,未找到该资源");
break;
CommonAlert("请求错误,未找到该资源")
console.log("请求错误,未找到该资源")
break
case 405:
CommonAlert("请求方法未允许");
console.log("请求方法未允许");
break;
CommonAlert("请求方法未允许")
console.log("请求方法未允许")
break
case 408:
CommonAlert("请求超时");
console.log("请求超时");
break;
CommonAlert("请求超时")
console.log("请求超时")
break
case 500:
CommonAlert("服务器端出错");
console.log("服务器端出错");
break;
CommonAlert("服务器端出错")
console.log("服务器端出错")
break
case 501:
CommonAlert("网络未实现");
console.log("网络未实现");
break;
CommonAlert("网络未实现")
console.log("网络未实现")
break
case 502:
CommonAlert("网络错误");
console.log("网络错误");
break;
CommonAlert("网络错误")
console.log("网络错误")
break
case 503:
CommonAlert("服务不可用");
console.log("服务不可用");
break;
CommonAlert("服务不可用")
console.log("服务不可用")
break
case 504:
CommonAlert("网络超时");
console.log("网络超时");
break;
CommonAlert("网络超时")
console.log("网络超时")
break
case 505:
CommonAlert("http版本不支持该请求");
console.log("http版本不支持该请求");
break;
CommonAlert("http版本不支持该请求")
console.log("http版本不支持该请求")
break
default:
CommonAlert(`连接错误${err.response.status}`);
console.log(`连接错误${err.response.status}`);
CommonAlert(`连接错误${err.response.status}`)
console.log(`连接错误${err.response.status}`)
}
} else {
CommonAlert("连接到服务器失败");
console.log("连接到服务器失败");
CommonAlert("连接到服务器失败")
console.log("连接到服务器失败")
}
return Promise.resolve(err.response);
return Promise.resolve(err.response)
}
);
)
/**
* 封装get方法
......@@ -126,17 +129,27 @@ axios.interceptors.response.use(
* @param data
* @returns {Promise}
*/
export function get(url, data = {}) {
export function get(url, params = {}) {
return new Promise((resolve, reject) => {
axios.get(url, data).then(
(response) => {
resolve(response.data);
},
(err) => {
reject(err);
}
);
});
axios
.get(url, { params })
.then(
(response) => {
resolve(response.data)
},
(err) => {
reject(err)
}
)
.catch(
(response) => {
resolve(response.data)
},
(err) => {
reject(err)
}
)
})
}
/**
......@@ -154,13 +167,21 @@ export function post(url, data = {}, params = {}) {
})
.then(
(response) => {
resolve(response.data);
resolve(response.data)
},
(err) => {
reject(err);
reject(err)
}
);
});
)
.catch(
(response) => {
resolve(response.data)
},
(err) => {
reject(err)
}
)
})
}
export function postForm(url, data = {}) {
return new Promise((resolve, reject) => {
......@@ -172,13 +193,13 @@ export function postForm(url, data = {}) {
})
.then(
(response) => {
resolve(response.data);
resolve(response.data)
},
(err) => {
reject(err);
reject(err)
}
);
});
)
})
}
//用来导出excel
......@@ -193,13 +214,13 @@ export function expoertExcel(url, data = {}) {
})
.then(
(response) => {
resolve(response.data);
resolve(response.data)
},
(err) => {
reject(err);
reject(err)
}
);
});
)
})
}
//下载excel
......@@ -215,20 +236,20 @@ export function downloadExcel(url, data = {}, title = "筛查信息导出表") {
//兼容ie
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
});
window.navigator.msSaveOrOpenBlob(blob, `${title}.xlsx`);
return;
})
window.navigator.msSaveOrOpenBlob(blob, `${title}.xlsx`)
return
} else {
const link = document.createElement("a");
const link = document.createElement("a")
let blob = new Blob([res.data], {
type: "application/vnd.ms-excel"
});
link.style.display = "none";
link.href = URL.createObjectURL(blob);
link.setAttribute("download", `${title}.xlsx`);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
})
link.style.display = "none"
link.href = URL.createObjectURL(blob)
link.setAttribute("download", `${title}.xlsx`)
document.body.appendChild(link)
link.click()
document.body.removeChild(link)
}
})
.catch((error) => {
......@@ -236,9 +257,9 @@ export function downloadExcel(url, data = {}, title = "筛查信息导出表") {
// title: '错误',
// desc: '系统数据错误',
// })
CommonAlert("系统数据错误");
console.log(error);
});
CommonAlert("系统数据错误")
console.log(error)
})
}
/**
* 封装delete请求
......@@ -251,13 +272,13 @@ export function Delete(url, data = {}) {
return new Promise((resolve, reject) => {
axios.delete(url, data).then(
(response) => {
resolve(response.data);
resolve(response.data)
},
(err) => {
reject(err);
reject(err)
}
);
});
)
})
}
/**
......@@ -271,15 +292,15 @@ export function put(url, data = {}) {
return new Promise((resolve, reject) => {
axios.put(url, data).then(
(response) => {
resolve(response.data);
resolve(response.data)
},
(err) => {
reject(err);
reject(err)
}
);
});
)
})
}
export function getUrl() {
return axios.defaults.baseURL;
return axios.defaults.baseURL
}
This diff is collapsed.
<template>
<div class="index-wrap">
<x-header :left-options="{ backText: '', showBack: false }">
松中心随访反馈
</x-header>
<v-content :has-header="true" :has-footer="false">
<div class="content-title" v-if="submitStatus != 2">
<p>尊敬的患者,为更好的为您服务,请填写以下反馈问卷。</p>
<van-radio-group v-model="selected" class="radio-list">
<van-radio
:name="item.value"
v-for="(item, index) in radioList"
:key="index"
class="radio-item"
>{{ item.label }}</van-radio
>
</van-radio-group>
<van-field
v-model="value"
type="textarea"
rows="4"
autosize
placeholder="期待您的其他反馈"
class="text-area-field"
/>
<div style="margin: 16px">
<van-button
round
block
:loading="loading"
:disabled="disabled"
type="info"
class="btn"
native-type="submit"
@click="submit"
>{{ disabled ? "已提交" : "提交" }}</van-button
>
</div>
</div>
<div class="empty" v-else>
<div class="empty-img"></div>
<div class="empty-text">该链接已过期</div>
</div>
</v-content>
<van-dialog
v-model="show"
confirm-button-color="#4C73FF"
confirm-button-text="好的"
>
<div class="dialog-body">
<p>提交成功</p>
<div class="icon">
<van-icon name="checked" />
</div>
<div class="text">您的随访反馈已提交成功</div>
</div>
</van-dialog>
</div>
</template>
<script>
export default {
data() {
return {
show: false,
value: "",
submitStatus: "",
selected: "",
loading: false,
disabled: false,
radioList: [
{ label: "愿意参与持续随访", value: "1" },
{ label: "推迟参与随访", value: "2" },
{ label: "医生告知无需继续复诊", value: "3" },
{ label: "不想继续在松中心治疗", value: "4" },
{ label: "其他", value: "5" }
]
}
},
methods: {
submit() {
if (!this.selected) {
this.$toast.fail({
type: "fail",
forbidClick: true,
message: "请选择反馈内容"
})
return
}
if (this.selected == "5" && this.value == "") {
this.$toast.fail({
type: "fail",
forbidClick: true,
message: "请输入反馈内容"
})
return
}
const data = {
patientId: this.dataId,
content:
this.selected != 5
? this.radioList[this.selected - 1].label
: this.value,
type: this.selected
}
this.$API.putFeedback(data).then((res) => {
if (res.code == 1) {
this.show = true
}
})
},
getData() {
const data = {
patientId: this.dataId
}
this.$API.getFeedback(data).then((res) => {
if (res.code == 1) {
this.submitStatus = res.object.submitStatus
if (this.submitStatus == 1) {
this.selected = res.object.data.feedbackType + ""
this.value =
this.selected == 5 ? res.object.data.feedbackContent : ""
} else {
this.selected = ""
this.value = ""
}
// localStorage.setItem("vd_token", res.result)
// this.$toast.success({
// type: "success",
// forbidClick: true,
// message: "登录成功",
// onClose: () => {
// this.$router.push("/peopleList")
// },
// duration: 1500
// })
}
})
}
},
mounted() {
console.log(this.$route)
this.dataId = this.$route.params.dataId
if (this.dataId) {
this.getData()
}
},
watch: {}
}
</script>
<style lang="scss" scoped>
.content-title {
height: 100%;
padding: 24px;
position: relative;
p {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
letter-spacing: 1px;
color: #333333;
}
.radio-list {
margin-top: 24px;
.radio-item {
margin-bottom: 16px;
}
}
}
::v-deep {
.text-area-field {
// width: 327px;
// min-height: 140px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #d2d2d2;
}
}
.btn {
height: 44px;
border-radius: 22px !important;
position: absolute;
bottom: 24px;
left: 50%;
transform: translateX(-50%);
width: 90%;
}
.empty {
width: 100%;
.empty-img {
margin: 200px auto 0px;
width: 220px;
height: 160px;
background: url("~@/assets/img/guoqi@2x.png") no-repeat 100% 100%;
background-size: cover;
}
.empty-text {
text-align: center;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
color: #666666;
}
}
.dialog-body {
text-align: center;
padding: 20px;
p {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: bold;
color: #000000;
}
.icon {
font-size: 70px;
color: #4c73ff;
}
.text {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
color: #333333;
}
}
</style>
<template>
<!-- 筛查地图 -->
<div class="index-wrap">
<x-header :left-options="{ backText: '', showBack: false }">
人员列表
</x-header>
<v-content
has-header
:has-footer="false"
>
<!-- 列表 -->
<van-list
class="list_content"
ref="scroller"
v-model="loading"
:immediate-check='false'
:finished="finished"
finished-text="没有更多了"
offset="100"
@load="loadMore"
>
<van-cell-group
inset
v-for="(item, index) in peopleList"
:key="index"
>
<van-cell
center
is-link
@click="JumpTo(item.id)"
>
<template #title>
<div class="avater">
<div
class="circle"
:style="{background:item.riskRank=='a'?'#ED4014':item.riskRank=='b'?'#FF9900':'#2DB7F5'}"
>
</div>
{{ item.name }}
</div>
</template>
<template #right-icon>
<div class="right">
<div class="plan_time">
计划随访时间 : {{ item.followUpTime }}
</div>
<div class="module">
模式 : {{ item.diseaseType | vtol }}
</div>
</div>
</template>
<template #label>
<span>
{{ item.patientInfo?item.patientInfo.sex=='a'?'':'':'--' }}
</span>
&nbsp;
<span>
{{ item.patientInfo?item.patientInfo.birthday:'--' }}
</span>
&nbsp;
<span>
{{ item.patientInfo?item.patientInfo.address:'--' }}
</span>
</template>
</van-cell>
</van-cell-group>
</van-list>
</v-content>
</div>
</template>
<script>
export default {
name: 'peopleList',
data () {
return {
pageNum: 1,
pageSize: 10,
totalCount: 0,
peopleList: [],
loading: false,
finished: false,
};
},
methods: {
JumpTo (id) {
this.$router.push(`/videoList?id=${id}`)
},
getList () {
let data = {
pageNum: this.pageNum,
pageSize: this.pageSize
}
this.finished = false;
this.$API.getPeopleList(data).then(res => {
if (res.code == -100) {
sessionStorage.setItem('getList', true)
} else {
sessionStorage.removeItem('getList')
}
this.loading = false
this.totalCount = res.object?.totalCount
this.peopleList = [...this.peopleList, ...res.object.list]
if (this.peopleList.length >= this.totalCount) {
this.finished = true
}
})
},
loadMore () {
this.pageNum++
this.getList()
},
},
activated () {
let getList = sessionStorage.getItem('getList')
if (getList) {
this.peopleList = []
this.getList()
}
const scrollTops = this.$route.meta.scrollTop;
const $content = document.querySelector('.list_content');
if (scrollTops && $content) {
this.$nextTick(() => {
var scrollTop = this.$el.querySelector('.list_content')
scrollTop.scrollTop = scrollTops - 1
})
}
},
beforeRouteLeave (to, from, next) {
const $content = document.querySelector('.list_content'); // 列表的外层容器
const scrollTop = $content ? $content.scrollTop : 0;
from.meta.scrollTop = scrollTop;
next()
},
mounted () {
// console.log('???');
this.peopleList = []
this.getList()
},
watch: {},
filters: {
vtol (v) {
if (v) {
let item = [{
label: "无症状早癌筛查流程",
value: "sj_wzz",
},
{
label: "体检人群胃癌筛查",
value: "sj_tj",
},
{
label: "院内胃癌筛查流程",
value: "sj_nj",
}].filter(e => e.value == v)
if (item.length > 0) {
return item[0].label
} else {
return '--'
}
} else {
return '--'
}
}
},
};
</script>
<style lang="scss" scoped>
.doText {
font-size: 16px;
color: #127bff;
}
.list_content {
height: 100%;
overflow: auto;
padding: 20px 0;
}
.avater {
display: flex;
align-items: center;
margin-bottom: 10px;
.circle {
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 5px;
}
}
::v-deep .van-cell-group {
height: 100px;
margin-bottom: 16px;
.van-cell {
height: 100%;
}
}
.right {
height: 100%;
padding: 9px 0 8px;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: flex-end;
}
.plan_time,
.module {
margin-bottom: 2px;
font-size: 12px;
color: #969799;
}
</style>
<template>
<div>
<x-header :left-options="{ backText: '', showBack: false }">
调查表
</x-header>
<v-content :has-header="true" :has-footer="true">
<v-form
:form-data="forms"
:formEdit="formEdit"
:isPart="true"
@handleConfirm="submit"
ref="form"
:loading="btnLoading"
></v-form>
</v-content>
</div>
</template>
<script>
import VForm from "@/components/FormComponents"
export default {
name: "questionnaire",
components: { VForm },
data() {
return {
forms: [
{
// type: "input",
// label: "身高(厘米)",
// dot: "48",
// prop: "height",
// unit: "cm",
// isp: true,
// inputType: "number",
}
],
formEdit: {},
btnLoading: false
}
},
methods: {
// login() {
// this.$API.login().then((res) => {
// console.log(res)
// })
// },
getPatientInfo() {
// let data = 'NfQ4zQ+wWuvnPfQQgL6wHMQb5XGNtIbxXUiYHs5NmhnI7tSHpQob3FCUx59D/nPWbmKlW7pp5d00I/P9L0q9skLoGpXaf10EAwXJjyT8JFWwu5FFapdBHsjV0KLq+erWns7g70e4wYH2eTxQHpMwxj7+GOuPL5LtPR0x2RLJDyY='
// data = data.replaceAll("+", "%2B")
let params = {
// data: data
data: this.$route.query.data
}
this.$API
.getPatientInfo(params)
.then((res) => {
if (res.code == 1) {
this.baseInfo = {
...res.data
}
this.getQuestionList()
this.getQuestionnaireRecords()
}
})
.catch(() => {
this.baseInfo = {}
})
},
getQuestionList() {
this.$API.getQuestionnaireList().then((res) => {
if (res.code == 1) {
this.forms = [...res.data]
// this.forms.map((e) => {
// e.rules = [{ required: true, trigger: "blur", message: "该项必传" }]
// })
this.forms.push({
type: "button",
buttonType: "info",
size: "large",
buttonMargin: "10px",
borderRadius: "50px",
buttonWidth: "95%",
buttonText: "保存",
nativeType: "submit"
})
}
})
},
getQuestionnaireRecords() {
this.$API
.getQuestionnaireRecords({
patientId: this.baseInfo.id
})
.then((res) => {
if (res.code == 1) {
if (res.data) {
this.records = res.data.map((e) => e.records)
this.formEdit = { ...this.records[0] }
}
}
})
},
submit() {
this.btnLoading = true
let form = this.$refs.form.form
const data = {
params: form,
patientId: this.baseInfo.id
}
this.$API
.setQuestionnaire(data)
.then((res) => {
this.btnLoading = false
if (res.code == 1) {
this.$toast.success({
type: "success",
forbidClick: true,
message: "提交成功",
onClose: () => {
// this.$router.push("/peopleList")
},
duration: 1500
})
}
})
.catch((error) => {
console.log(error)
this.btnLoading = false
})
}
},
created() {
// this.login()
if (this.$route.query.data) {
this.getPatientInfo()
}
},
mounted() {},
watch: {}
}
</script>
<style lang="scss" scoped></style>
<template>
<div>
<van-loading
v-if="uploadLoading"
type="spinner"
class="loading_box"
vertical
text-color="#fff"
text-size='16'
>
上传中,请勿退出...
</van-loading>
<x-header :left-options="{backText: '',showBack:true}">
内镜视频
<div
class="uploadBtn"
slot="right"
>
<van-uploader
:after-read="afterRead"
:max-count='1'
accept='video/*'
>
<van-button type="text">上传文件</van-button>
</van-uploader>
</div>
</x-header>
<!-- 列表 -->
<v-content
has-header
:has-footer="false"
>
<van-list
:immediate-check='false'
class="list_content"
ref="scroller"
v-model="loading"
:finished="finished"
finished-text="没有更多了"
:offset="100"
@load="onLoad"
>
<van-row
type="flex"
justify="space-between"
>
<van-col
v-for="(item,index) in videoList"
:key="index"
class="col"
>
<!-- 图片 -->
<div class="img_box">
<van-image
id="video"
:src="'https://inno.sh-sict.com/gastric/gastric-resources/' + item.coverUrl"
/>
<div class="start_icon">
<van-icon
name="play-circle-o"
size="50"
color='#e6e6e6'
@click="showVideo(item.videoName)"
/>
</div>
</div>
<div
class="van-ellipsis"
style="font-size:12px;"
>
{{item.videoName}}
</div>
<div class="label van-ellipsis">
{{item.createTime}}
</div>
<div class="label van-ellipsis">
<a>诊断详情</a>
<a
style="color:#127BFF;"
@click="showPop(item)"
>点击查看</a>
</div>
</van-col>
</van-row>
</van-list>
</v-content>
<van-popup
v-model="show"
position="bottom"
round
:style="{ height: '40%' }"
>
<div class="pop_content">
<div class="item">
<div class="label">
诊断日期:
</div>
<div class="value">
{{ describe.diagnosisTime || '--' }}
</div>
</div>
<div class="item">
<div class="label">
诊断所见:
</div>
<div class="value">
{{ describe.finding || '--' }}
</div>
</div>
<div class="item">
<div class="label">
诊断结果:
</div>
<div class="value">
{{ describe.diagnosis || '--' }}
</div>
</div>
</div>
</van-popup>
</div>
</template>
<script>
// 引入
import { uploadByPieces } from '../utils/upload'
export default {
name: 'videoList',
data () {
return {
show: false,
describe: {},//诊断详情
videoList: [],
loading: false,
finished: false,
pageNum: 1,
pageSize: 10,
totalCount: 0,
uploadLoading: false
}
},
methods: {
onLoad () {
if (!this.finished) {
this.pageNum++
this.getVideoList()
}
},
getVideoList () {
let data = {
pageNum: this.pageNum,
pageSize: this.pageSize,
dataId: this.$route.query.id
}
this.$API.getVideoList(data).then(res => {
this.loading = false
if (res.code == 1) {
this.totalCount = res.object.totalCount
this.videoList = [...this.videoList, ...res.object.list]
}
if (this.videoList.length >= this.totalCount) {
this.finished = true
}
})
},
showPop (data) {
this.show = true
this.describe = data
},
showVideo (url) {
var isIphone = navigator.userAgent.indexOf('iPhone') >= 0;
// if (isIphone) {
// window.open('https://inno.sh-sict.com/gastric-api/gastric-cancer-data/file/show?videoName=' + url, '_self')
// } else {
this.$router.push(`/videoShow?src=${url}`)
// }
},
afterRead (file) {
this.uploadLoading = true
// console.log(file);
let dataId = this.$route.query.id
let randomNum = dataId + '' + Math.round(Math.random() * 10000)
uploadByPieces({
randoms: randomNum, // 随机数,这里作为给后端处理分片的标识 根据项目看情况 是否要加
file: file.file, // 视频实体
pieceSize: 10, // 分片大小
dataId: dataId,
success: data => {
console.log('分片上传视频成功', data)
// 合并
this.$API.fileMerge({
dataId: dataId,
videoName: data.videoName,
id: randomNum
}).then(res => {
this.uploadLoading = false
this.pageNum = 1
this.videoList = []
this.getVideoList()
})
},
error: e => {
console.log('分片上传视频失败', e)
this.uploadLoading = false
}
})
},
},
mounted () {
this.videoList = []
this.getVideoList()
},
activated () {
const scrollTop = this.$route.meta.scrollTop;
const $content = document.querySelector('.list_content');
if (scrollTop && $content) {
this.$nextTick(() => {
console.log(scrollTop);
document.querySelector('.list_content').scrollTop = scrollTop;
})
}
},
beforeRouteLeave (to, from, next) {
if (to.path != '/videoShow') {
from.meta.keepAlive = false
} else
if (to.path == '/videoShow') {
from.meta.keepAlive = true
const $content = document.querySelector('.list_content'); // 列表的外层容器
const scrollTop = $content ? $content.scrollTop : 0;
from.meta.scrollTop = scrollTop;
}
next()
}
}
</script>
<style lang="scss" scoped>
.content {
background: rgb(246, 246, 246);
}
.list_content {
padding: 14px 14px;
height: 100%;
overflow: auto;
.col {
width: 48%;
padding: 10px;
background: #fff;
margin-bottom: 10px;
.label {
display: flex;
justify-content: space-between;
font-size: 12px;
}
}
}
#video {
width: 100%;
height: 150px;
img {
display: block;
margin: 0;
padding: 0;
}
}
.uploadBtn {
transform: translateY(-16px) translatex(12px);
color: #fff;
}
.img_box {
position: relative;
.start_icon {
height: 150px;
position: absolute;
left: 0;
top: 0;
width: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
justify-content: center;
align-items: center;
}
}
.pop_content {
padding: 20px;
.item {
display: flex;
margin-bottom: 10px;
.label {
color: #127bff;
}
.value {
color: #444;
}
}
}
.loading_box {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
z-index: 10000;
background: rgba(0, 0, 0, 0.5);
color: #fff;
}
</style>
\ No newline at end of file
<template>
<div class="video_box">
<div class="top">
<van-icon
name="cross"
class="closeIcon"
@click="closeVideo"
/>
</div>
<div class="video">
<!-- <video
id="video"
controls
preload="auto"
loop="loop"
x5-video-player-fullscreen="true"
x5-video-orientation="portraint"
playsinline="true"
x5-video-player-type="h5"
style="object-fit:fill"
>
<source :src="src">
</video> -->
<video
ref="videoPlayer"
class="video-js"
id="videoplayer"
playsinline="true"
preload="none"
x5-video-player-type="h5"
x-webkit-airplay="true"
webkit-playsinline="true"
>
</video>
</div>
</div>
</template>
<script>
import videojs from 'video.js';
export default {
data () {
return {
player: null,
}
},
computed: {
src () {
return 'https://inno.sh-sict.com/gastric-api/gastric-cancer-data/file/show?videoName=' + this.$route.query.src
}
},
methods: {
// 实例化播放器
createVideo () {
let options = {
width: this.width,
autoplay: false,
controls: true,
sources: [
{
src: this.src,
type: "video/mp4",
},
{
src: this.src,
type: "video/ogg",
},
{
src: this.src,
type: "video/webm",
}
]
}
this.player = videojs('videoplayer', options, function onPlayerReady () {
console.log('onPlayerReady', this);
})
},
closeVideo () {
this.$router.go(-1)
}
},
mounted () {
videojs.addLanguage('zh-CN', {
"You aborted the media playback": "视频播放被终止",
"A network error caused the media download to fail part-way.": "网络错误导致视频下载中途失败。",
"The media could not be loaded, either because the server or network failed or because the format is not supported.": "视频因格式不支持或者服务器或网络的问题无法加载。请尝试使用uc浏览器或qq浏览器。",
"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.": "由于视频文件损坏或是该视频使用了你的浏览器不支持的功能,播放终止。",
"No compatible source was found for this media.": "无法找到此视频兼容的源。",
});
this.$nextTick(() => {
setTimeout(() => {
this.createVideo()
})
})
this.$once('hook:beforeDestroy', () => {
this.player.dispose();
})
},
}
</script>
<style lang="scss" scoped>
.video_box {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
position: relative;
.top {
height: 40px;
background: #000;
text-align: right;
color: #fff;
font-size: 20px;
padding: 5px 10px 0 0;
}
.video {
flex: 1;
}
}
#videoplayer {
width: 100%;
height: 100%;
}
::v-deep .video-js .vjs-big-play-button {
font-size: 0.5rem;
width: 1.5rem;
height: 0.8rem;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
}
</style>
\ No newline at end of file
import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);
import Vue from "vue"
import Router from "vue-router"
Vue.use(Router)
//登录 注册 激活
const page = [
{
path: "/",
redirect: "/login" //调试
redirect: "/questionnaire" //调试
},
// {
// path: "/login",
// meta: { index: 1, keepAlive: false },
// name: "login",
// component: () => import("@/pages/login")
// },
{
path: "/login",
meta: { index: 1, keepAlive: false },
name: "login",
component: () => import("@/pages/login")
path: `/feedback/:dataId`,
meta: { index: 2, keepAlive: false },
name: "feedback",
component: () => import("@/pages/feedback")
},
{
path: "/peopleList",
meta: { index: 2, keepAlive: true, scrollTop: 0 },
name: "peopleList",
component: () => import("@/pages/peopleList")
},
{
path: "/videoList",
meta: { index: 3, keepAlive: true, scrollTop: 0 },
name: "videoList",
component: () => import("@/pages/videoList")
},
{
path: "/videoShow",
meta: { index: 3, keepAlive: false },
name: "videoShow",
component: () => import("@/pages/videoShow")
path: `/questionnaire`,
meta: { index: 2, keepAlive: false },
name: "questionnaire",
component: () => import("@/pages/questionnaire")
}
];
]
const router = new Router({
// scrollBehavior: () => ({
// y: 0
// }),
routes: [...page]
});
})
router.beforeEach((to, from, next) => {
if (from.meta.keepAlive) {
const $wrapper = document.querySelector(".list_content"); // 列表的外层容器 注意找到滚动的盒子
const scrollTop = $wrapper ? $wrapper.scrollTop : 0;
// console.log("scrollTop=", scrollTop);
from.meta.scrollTop = scrollTop;
}
next();
});
next()
})
// 解决编程式路由往同一地址跳转时会报错的情况
const originalPush = Router.prototype.push;
const originalReplace = Router.prototype.replace;
const originalPush = Router.prototype.push
const originalReplace = Router.prototype.replace
// push
Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject)
return originalPush.call(this, location, onResolve, onReject);
return originalPush.call(this, location).catch((err) => err);
};
return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch((err) => err)
}
//replace
Router.prototype.replace = function push(location, onResolve, onReject) {
if (onResolve || onReject)
return originalReplace.call(this, location, onResolve, onReject);
return originalReplace.call(this, location).catch((err) => err);
};
export default router;
return originalReplace.call(this, location, onResolve, onReject)
return originalReplace.call(this, location).catch((err) => err)
}
export default router
const path = require("path");
const path = require("path")
module.exports = {
publicPath: "",
......@@ -7,10 +7,10 @@ module.exports = {
configureWebpack: (config) => {
require("@vux/loader").merge(config, {
plugins: ["vux-ui"]
});
})
},
chainWebpack: (config) => {
config.resolve.alias.set("@", path.join(__dirname, "src"));
config.resolve.alias.set("@", path.join(__dirname, "src"))
// config.resolve.alias.set(
// "vue$",
// path.join(__dirname, "vue/dist/vue.esm.js")
......@@ -57,17 +57,22 @@ module.exports = {
}
},
devServer: {
disableHostCheck: true, //内网穿透
host: "0.0.0.0",
port: "8080",
open: true, // 自动拉起浏览器
hot: true, // 热加载
port: 8080,
https: false, // https:{type:Boolean}
open: true,
proxy: {
// change xxx-api/login => mock/login
// detail: https://cli.vuejs.org/config/#devserver-proxy
"/": {
target: "http://10.130.2.64:8201",
changeOrigin: true
"/api": {
// target: "https://ds.cixincloud.com/songjiang-api",
target: "http://192.168.0.200:11999/",
// target: 'http://localhost:8201/',
// target: 'http://192.168.3.221/8201/',
changeOrigin: true,
pathRewrite: {
"^/api": ""
}
}
}
}
};
}