Commit 9b9a45ab authored by 罗超's avatar 罗超

优化工作计划

parent 83e1467f
......@@ -30,7 +30,7 @@
<div v-if="d.w.ExamineStatus==1">
<el-card class="work-content green">
<h4>主管立项审核通过</h4>
<p>{{d.w.ExamineState}} 提交于 {{d.w.ExamineDate}}</p>
<p>{{d.w.ExamineUserName}} 提交于 {{d.w.ExamineDate}}</p>
<div class="cont">{{d.w.ExamineRemark}}</div>
</el-card>
</div>
......@@ -56,15 +56,29 @@
</h4>
<p v-if="d.w">{{d.w.CreateName}} 提交于 {{item.CreateDate}}</p>
<div class="cont">{{item.Content}}</div>
<div class="attach">
附件:<span @click="openFile(item.Attach)" style="cursor: pointer;">{{item.Attach!=="" ? item.Attach : '无'}}</span>
<div class="attach" v-if="item.Attach!==''">
附件:
<span
@click="openFile(item.Attach)"
style="cursor: pointer;"
class="work-file"
>{{item.Attach.substring(item.Attach.lastIndexOf("/")+1,item.Attach.length)}}</span>
</div>
<div class="attach" v-if="item.Linker && item.Linker.length>0">
相关链接
<span
v-for="lik in item.Linker" :key="lik"
@click="openFile(lik)"
style="cursor: pointer;display:block;margin-top:10px;"
class="work-file"
>{{lik}}</span>
</div>
</el-card>
</div>
<div v-if="d.w.FinishExamineStatus==1">
<el-card class="work-content green">
<h4>主管完结审核通过</h4>
<p>{{d.w.FinishExamineState}} 提交于 {{d.w.FinishExamineDate}}</p>
<p>{{d.w.FinishExamineUserName}} 提交于 {{d.w.FinishExamineDate}}</p>
<div class="cont">{{d.w.FinishExamineRemark}}</div>
</el-card>
</div>
......@@ -76,7 +90,10 @@
</el-card>
</div>
</fieldset>
<fieldset v-if="isEaxmine && d.w && (d.w.ExamineStatus==0 || (d.w.Status>=2 && d.w.FinishExamineStatus==0))" style="border: 1px solid #DDD;padding: 13px;font-size: 12px;margin-top:20px;">
<fieldset
v-if="isEaxmine && d.w && (d.w.ExamineStatus==0 || (d.w.Status>=2 && d.w.FinishExamineStatus==0))"
style="border: 1px solid #DDD;padding: 13px;font-size: 12px;margin-top:20px;"
>
<legend style="padding:0 10px; font-size:14px;">审批</legend>
<div style="margin-bottom:10px">
<el-radio v-model="radio" label="1">通过</el-radio>
......@@ -88,35 +105,43 @@
:rows="4"
style="width:100%"
placeholder="请输入审批意见"
v-model="textarea">
</el-input>
v-model="textarea"
></el-input>
</div>
<div slot="footer" class="dialog-footer">
<button
class="normalBtn"
type="primary"
@click="goexamine"
>确认提交</button>
<button class="normalBtn" type="primary" @click="goexamine">确认提交</button>
</div>
</fieldset>
<fieldset v-if="isUpdate && d.w && ((d.w.Status==0 && d.w.ExamineStatus==1) || d.w.Status==1)" style="border: 1px solid #DDD;padding: 13px;font-size: 12px;margin-top:20px;">
<fieldset
v-if="isUpdate && d.w && ((d.w.Status==0 && d.w.ExamineStatus==1) || d.w.Status==1)"
style="border: 1px solid #DDD;padding: 13px;font-size: 12px;margin-top:20px;"
>
<legend style="padding:0 10px; font-size:14px;">提交进度</legend>
<div style="margin-bottom:10px;">
<el-row :gutter="12">
<el-col :span="1"> 当前进度: </el-col>
<el-col :span="4"><el-slider v-model="progree" :min="d.w.Progree" :max="100" :step="1"></el-slider></el-col>
</el-row>
</div>
<div style="margin-bottom:10px">
进度说明:
<el-input
type="textarea"
:rows="4"
style="width:100%"
placeholder="请输入进度说明"
v-model="textarea2">
</el-input>
v-model="textarea2"
></el-input>
</div>
<div style="margin-bottom:10px">
相关链接:
<el-input
type="textarea"
:rows="2"
style="width:100%"
placeholder="请填写相关链接,附件和相关链接必须二选一提交"
v-model="linker"
></el-input>
<span style="font-size:12px;color:#aaa;margin:10px 0;">注意,多个URL请使用换行分割</span>
</div>
<div style="margin-bottom:10px;width: 29%;">
附件上传:
<el-upload
class="upload-demo"
drag
......@@ -126,22 +151,32 @@
:on-preview="previewFile"
:on-remove="removeFile"
:limit="1"
action="">
action
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
<div class="el-upload__text">
将文件拖到此处,或
<em>点击上传</em>
</div>
</el-upload>
</div>
<div style="margin-bottom:10px;">
<el-row :gutter="12">
<el-col :span="4">当前进度:</el-col>
</el-row>
<el-row :gutter="12">
<el-col :span="4">
<el-slider v-model="progree" :min="d.w.Progree" :max="100" :step="1"></el-slider>
</el-col>
</el-row>
</div>
<div slot="footer" class="dialog-footer">
<button
class="normalBtn"
type="primary"
@click="setprogress"
>确认提交</button>
<button class="normalBtn" type="primary" @click="setprogress">确认提交</button>
</div>
</fieldset>
</div>
<viewer :images="images" :options='imageOptions' @inited="inited" class="viewer" ref="viewer">
<img v-for="src in images" :src="src" :key="src">
<viewer :images="images" :options="imageOptions" @inited="inited" class="viewer" ref="viewer">
<img v-for="src in images" :src="src" :key="src" />
</viewer>
</div>
</template>
......@@ -151,56 +186,57 @@ export default {
data() {
return {
d: {},
radio:"1",
isEaxmine:false,
isUpdate:false,
textarea:'',
textarea2:'',
progree:0,
radio: "1",
isEaxmine: false,
isUpdate: false,
textarea: "",
textarea2: "",
progree: 0,
fileList: [],
attach: '',
imageOptions:{
navbar:false,
title:false
attach: "",
linker: "",
imageOptions: {
navbar: false,
title: false
},
images: [],
images: []
};
},
mounted() {
let id = this.$route.query.id;
this.isEaxmine=this.$route.query.examine?true:false;
this.isUpdate=this.$route.query.update?true:false;
this.isEaxmine = this.$route.query.examine ? true : false;
this.isUpdate = this.$route.query.update ? true : false;
this.init(id);
},
methods: {
openFile(file){
openFile(file) {
if (file) {
window.open(file)
window.open(file);
}
},
inited (viewer){
this.$viewer = viewer
inited(viewer) {
this.$viewer = viewer;
},
removeFile(e){
this.attach = ''
removeFile(e) {
this.attach = "";
},
previewFile(e){
const link = document.createElement('a');
let _loadUrl=this.domainManager().DomainUrl
let str = window.location.href
link.href = this.attach
previewFile(e) {
const link = document.createElement("a");
let _loadUrl = this.domainManager().DomainUrl;
let str = window.location.href;
link.href = this.attach;
document.body.appendChild(link);
link.click();
},
uploadFileBtn(file) {
//上传
let newArr = [];
newArr.push(file.file)
let path = "/Upload/Temporary/"
this.$message.info(this.$t('tips.shangchuanzhong'))
newArr.push(file.file);
let path = "/Upload/Temporary/";
this.$message.info(this.$t("tips.shangchuanzhong"));
this.UploadSelfFileT(path, newArr, x => {
this.attach = this.domainManager().ViittoFileUrl + x.data.FilePath
this.$message.success(this.$t('tips.scchenggong'))
this.attach = this.domainManager().ViittoFileUrl + x.data.FilePath;
this.$message.success(this.$t("tips.scchenggong"));
});
},
init(id) {
......@@ -210,7 +246,12 @@ export default {
res => {
if (res.data.resultCode == 1) {
this.d = res.data.data;
this.progree=this.d.w.Progree;
this.progree = this.d.w.Progree;
this.d.p.forEach(x => {
if(x.Linker && x.Linker!=''){
x.Linker=JSON.parse(x.Linker);
}
});
} else {
this.$message.error(res.data.message);
}
......@@ -218,18 +259,26 @@ export default {
null
);
},
setprogress(){
if(this.textarea2==""){
setprogress() {
if (this.textarea2 == "") {
this.$message.error("请填写进度说明");
return;
} else if (this.linker.length == 0 && this.attach.length == 0) {
this.$message.error("附件和相关链接必须二选一提交");
return;
}
let tempLinker='';
if(this.linker.length>0){
tempLinker=JSON.stringify(this.linker.split(/[(\r\n)\r\n]+/));
}
this.apipost(
"user_post_SetWorkProcess",
{
pid:this.$route.query.id,
content:this.textarea2,
progree:this.progree,
attach: this.attach
pid: this.$route.query.id,
content: this.textarea2,
progree: this.progree,
attach: this.attach,
linker:tempLinker
},
res => {
if (res.data.resultCode == 1) {
......@@ -241,21 +290,24 @@ export default {
null
);
},
goexamine(){
if(this.textarea==""){
goexamine() {
if (this.textarea == "") {
this.$message.error("请填写审批意见");
return;
}
this.apipost(
"user_post_SetWorkExamine",
{
id:this.$route.query.id,
content:this.textarea,
status:this.radio
id: this.$route.query.id,
content: this.textarea,
status: this.radio
},
res => {
if (res.data.resultCode == 1) {
window.location.reload();
this.$router.push({
name: "workManager",
query: {}
})
} else {
this.$message.error(res.data.message);
}
......@@ -318,11 +370,11 @@ export default {
.work-content * {
color: #333;
}
.work-content .attach{
.work-content .attach {
margin-top: 10px;
}
.work-content .attach a{
color: #409EFF;
.work-content .attach .work-file {
color: #409eff;
text-decoration: underline;
}
</style>
\ No newline at end of file
......@@ -76,6 +76,19 @@
></el-date-picker>
</span>
</li>
<li>
<span>
<em>任务状态</em>
<el-select class="w200" v-model="msg.status">
<el-option label="不限" value="-2"></el-option>
<el-option label="未开始" value="-1"></el-option>
<el-option label="进行中" value="0"></el-option>
<el-option label="超时进行中" value="1"></el-option>
<el-option label="超时完成" value="2"></el-option>
<el-option label="正常完成" value="3"></el-option>
</el-select>
</span>
</li>
<li>
<input
type="button"
......@@ -226,7 +239,8 @@ export default {
pageSize: 10,
CreateBy: "-1",
examineStatus: "-1",
timeRange: []
timeRange: [],
status:"-2"
},
getCompanyMsg: {
RB_Group_Id: "0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment