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