项目授权提示信息
parent
e8849ba6a5
commit
c08082190b
|
@ -3567,6 +3567,15 @@ export function getTrialAuthorizationCode(params) {
|
|||
})
|
||||
}
|
||||
|
||||
// 获取项目激活码
|
||||
export function getTrialActivationCode(params) {
|
||||
return request({
|
||||
url: `/Patient/getTrialActivationCode`,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
// 设置项目授权信息
|
||||
export function activateTrial(params) {
|
||||
return request({
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
<span class="copy" @click.stop="copy">{{
|
||||
$t("trials:trials-list:action:copy")
|
||||
}}</span>
|
||||
<span class="copy" style="margin-left: 10px" @click.stop="getCode"
|
||||
>获取</span
|
||||
>
|
||||
</p>
|
||||
</el-form-item>
|
||||
<!-- 激活码 -->
|
||||
|
@ -66,7 +69,11 @@
|
|||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { getTrialAuthorizationCode, activateTrial } from "@/api/trials.js";
|
||||
import {
|
||||
getTrialAuthorizationCode,
|
||||
activateTrial,
|
||||
getTrialActivationCode,
|
||||
} from "@/api/trials.js";
|
||||
export default {
|
||||
name: "activateProject",
|
||||
props: {
|
||||
|
@ -144,7 +151,7 @@ export default {
|
|||
this.$alert(this.$t("trials:researchRecord:message:copyFailed"));
|
||||
});
|
||||
},
|
||||
// 获取激活码
|
||||
// 获取授权码
|
||||
async getTrialAuthorizationCode() {
|
||||
let params = {
|
||||
TrialId: this.data.TrialId,
|
||||
|
@ -158,6 +165,21 @@ export default {
|
|||
console.log(err);
|
||||
}
|
||||
},
|
||||
// 获取激活码
|
||||
async getCode() {
|
||||
let params = {
|
||||
TrialId: this.data.TrialId,
|
||||
AuthorizationCode: this.form.Authorization,
|
||||
};
|
||||
try {
|
||||
let res = await getTrialActivationCode(params);
|
||||
if (res.IsSuccess) {
|
||||
this.form.Activate = res.Result;
|
||||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -104,10 +104,31 @@
|
|||
<el-table-column width="40">
|
||||
<template slot-scope="scope">
|
||||
<i
|
||||
v-if="!scope.row.AuthorizationEncrypt"
|
||||
class="el-icon-warning-outline"
|
||||
:title="$t('trials:trials-list:tipMessage:tipOne')"
|
||||
style="color: red; font-size: 20px"
|
||||
></i>
|
||||
<i
|
||||
v-if="
|
||||
scope.row.AuthorizationEncrypt &&
|
||||
scope.row.AuthorizationDate &&
|
||||
trialExpired(moment(scope.row.AuthorizationDate, 15))
|
||||
"
|
||||
class="el-icon-warning-outline"
|
||||
:title="$t('trials:trials-list:tipMessage:tipTwo')"
|
||||
style="color: #0f0; font-size: 20px"
|
||||
></i>
|
||||
<i
|
||||
v-if="
|
||||
scope.row.AuthorizationEncrypt &&
|
||||
scope.row.AuthorizationDate &&
|
||||
trialExpired(moment(scope.row.AuthorizationDate))
|
||||
"
|
||||
class="el-icon-warning-outline"
|
||||
:title="$t('trials:trials-list:tipMessage:tipThree')"
|
||||
style="color: red; font-size: 20px"
|
||||
></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -442,17 +463,15 @@ export default {
|
|||
return moment(data).format("YYYY-MM-DD");
|
||||
},
|
||||
// 项目过期判断
|
||||
trialExpired(data, isBefore = false) {
|
||||
// 不足15天判断
|
||||
trialExpired(date, isBeforeDate = 0) {
|
||||
if (
|
||||
isBefore &&
|
||||
moment(data).isAfter(
|
||||
moment(visit.VisitMaxStudyTime)
|
||||
.add(15, "day")
|
||||
.format("YYYY-MM-DD HH:mm:ss")
|
||||
moment(date).isBefore(
|
||||
moment().add(isBeforeDate, "day").format("YYYY-MM-DD HH:mm:ss")
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
// 打开激活弹框
|
||||
handleActivate(item) {
|
||||
|
|
Loading…
Reference in New Issue