|
@@ -15,7 +15,35 @@
|
|
|
<div v-else class="green">{{ workDetailData.point_config.base_point }}</div>
|
|
|
<div style="margin-left: 5px;">{{ $getTypsName(workDetailData.pt_id) }}</div>
|
|
|
</div>
|
|
|
+ <div class="flex-1"></div>
|
|
|
+
|
|
|
+ <el-popover v-if="workDetailData.reviews.length>0" placement="bottom-start" trigger="click">
|
|
|
+ <div class="record" style="margin: 20px 0;width: 400px;">
|
|
|
+ <div
|
|
|
+ @click="openDetail(item)"
|
|
|
+ v-for="(item, index) in workDetailData.reviews"
|
|
|
+ :key="index"
|
|
|
+ class="recordList"
|
|
|
+ :class="[workDetailData.reviews.length - index > 1 ? 'record-list' : '']"
|
|
|
+ >
|
|
|
+ <div class="flex-box-ce record-date fontColorB">
|
|
|
+ <!-- <div class="record-name">{{ item.reviewer_name }}</div> -->
|
|
|
+ <div class="flex-1">
|
|
|
+ <span v-if="item.review_status == 0" class="fontColorB">待审批</span>
|
|
|
+ <span v-else-if="item.review_status == 1" class="green">已通过</span>
|
|
|
+ <span v-else class="red">已驳回</span>
|
|
|
+ </div>
|
|
|
+ <span class="fontColorC">{{item.review_time}}</span>
|
|
|
+ </div>
|
|
|
+ <div class="record-content">
|
|
|
+ <pre class="pre fontColorC">{{ item.remark || '无备注' }}</pre>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div slot="reference" class="blue" style="cursor: pointer;">查看审批记录</div>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
+
|
|
|
<ul>
|
|
|
<li class="flex-box">
|
|
|
<div class="label">任务内容</div>
|
|
@@ -28,13 +56,13 @@
|
|
|
<li class="flex-box" v-if="workDetailData.task_file_list && workDetailData.task_file_list.length > 0">
|
|
|
<div class="label"></div>
|
|
|
<div class="content_text">
|
|
|
- <el-image
|
|
|
- v-for="(item, index) in workDetailData.task_file_list"
|
|
|
- :key="index"
|
|
|
- style="width: 100px; height: 100px;margin-right:8px"
|
|
|
- :src="item"
|
|
|
- :preview-src-list="workDetailData.task_file_list"
|
|
|
- ></el-image>
|
|
|
+ <el-image
|
|
|
+ v-for="(item, index) in workDetailData.task_file_list"
|
|
|
+ :key="index"
|
|
|
+ style="width: 100px; height: 100px;margin-right:8px"
|
|
|
+ :src="item"
|
|
|
+ :preview-src-list="workDetailData.task_file_list"
|
|
|
+ ></el-image>
|
|
|
</div>
|
|
|
</li>
|
|
|
<li class="flex-box">
|
|
@@ -84,17 +112,17 @@
|
|
|
<li class="flex-box" v-if="workDetailData.complete_task && workDetailData.complete_task.files && workDetailData.complete_task.files.length > 0">
|
|
|
<div class="label"></div>
|
|
|
<div class="content_text">
|
|
|
- <el-image
|
|
|
- v-for="(item, index) in workDetailData.complete_task.files"
|
|
|
- :key="index"
|
|
|
- style="width: 100px; height: 100px;margin-right:8px"
|
|
|
- :src="item"
|
|
|
- :preview-src-list="workDetailData.complete_task.files"
|
|
|
- ></el-image>
|
|
|
+ <el-image
|
|
|
+ v-for="(item, index) in workDetailData.complete_task.files"
|
|
|
+ :key="index"
|
|
|
+ style="width: 100px; height: 100px;margin-right:8px"
|
|
|
+ :src="item"
|
|
|
+ :preview-src-list="workDetailData.complete_task.files"
|
|
|
+ ></el-image>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
-
|
|
|
+
|
|
|
<div v-show="workDetailData.point_config && workDetailData.point_config.item_info">
|
|
|
<p class="row_title">规则依据</p>
|
|
|
<el-row :gutter="10" v-if="workDetailData.point_config.rule_info">
|
|
@@ -107,9 +135,11 @@
|
|
|
</el-row>
|
|
|
<el-row v-if="workDetailData.point_config.item_info">
|
|
|
<el-col :span="4">积分</el-col>
|
|
|
- <el-col :span="19" v-show="workDetailData.point_config.item_info.min_point == workDetailData.point_config.item_info.max_point">{{ workDetailData.point_config.item_info.min_point }} {{workDetailData.pt_name}}</el-col>
|
|
|
+ <el-col :span="19" v-show="workDetailData.point_config.item_info.min_point == workDetailData.point_config.item_info.max_point">
|
|
|
+ {{ workDetailData.point_config.item_info.min_point }} {{ workDetailData.pt_name }}
|
|
|
+ </el-col>
|
|
|
<el-col :span="19" v-show="workDetailData.point_config.item_info.min_point != workDetailData.point_config.item_info.max_point">
|
|
|
- {{ workDetailData.point_config.item_info.min_point }} ~ {{ workDetailData.point_config.item_info.max_point }} {{workDetailData.pt_name}}
|
|
|
+ {{ workDetailData.point_config.item_info.min_point }} ~ {{ workDetailData.point_config.item_info.max_point }} {{ workDetailData.pt_name }}
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
@@ -117,7 +147,7 @@
|
|
|
<div class="d_progress">
|
|
|
<div class="flex-box ">
|
|
|
<div class="flex-1">工作进度({{ workDetailData.progress }}%)</div>
|
|
|
- <div class="addJf blue" @click="sliderShow" v-if="workDetailData.employee_id == userId && workDetailData.status==1">+更新进度</div>
|
|
|
+ <div class="addJf blue" @click="sliderShow" v-if="workDetailData.employee_id == userId && workDetailData.status == 1">+更新进度</div>
|
|
|
</div>
|
|
|
<el-progress :percentage="workDetailData.progress"></el-progress>
|
|
|
</div>
|
|
@@ -126,7 +156,7 @@
|
|
|
<el-tab-pane label="工作记录" name="work">
|
|
|
<div class="flex-box">
|
|
|
<div class="flex-1"></div>
|
|
|
- <div class="addJf blue" @click="isOne = true" v-if="workDetailData.employee_id == userId && workDetailData.status < 3 ">+记一条工作记录</div>
|
|
|
+ <div class="addJf blue" @click="isOne = true" v-if="workDetailData.employee_id == userId && workDetailData.status < 3">+记一条工作记录</div>
|
|
|
</div>
|
|
|
<div class="work_box" style="padding-top:10px">
|
|
|
<div class="work_item" v-for="(item, index) in text_list" :key="index" style="margin: 0 0 15px 0">
|
|
@@ -134,17 +164,23 @@
|
|
|
<userImage class="user_img person_imghead" width="40px" height="40px" :user_name="item.recorder" :img_url="item.img_url"></userImage>
|
|
|
<div style="width: 100%;" class="d_name">
|
|
|
<div class="flex-box flex-d-center">
|
|
|
- <div class="flex-1">{{ item.recorder }}
|
|
|
+ <div class="flex-1">
|
|
|
+ {{ item.recorder }}
|
|
|
<span v-if="item.point * 1 > 0">+{{ item.point }}</span>
|
|
|
<span v-if="item.point * 1 < 0">{{ item.point }}</span>
|
|
|
</div>
|
|
|
- <div class="d_date fontColorC">{{ item.time }} <span class="delete_jfjl" v-if="item.recorder_id == userId && workDetailData.status < 3 " @click="deletejf_cli(index,0)"><i class="el-icon-delete"></i></span> </div>
|
|
|
+ <div class="d_date fontColorC">
|
|
|
+ {{ item.time }}
|
|
|
+ <span class="delete_jfjl" v-if="item.recorder_id == userId && workDetailData.status < 3" @click="deletejf_cli(index, 0)">
|
|
|
+ <i class="el-icon-delete"></i>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="fontColorB" style="margin-top: 5px;word-break: break-all;">{{ item.remark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="text_list.length==0" class="fontColorC" style="text-align: center;">暂无工作记录</div>
|
|
|
+ <div v-if="text_list.length == 0" class="fontColorC" style="text-align: center;">暂无工作记录</div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
<el-tab-pane label="记分记录" name="participation">
|
|
@@ -153,7 +189,7 @@
|
|
|
<span v-if="point_total > 0">合计:+{{ point_total }}</span>
|
|
|
<span v-else>合计:{{ point_total }}</span>
|
|
|
</div>
|
|
|
- <div class="addJf blue" @click="isIntegral = true" v-if="keepTheScore">+记分</div>
|
|
|
+ <div class="addJf blue" @click="isIntegral = true" v-if="keepTheScore">+记分</div>
|
|
|
</div>
|
|
|
<div class="work_box" style="padding-top:10px">
|
|
|
<div class="work_item" v-for="(item, index) in point_list" :key="index" style="margin: 0 0 15px 0">
|
|
@@ -161,17 +197,23 @@
|
|
|
<userImage class="user_img person_imghead" width="40px" height="40px" :user_name="item.recorder" :img_url="item.img_url"></userImage>
|
|
|
<div style="width: 100%;" class="d_name">
|
|
|
<div class="flex-box flex-d-center">
|
|
|
- <div class="flex-1">{{ item.recorder }}
|
|
|
+ <div class="flex-1">
|
|
|
+ {{ item.recorder }}
|
|
|
<span class="red" v-if="item.point * 1 > 0">+{{ item.point }}</span>
|
|
|
<span class="green" v-if="item.point * 1 < 0">{{ item.point }}</span>
|
|
|
</div>
|
|
|
- <div class="d_date fontColorC">{{ item.time }} <span class="delete_jfjl" v-if="userId == item.recorder_id && workDetailData.status < 3" @click="deletejf_cli(index,1)"><i class="el-icon-delete"></i></span> </div>
|
|
|
+ <div class="d_date fontColorC">
|
|
|
+ {{ item.time }}
|
|
|
+ <span class="delete_jfjl" v-if="userId == item.recorder_id && workDetailData.status < 3" @click="deletejf_cli(index, 1)">
|
|
|
+ <i class="el-icon-delete"></i>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="fontColorB" style="margin-top: 5px;word-break: break-all;">{{ item.remark }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="point_list.length==0" class="fontColorC" style="text-align: center;">暂无积分记录</div>
|
|
|
+ <div v-if="point_list.length == 0" class="fontColorC" style="text-align: center;">暂无积分记录</div>
|
|
|
</div>
|
|
|
</el-tab-pane>
|
|
|
</el-tabs>
|
|
@@ -179,16 +221,17 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-drawer>
|
|
|
-
|
|
|
+ <examinePopup :title="'审核详情'" :id="detail_id" :show.sync="detailShow"></examinePopup>
|
|
|
+
|
|
|
<!-- 更新进度 -->
|
|
|
<el-dialog title="更新进度" :close-on-click-modal="false" :visible.sync="isSlider" :before-close="publicClose" width="40%">
|
|
|
<div class="slider">
|
|
|
- <div class="fontColorC">拖动滑杆更新进度</div>
|
|
|
- <el-slider v-model="progress"></el-slider>
|
|
|
+ <div class="fontColorC">拖动滑杆更新进度</div>
|
|
|
+ <el-slider v-model="progress"></el-slider>
|
|
|
</div>
|
|
|
<span slot="footer">
|
|
|
- <el-button @click="publicClose()">取消</el-button>
|
|
|
- <el-button type="primary" @click="sliderSend">完成</el-button>
|
|
|
+ <el-button @click="publicClose()">取消</el-button>
|
|
|
+ <el-button type="primary" @click="sliderSend">完成</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 记一条 -->
|
|
@@ -205,14 +248,23 @@
|
|
|
<!-- 记分记录 -->
|
|
|
<el-dialog title="记分" :visible.sync="isIntegral" :before-close="publicClose" width="40%" destroy-on-close :close-on-click-modal="false">
|
|
|
<el-form :model="integral" ref="integral" label-width="80px" :rules="formRules">
|
|
|
- <el-form-item label="记录" prop="text" :rules="[{ required: true, message: '记录不能为空'}]">
|
|
|
+ <el-form-item label="记录" prop="text" :rules="[{ required: true, message: '记录不能为空' }]">
|
|
|
<el-input type="textarea" :rows="3" v-model="integral.text"></el-input>
|
|
|
</el-form-item>
|
|
|
<!-- 记分不能为空 -->
|
|
|
- <el-form-item label="记分" prop="num" >
|
|
|
- <!-- <el-form-item label="记分" prop="num" :rules="[{ required: false, message: '记分不能为空'},{ type: 'number', message: '积分必须为数字值'}]"> -->
|
|
|
- <div class="num" :class="[integral.type=='1'?'add':'jian']"></div>
|
|
|
- <el-input placeholder="请输入内容" type="Number" v-model.number="integral.num" @input="(val)=>{integral.num = val.replace(/[^\d]/g, '')}" >
|
|
|
+ <el-form-item label="记分" prop="num">
|
|
|
+ <!-- <el-form-item label="记分" prop="num" :rules="[{ required: false, message: '记分不能为空'},{ type: 'number', message: '积分必须为数字值'}]"> -->
|
|
|
+ <div class="num" :class="[integral.type == '1' ? 'add' : 'jian']"></div>
|
|
|
+ <el-input
|
|
|
+ placeholder="请输入内容"
|
|
|
+ type="Number"
|
|
|
+ v-model.number="integral.num"
|
|
|
+ @input="
|
|
|
+ val => {
|
|
|
+ integral.num = val.replace(/[^\d]/g, '');
|
|
|
+ }
|
|
|
+ "
|
|
|
+ >
|
|
|
<el-select v-model="integral.type" slot="prepend" placeholder="请选择" style="width: 80px;">
|
|
|
<el-option label="奖分" value="1"></el-option>
|
|
|
<el-option label="扣分" value="2"></el-option>
|
|
@@ -229,19 +281,22 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-const validatorNoZero = (rule, value, callback) => {//设置记分的验证
|
|
|
+const validatorNoZero = (rule, value, callback) => {
|
|
|
+ //设置记分的验证
|
|
|
if (value === 0) {
|
|
|
- return callback(new Error("记分不能为0"));
|
|
|
+ return callback(new Error('记分不能为0'));
|
|
|
} else if (value === '') {
|
|
|
- return callback(new Error("记分不能为空"));
|
|
|
- }else if (isNaN(value)){
|
|
|
- return callback(new Error("积分必须为数字值"));
|
|
|
- }else{
|
|
|
+ return callback(new Error('记分不能为空'));
|
|
|
+ } else if (isNaN(value)) {
|
|
|
+ return callback(new Error('积分必须为数字值'));
|
|
|
+ } else {
|
|
|
callback();
|
|
|
}
|
|
|
};
|
|
|
+import examinePopup from '@/components/examinePopup.vue';
|
|
|
export default {
|
|
|
name: 'taskDetailsPopup',
|
|
|
+ components: { examinePopup },
|
|
|
props: {
|
|
|
title: {
|
|
|
type: String,
|
|
@@ -270,6 +325,7 @@ export default {
|
|
|
|
|
|
loading: false,
|
|
|
workDetailData: {
|
|
|
+ reviews: [],
|
|
|
process: [],
|
|
|
dept_list: [],
|
|
|
point_config: {
|
|
@@ -280,36 +336,38 @@ export default {
|
|
|
isOne: false,
|
|
|
text_list: [],
|
|
|
isIntegral: false,
|
|
|
-
|
|
|
+
|
|
|
point_total: 0,
|
|
|
point_list: [],
|
|
|
activeName: 'work',
|
|
|
getDataUrl: '/api/integral/work',
|
|
|
params: {},
|
|
|
|
|
|
-
|
|
|
userId: this.$getUserData().id,
|
|
|
- isSlider: false,//更新进度弹窗
|
|
|
- progress: 0,//更新进度modus
|
|
|
- isOne: false,//记一条
|
|
|
- textarea: '',//记录一条内容
|
|
|
- isIntegral:false,//记分记录
|
|
|
- integral:{
|
|
|
- text:'',
|
|
|
- num:0,
|
|
|
- type:"1",
|
|
|
+ isSlider: false, //更新进度弹窗
|
|
|
+ progress: 0, //更新进度modus
|
|
|
+ isOne: false, //记一条
|
|
|
+ textarea: '', //记录一条内容
|
|
|
+ isIntegral: false, //记分记录
|
|
|
+ integral: {
|
|
|
+ text: '',
|
|
|
+ num: 0,
|
|
|
+ type: '1'
|
|
|
},
|
|
|
- formRules:{//记分验证
|
|
|
+ formRules: {
|
|
|
+ //记分验证
|
|
|
num: [
|
|
|
- {
|
|
|
- required: true,
|
|
|
- validator: validatorNoZero,
|
|
|
- trigger: "blur"
|
|
|
- }
|
|
|
- ],
|
|
|
+ {
|
|
|
+ required: true,
|
|
|
+ validator: validatorNoZero,
|
|
|
+ trigger: 'blur'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
keepTheScore: false,
|
|
|
employeeMe: {},
|
|
|
+ detailShow: false,
|
|
|
+ detail_id: 0
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -320,88 +378,93 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- employee_me(data){
|
|
|
+ openDetail(item) {
|
|
|
+ this.detailShow = true;
|
|
|
+ this.detail_id = item.id;
|
|
|
+ },
|
|
|
+ employee_me(data) {
|
|
|
let params = {
|
|
|
id: data.employee_id
|
|
|
};
|
|
|
- this.$axios('get', '/api/employee/info', params)
|
|
|
- .then(res => {
|
|
|
- this.employeeMe = res.data.data
|
|
|
- this.keepTheScore = this.keepThe_score(data)
|
|
|
- })
|
|
|
+ this.$axios('get', '/api/employee/info', params).then(res => {
|
|
|
+ this.employeeMe = res.data.data;
|
|
|
+ this.keepTheScore = this.keepThe_score(data);
|
|
|
+ });
|
|
|
},
|
|
|
- keepThe_score(cer){
|
|
|
- if(cer.status > 2){
|
|
|
- return false
|
|
|
+ keepThe_score(cer) {
|
|
|
+ if (cer.status > 2) {
|
|
|
+ return false;
|
|
|
}
|
|
|
- if(this.userId == cer.reviewer_id){
|
|
|
- return true
|
|
|
+ if (this.userId == cer.reviewer_id) {
|
|
|
+ return true;
|
|
|
}
|
|
|
- return this.employeeMe.employee_detail.superior_list.some(x =>{
|
|
|
- if(this.userId == x.id){
|
|
|
- return true
|
|
|
+ return this.employeeMe.employee_detail.superior_list.some(x => {
|
|
|
+ if (this.userId == x.id) {
|
|
|
+ return true;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- deletejf_cli(cor,cur){
|
|
|
+ deletejf_cli(cor, cur) {
|
|
|
this.$confirm('确定永久删除此项?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- let lier = cur == 1 ? this.point_list : this.text_list
|
|
|
- let libf = cur == 1 ? this.text_list : this.point_list
|
|
|
- lier.splice(cor,1)
|
|
|
- let data = {
|
|
|
- work_id: this.workDetailData.id,
|
|
|
- process: []
|
|
|
- }
|
|
|
- data.process =lier.concat(libf)
|
|
|
- if (data.process.length == 0) {
|
|
|
- data.process = "[1]"
|
|
|
- } else {
|
|
|
- data.process = JSON.stringify(data.process);
|
|
|
- }
|
|
|
- this.$axios('post', '/api/integral/work', data).then(res =>{
|
|
|
- if(res.data.code == 1){
|
|
|
- this.getData();
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ let lier = cur == 1 ? this.point_list : this.text_list;
|
|
|
+ let libf = cur == 1 ? this.text_list : this.point_list;
|
|
|
+ lier.splice(cor, 1);
|
|
|
+ let data = {
|
|
|
+ work_id: this.workDetailData.id,
|
|
|
+ process: []
|
|
|
+ };
|
|
|
+ data.process = lier.concat(libf);
|
|
|
+ if (data.process.length == 0) {
|
|
|
+ data.process = '[1]';
|
|
|
+ } else {
|
|
|
+ data.process = JSON.stringify(data.process);
|
|
|
}
|
|
|
+ this.$axios('post', '/api/integral/work', data).then(res => {
|
|
|
+ if (res.data.code == 1) {
|
|
|
+ this.getData();
|
|
|
+ }
|
|
|
+ });
|
|
|
})
|
|
|
- }).catch(() => {});
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
//记分记录
|
|
|
- integralSend(formName){
|
|
|
- this.$refs[formName].validate((valid) => {
|
|
|
+ integralSend(formName) {
|
|
|
+ this.$refs[formName].validate(valid => {
|
|
|
if (valid) {
|
|
|
var items = this.workDetailData.process.list || [];
|
|
|
var process = {
|
|
|
- img_url: this.$getUserData().img_url,
|
|
|
- point: this.integral.type == "1" ? this.integral.num : '-' + this.integral.num,
|
|
|
- recorder_id: this.$getUserData().id,
|
|
|
- recorder: this.$getUserData().name,
|
|
|
- remark: this.integral.text,
|
|
|
- time: this.$moment().format('YYYY-MM-DD HH:mm')
|
|
|
- }
|
|
|
+ img_url: this.$getUserData().img_url,
|
|
|
+ point: this.integral.type == '1' ? this.integral.num : '-' + this.integral.num,
|
|
|
+ recorder_id: this.$getUserData().id,
|
|
|
+ recorder: this.$getUserData().name,
|
|
|
+ remark: this.integral.text,
|
|
|
+ time: this.$moment().format('YYYY-MM-DD HH:mm')
|
|
|
+ };
|
|
|
var data = {
|
|
|
work_id: this.workDetailData.id,
|
|
|
- process: [],
|
|
|
- }
|
|
|
+ process: []
|
|
|
+ };
|
|
|
items.unshift(process);
|
|
|
data.process = JSON.stringify(items);
|
|
|
- this.$axios('post','/api/integral/work',data).then(res => {
|
|
|
+ this.$axios('post', '/api/integral/work', data).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.publicClose();
|
|
|
this.getData();
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
//记一条
|
|
|
- onerecord(){
|
|
|
- if(!this.textarea){
|
|
|
- this.$message.error("请输入备注内容");
|
|
|
- return
|
|
|
+ onerecord() {
|
|
|
+ if (!this.textarea) {
|
|
|
+ this.$message.error('请输入备注内容');
|
|
|
+ return;
|
|
|
}
|
|
|
var items = this.workDetailData.process.list || [];
|
|
|
var process = {
|
|
@@ -411,44 +474,44 @@ export default {
|
|
|
recorder: this.$getUserData().name,
|
|
|
remark: this.textarea,
|
|
|
time: this.$moment().format('YYYY-MM-DD HH:mm')
|
|
|
- }
|
|
|
- var data={
|
|
|
- work_id:this.workDetailData.id,
|
|
|
- process:[],
|
|
|
- }
|
|
|
+ };
|
|
|
+ var data = {
|
|
|
+ work_id: this.workDetailData.id,
|
|
|
+ process: []
|
|
|
+ };
|
|
|
items.unshift(process);
|
|
|
- data.process=JSON.stringify(items);
|
|
|
+ data.process = JSON.stringify(items);
|
|
|
this.$axios('post', '/api/integral/work', data).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.publicClose();
|
|
|
this.getData();
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
//更新进度
|
|
|
- sliderShow(){
|
|
|
- this.progress = this.workDetailData.progress
|
|
|
- this.isSlider = true
|
|
|
+ sliderShow() {
|
|
|
+ this.progress = this.workDetailData.progress;
|
|
|
+ this.isSlider = true;
|
|
|
},
|
|
|
- sliderSend(){
|
|
|
+ sliderSend() {
|
|
|
var self = this;
|
|
|
let data = {
|
|
|
work_id: self.workDetailData.id,
|
|
|
- progress: self.progress,
|
|
|
- }
|
|
|
- self.$axios('post','/api/integral/work',data).then(res => {
|
|
|
+ progress: self.progress
|
|
|
+ };
|
|
|
+ self.$axios('post', '/api/integral/work', data).then(res => {
|
|
|
if (res.data.code == 1) {
|
|
|
this.getData();
|
|
|
self.isSlider = false;
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
},
|
|
|
- publicClose(){
|
|
|
+ publicClose() {
|
|
|
this.textarea = '';
|
|
|
this.integral = {
|
|
|
text: '',
|
|
|
num: 0,
|
|
|
- type: "1",
|
|
|
+ type: '1'
|
|
|
};
|
|
|
this.isSlider = false;
|
|
|
this.isOne = false;
|
|
@@ -466,36 +529,104 @@ export default {
|
|
|
getData() {
|
|
|
this.loading = true;
|
|
|
let data = this.detailType == 2 ? { schedule_id: this.id } : { work_id: this.id };
|
|
|
- this.$axios('get', this.getDataUrl, data).then(res => {
|
|
|
+ this.$axios('get', this.getDataUrl, data, this.detailType == 2 ? '' : 'v2')
|
|
|
+ .then(res => {
|
|
|
this.workDetailData = res.data.data;
|
|
|
- this.employee_me(res.data.data)
|
|
|
- let text_list = []
|
|
|
- let point_list = []
|
|
|
- this.point_total = 0
|
|
|
+ this.employee_me(res.data.data);
|
|
|
+ let text_list = [];
|
|
|
+ let point_list = [];
|
|
|
+ this.point_total = 0;
|
|
|
if (this.workDetailData.process.list && this.workDetailData.process.list.length > 0) {
|
|
|
- for (let i in this.workDetailData.process.list) {
|
|
|
- this.point_total += this.workDetailData.process.list[i].point * 1
|
|
|
- if (this.workDetailData.process.list[i].point != 0) {
|
|
|
- point_list.push(this.workDetailData.process.list[i])
|
|
|
- } else {
|
|
|
- if(this.workDetailData.process.list[i].recorder_id == this.workDetailData.employee_id) {
|
|
|
- text_list.push(this.workDetailData.process.list[i])
|
|
|
+ for (let i in this.workDetailData.process.list) {
|
|
|
+ this.point_total += this.workDetailData.process.list[i].point * 1;
|
|
|
+ if (this.workDetailData.process.list[i].point != 0) {
|
|
|
+ point_list.push(this.workDetailData.process.list[i]);
|
|
|
+ } else {
|
|
|
+ if (this.workDetailData.process.list[i].recorder_id == this.workDetailData.employee_id) {
|
|
|
+ text_list.push(this.workDetailData.process.list[i]);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
- setTimeout(()=>{
|
|
|
- this.text_list=text_list;
|
|
|
- this.point_list=point_list;
|
|
|
- },500)
|
|
|
- }).finally(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
+ setTimeout(() => {
|
|
|
+ this.text_list = text_list;
|
|
|
+ this.point_list = point_list;
|
|
|
+ }, 500);
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped="scoped">
|
|
|
+.recordList {
|
|
|
+ padding: 10px 0;
|
|
|
+ cursor: pointer;
|
|
|
+ border-radius: 5px;
|
|
|
+}
|
|
|
+.recordList:hover {
|
|
|
+ // background-color: #F7F8FA;
|
|
|
+}
|
|
|
+.textarea ::v-deep textarea {
|
|
|
+ background-color: #f7f8fa;
|
|
|
+ border: none;
|
|
|
+ padding: 0;
|
|
|
+ width: 500px;
|
|
|
+ color: #222 !important;
|
|
|
+}
|
|
|
+.record-message {
|
|
|
+ font-size: 13px;
|
|
|
+ margin: 5px 60px;
|
|
|
+}
|
|
|
+.record-list {
|
|
|
+ position: relative;
|
|
|
+}
|
|
|
+.record-list::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ width: 2px;
|
|
|
+ top: 5px;
|
|
|
+ left: 3px;
|
|
|
+ bottom: -15px;
|
|
|
+ background-color: #ccc;
|
|
|
+}
|
|
|
+.record-title {
|
|
|
+ padding: 16px 0;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+.record-date {
|
|
|
+ padding-left: 20px;
|
|
|
+ position: relative;
|
|
|
+ font-size: 13px;
|
|
|
+}
|
|
|
+.record-date::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ width: 8px;
|
|
|
+ height: 8px;
|
|
|
+ background-color: #ccc;
|
|
|
+ left: 0;
|
|
|
+ top: 50%;
|
|
|
+ margin-top: -4px;
|
|
|
+ border-radius: 50%;
|
|
|
+ z-index: 2;
|
|
|
+}
|
|
|
+.record-content {
|
|
|
+ background-color: #f7f8fa;
|
|
|
+ padding: 6px;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin-left: 20px;
|
|
|
+ margin-top: 10px;
|
|
|
+ // margin-bottom: 10px;
|
|
|
+}
|
|
|
+.record-name {
|
|
|
+ margin-right: 10px;
|
|
|
+ /* margin-left: 10px; */
|
|
|
+ color: #141c28;
|
|
|
+ font-weight: 600;
|
|
|
+}
|
|
|
.details_content {
|
|
|
& .d_userMessage {
|
|
|
margin-left: 10px;
|
|
@@ -561,23 +692,23 @@ export default {
|
|
|
padding: 20px;
|
|
|
border-bottom: 1px #efefef solid;
|
|
|
}
|
|
|
-.d_name{
|
|
|
+.d_name {
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
-.d_content{
|
|
|
+.d_content {
|
|
|
margin-left: 50px;
|
|
|
}
|
|
|
-.addJf{
|
|
|
+.addJf {
|
|
|
font-size: 13px;
|
|
|
cursor: pointer;
|
|
|
margin-bottom: 5px;
|
|
|
padding: 5px;
|
|
|
- transition: all .3s;
|
|
|
+ transition: all 0.3s;
|
|
|
}
|
|
|
-.addJf:hover{
|
|
|
+.addJf:hover {
|
|
|
color: #26a2ff !important;
|
|
|
}
|
|
|
-.num{
|
|
|
+.num {
|
|
|
position: absolute;
|
|
|
height: 22px;
|
|
|
width: 20px;
|
|
@@ -585,22 +716,22 @@ export default {
|
|
|
left: 85px;
|
|
|
line-height: 40px !important;
|
|
|
}
|
|
|
-.add:before{
|
|
|
+.add:before {
|
|
|
position: absolute;
|
|
|
- content: "+";
|
|
|
+ content: '+';
|
|
|
color: #f56c6c;
|
|
|
}
|
|
|
-.jian:before{
|
|
|
+.jian:before {
|
|
|
position: absolute;
|
|
|
- content: "-";
|
|
|
+ content: '-';
|
|
|
color: #67c23a;
|
|
|
}
|
|
|
-.delete_jfjl{
|
|
|
- transition: .3s all;
|
|
|
+.delete_jfjl {
|
|
|
+ transition: 0.3s all;
|
|
|
cursor: pointer;
|
|
|
margin: 0 0 0 10px;
|
|
|
}
|
|
|
-.delete_jfjl:hover{
|
|
|
+.delete_jfjl:hover {
|
|
|
color: #26a2ff;
|
|
|
}
|
|
|
</style>
|