You need to sign in or sign up before continuing.
...
 
Commits (7)
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_URL = "https://tj.sjzxyy.com/zasc/gastric-api"
VUE_APP_WSURL = "wss://ds.cixincloud.com/songjiang-socket/websocket/"
VUE_APP_IMGURL = "./"
\ No newline at end of file
.DS_Store
node_modules
dist
/cssc-mobile
# local env files
......
......@@ -18,7 +18,7 @@
<META HTTP-EQUIV="expires" CONTENT="0">
<!-- 标签图标 -->
<!-- <link type="favicon" rel="shortcut icon" href="./static/favicon.ico" /> -->
<title>视频诊断</title>
<title>随访反馈</title>
<script src="https://gosspublic.alicdn.com/aliyun-oss-sdk-4.4.4.min.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
......
......@@ -7,29 +7,26 @@ 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);
},
getPeopleList: (data) => {
return post(`${ewellDefectData}/report/hospital`, data);
},
getVideoList: (data) => {
// login: (data) => {
// return post(`${v1}/user/login`, data);
// },
getFeedback: (data) => {
return get(
`${ewellDefectData}/app/report/video/mine?pageNum=${data.pageNum}&pageSize=${data.pageSize}&dataId=${data.dataId}`,
data
);
`${ewellDefectData}/chat/feedback/Status?dataId=${data}`
// datachat/feedback/Status?dataId=
)
},
fileUpload: (data) => {
return post(`${ewellDefectData}/app/report/video/chunk`, data);
},
fileMerge: (data) => {
return post(`${ewellDefectData}/app/report/video/merge`, data);
putFeedback: (data) => {
return put(
`${ewellDefectData}/chat/feedback/followUp`,
data
)
}
};
}
......@@ -15,7 +15,7 @@ let CommonAlert = function (msg) {
// 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;
}
......@@ -52,7 +52,7 @@ axios.interceptors.response.use(
CommonAlert(response.data.message);
} else if (response.data.code === -100) {
localStorage.removeItem("vd_token");
window.location.hash = "/login";
// window.location.hash = "/login";
}
return response;
},
......@@ -65,7 +65,7 @@ axios.interceptors.response.use(
break;
case 401:
CommonAlert("未授权,请重新登录");
toLogin();
// toLogin();
console.log("未授权,请重新登录");
break;
case 403:
......
<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 = {
dataId: this.dataId,
feedbackContent:
this.selected != 5
? this.radioList[this.selected - 1].label
: this.value,
feedbackType: this.selected
}
this.$API.putFeedback(data).then((res) => {
if (res.code == 1) {
this.show = true
}
})
},
getData() {
this.$API.getFeedback(this.dataId).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>
<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
......@@ -5,7 +5,7 @@ Vue.use(Router);
const page = [
{
path: "/",
redirect: "/login" //调试
redirect: "/feedback" //调试
},
{
path: "/login",
......@@ -14,22 +14,10 @@ const page = [
component: () => import("@/pages/login")
},
{
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: `/feedback/:dataId`,
meta: { index: 2, keepAlive: false },
name: "feedback",
component: () => import("@/pages/feedback")
}
];
......
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,21 @@ 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://localhost:8201/',
// target: 'http://192.168.3.221/8201/',
changeOrigin: true,
pathRewrite: {
"^/api": ""
}
}
}
}
};
}