Przeglądaj źródła

修改字段

newStyle
douzhuo 1 rok temu
rodzic
commit
2649c2d9bf
13 zmienionych plików z 3705 dodań i 336 usunięć
  1. +1
    -1
      .env.cldevelopment
  2. +1
    -1
      .env.shdevelopment
  3. +1
    -0
      package.json
  4. +1
    -0
      src/api/modules/api.js
  5. +132
    -0
      src/api/modules/http.js
  6. +1
    -1
      src/router/axios.js
  7. +1797
    -0
      src/views/Customer/invalidAuditList.vue
  8. +363
    -308
      src/views/Customer/label.vue
  9. +6
    -0
      src/views/Equipment/equlog.vue
  10. +66
    -25
      src/views/ReceivingRecords/index.vue
  11. +840
    -0
      src/views/Statistics/InvalidReceptionAnalysis.vue
  12. +488
    -0
      src/views/Template/invalidReception.vue
  13. +8
    -0
      src/views/building/index.vue

+ 1
- 1
.env.cldevelopment Wyświetl plik

@@ -1 +1 @@
VUE_APP_BASE_API = 'http://192.168.31.160:9999'
VUE_APP_BASE_API = 'http://192.168.31.161:9999'

+ 1
- 1
.env.shdevelopment Wyświetl plik

@@ -1 +1 @@
VUE_APP_BASE_API = 'http://192.168.31.85:9999'
VUE_APP_BASE_API = 'http://192.168.31.86:9999'

+ 1
- 0
package.json Wyświetl plik

@@ -5,6 +5,7 @@
"scripts": {
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
"dev": "vue-cli-service serve",
"serve": "vue-cli-service serve --mode production",
"cl": "vue-cli-service serve --mode cldevelopment",
"sh": "vue-cli-service serve --mode shdevelopment",
"local": "vue-cli-service serve --mode localdevelopment",


+ 1
- 0
src/api/modules/api.js Wyświetl plik

@@ -302,6 +302,7 @@ export function houseListWhenAddUser(query) {
params:query
})
}
// 获取项目列表
export function findHouseByUser(query) {
return request({
url: '/autoSR/zkhouse/findHouseByUser',


+ 132
- 0
src/api/modules/http.js Wyświetl plik

@@ -951,3 +951,135 @@ export function findByRepetitionName(params) {
})
}



// 无效接待审核列表
export function InvalidReceptionGetList(params) {
return request({
url: 'autoSR/audit/reception/getPageList',
method: 'get',
params
})
}

// 无效接待原因列表
export function InvalidReceptionReasonList(params) {
return request({
url: 'autoSR/audit/reception/invalidList',
method: 'get',
params
})
}


// 添加无效接待原因
export function InvalidReceptionAddInvalid(params) {
return request({
url: 'autoSR/audit/reception/addInvalid',
method: 'get',
params
})
}

// 删除无效接待原因
export function InvalidReceptionDelete(params) {
return request({
url: 'autoSR/audit/reception/delete',
method: 'get',
params
})
}

// 删除无效接待原因
export function InvalidReceptionUpdateSort(params) {
return request({
url: 'autoSR/audit/reception/updateSort',
method: 'get',
params
})
}

// 编辑无效接待原因
export function InvalidReceptionUpdateInvalid(params) {
return request({
url: 'autoSR/audit/reception/updateInvalid',
method: 'get',
params
})
}


// 获取当前角色绑定的项目
export function InvalidFindHouseListByAccount(params) {
return request({
url: 'autoSR/zkhouse/findHouseListByAccount',
method: 'get',
params
})
}


// 获取无效审核列表的接待详情
export function InvalidFindReceptionLog(params) {
return request({
url: 'autoSR/audit/reception/findReceptionLog',
method: 'get',
params
})
}

// 获取无效审核列表的录音详情
export function InvalidFindBycusId(params) {
return request({
url: 'autoSR/zk/file/findBycusId',
method: 'get',
params
})
}


// 删除接待记录
export function deleteCS(params) {
return request({
url: 'autoSR/customer/deleteCS',
method: 'get',
params
})
}

// 无效审核状态更改
export function updateReception(data) {
return request({
url: 'autoSR/audit/reception/updateReception',
method: 'post',
data
})
}

// 部门
export function getAllDeptName(params) {
return request({
url: 'autoSR/api/zkAgentPool/getAllDeptName',
method: 'get',
params
})
}


// 顾问
export function getAllAccountName(params) {
return request({
url: 'autoSR/api/zkAgentPool/getAllAccountName',
method: 'get',
params
})
}

// 顾问
export function invalidReceptionRank(data) {
return request({
url: 'autoSR/audit/reception/invalidReceptionRank',
method: 'post',
data: data
})
}

+ 1
- 1
src/router/axios.js Wyświetl plik

@@ -63,7 +63,7 @@ axios.interceptors.response.use(res => {
NProgress.done()
const status = Number(res.status) || 200
const message = res.data.msg || errorCode[status] || errorCode['default']
if (status === 401 || status === 500) {
if ((status === 401 || status === 500) && process.env.NODE_ENV === 'production') {
idx++
if(idx==1){
Message({


+ 1797
- 0
src/views/Customer/invalidAuditList.vue
Plik diff jest za duży
Wyświetl plik


+ 363
- 308
src/views/Customer/label.vue Wyświetl plik

@@ -57,37 +57,37 @@


<span v-if="data.level == 1" style="display: flex; align-items: center">
<span class="editorcd" @click="append(node, data)" style="display: flex; align-items: center" >
<span class="editorcd" @click.stop="append(node, data)" style="display: flex; align-items: center" >
<img class="levelimg3" src="/img/add1.png" alt="" />
<span>添加二级</span>
</span>
<span style="margin-left: 10px" v-if="data.isInterval!=0">
<el-button class="editor" type="text" size="mini" @click="() => ddeditor(node, data)">编辑</el-button>
<el-button class="editor" type="text" size="mini" @click.stop="() => ddeditor(node, data)">编辑</el-button>
</span>
</span>

<span v-if="data.level == 2" style="display: flex; align-items: center" >
<span v-if="data.isInterval == 1" class="editorcd2" @click="append(node, data)" style="display: flex; align-items: center">
<span v-if="data.isInterval == 1" class="editorcd2" @click.stop="append(node, data)" style="display: flex; align-items: center">
<img class="levelimg3" src="/img/add2.png" alt="" />
<span>添加三级</span>
</span>
<span style="margin-left: 10px">
<el-button class="editorcd" type="text" size="mini" @click="ddeditor(node, data)">编辑</el-button>
<el-button class="editorcd" type="text" size="mini" @click.stop="ddeditor(node, data)">编辑</el-button>
<el-button class="editor" v-if="labelmodelshow" type="text" size="mini" @click="() => moxingEdit(node, data)">编辑模型</el-button>
</span>
<span style="margin-left: 10px">
<el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button>
<el-button class="remove" type="text" size="mini" @click.stop="remove(node, data)" >删除</el-button>
</span>
</span>
<span v-if="data.level == 3" style="display: flex; align-items: center" >
<span style="margin-left: 10px">
<el-button class="editorcd" type="text" size="mini" @click="ddeditor(node, data)" >编辑</el-button>
<el-button class="editorcd" type="text" size="mini" @click.stop="ddeditor(node, data)" >编辑</el-button>
</span>
<span style="margin-left: 10px" v-if="labelmodelshow">
<el-button class="editorcd" type="text" size="mini" @click="moxingEdit(node, data)" >编辑模型</el-button>
<el-button class="editorcd" type="text" size="mini" @click.stop="moxingEdit(node, data)" >编辑模型</el-button>
</span>
<span style="margin-left: 10px">
<el-button class="remove" type="text" size="mini" @click="remove(node, data)" >删除</el-button>
<el-button class="remove" type="text" size="mini" @click.stop="remove(node, data)" >删除</el-button>
</span>
</span>
</span>
@@ -237,6 +237,15 @@
例如:意向面积:120平,场景:我想要一个120平的;</div>
</div>
</div>
<div v-if="frosasd.level == 1" style="display: flex;align-items: center;height: 40px;">
<div style="margin-left: 30px;height: 30px;line-height: 30px;">是否必选:</div>
<div>
<el-radio-group v-model="frosasd.mustSelected">
<el-radio :label="0">是</el-radio>
<el-radio :label="1">否</el-radio>
</el-radio-group>
</div>
</div>
<div style="display: flex; justify-content: center; margin-top: 40px">
<button
style="
@@ -387,42 +396,42 @@ export default {
data() {
return {
dynamiclist: [],
taglist:[
{
label: 'or (或)',
value: 'or'
},
{
label: 'near (临近)',
value: 'near'
},
{
label: 'after (后面)',
value: 'after'
},
{
label: 'and not (非)',
value: 'and not'
},
// {
// label: '~ (至)',
// value: '~'
// },
taglist: [
{
label: "or (或)",
value: "or",
},
{
label: "near (临近)",
value: "near",
},
{
label: "after (后面)",
value: "after",
},
{
label: "and not (非)",
value: "and not",
},
// {
// label: '~ (至)',
// value: '~'
// },
],
moxingVisible: false,
innerVisible: false,
form: {
keywordsName: '',
id: '',
keywordsId: '',
distance: 10,
sceneDesc:'',
originalExpression: ''
keywordsName: "",
id: "",
keywordsId: "",
distance: 10,
sceneDesc: "",
originalExpression: "",
},
formLabelWidth: "120px",
dialogFormVisible: false,
dialogVisible: false,
dialogVisible2:false,
dialogVisible2: false,
orgType: localStorage.getItem("orgType"),
isshowage: false,
treeList: [], //树形数据
@@ -432,11 +441,11 @@ export default {
addForm: {
name: "",
endName: "",
sceneDesc: ''
sceneDesc: "",
},
addForm2:{
name:'',
mustSelected:0
addForm2: {
name: "",
mustSelected: 0,
},
level: 0,
pid: "",
@@ -450,14 +459,15 @@ export default {
orgCode: "",
sort: "",
level: "",
desc: ''
desc: "",
mustSelected: 1, // 是否必选
},
amountintervalname: "",
isInterval: "",
orgCodes:''
orgCodes: "",
};
},
computed: {
computed: {
...mapGetters(["permissions"]),
},
created() {
@@ -470,251 +480,292 @@ export default {
},
methods: {
// 基于保存的光标插入内容 --用于失去焦点后再继续插入内容
insertContent(str) {
let selection, range = window._range;// 当前光标位置对象
if (!window.getSelection) {
range.pasteHTML(str);
range.collapse(false);
range.select();
insertContent(str) {
let selection,
range = window._range; // 当前光标位置对象
if (!window.getSelection) {
range.pasteHTML(str);
range.collapse(false);
range.select();
} else {
selection = window.getSelection
? window.getSelection()
: document.selection;
range.collapse(false);
let hasR = range.createContextualFragment(str);
let hasR_lastChild = hasR.lastChild;
while (
hasR_lastChild &&
hasR_lastChild.nodeName.toLowerCase() == "br" &&
hasR_lastChild.previousSibling &&
hasR_lastChild.previousSibling.nodeName.toLowerCase() == "br"
) {
let e = hasR_lastChild;
hasR_lastChild = hasR_lastChild.previousSibling;
hasR.removeChild(e);
}
range.insertNode(hasR);
if (hasR_lastChild) {
range.setEndAfter(hasR_lastChild);
range.setStartAfter(hasR_lastChild);
}
selection.removeAllRanges();
selection.addRange(range);
}
},
// 失去焦点时保存光标位置
saveRange: () => {
let selection = window.getSelection
? window.getSelection()
: document.selection;
if (!selection.rangeCount) return;
let range = selection.createRange
? selection.createRange()
: selection.getRangeAt(0);
window._range = range;
},
// 回显模型数据,Dialog 的内容是懒渲染的,即在第一次被打开之前,传入的默认 slot 不会被渲染到 DOM 上,so在 open 事件回调中进行
openModel() {
// this.$nextTick(()=>{
// let huashuModel = document.getElementById('huashuModel')
// huashuModel.innerHTML = this.form.originalExpression
// })
},
//格式化粘贴文本方法
onPaste(event) {
var e = event || window.event;
// 阻止默认粘贴
e.preventDefault();
// 粘贴事件有一个clipboardData的属性,提供了对剪贴板的访问
// clipboardData的getData(fomat) 从剪贴板获取指定格式的数据
var text =
(e.originalEvent || e).clipboardData.getData("text/plain") ||
prompt("在这里输入文本");
//清除回车
text = text.replace(/\[\d+\]|\n|\r/gi, "");
// 插入
document.execCommand("insertText", false, text);
},
myeditorenter(e) {
e.preventDefault();
},
// 插入节点
insertHtmlAtCaret(html) {
document.getElementById("huashuModel").focus();
var sel, range;
if (window.getSelection) {
// IE9 and non-IE
sel = window.getSelection();
if (sel.getRangeAt && sel.rangeCount) {
range = sel.getRangeAt(0);
range.deleteContents();
// Range.createContextualFragment() would be useful here but is
// non-standard and not supported in all browsers (IE9, for one)
var el = document.createElement("div");
el.innerHTML = html;
var frag = document.createDocumentFragment(),
node,
lastNode;
while ((node = el.firstChild)) {
lastNode = frag.appendChild(node);
}
range.insertNode(frag);
// Preserve the selection
if (lastNode) {
range = range.cloneRange();
range.setStartAfter(lastNode);
range.collapse(true);
sel.removeAllRanges();
sel.addRange(range);
}
}
} else if (document.selection && document.selection.type != "Control") {
// IE < 9
document.selection.createRange().pasteHTML(html);
}
},
// 点击插入标签
insertTag(item, index) {
if (window._range) {
this.insertContent(
"<span contentEditable='false' style='color:red'>" +
item.value +
"</span><text>&nbsp;</text>"
);
} else {
this.insertHtmlAtCaret(
"<span contentEditable='false' style='color:red'>" +
item.value +
"</span><text>&nbsp;</text>"
);
}
},
// 处理标签,删除不需要的标签格式
delMark(str) {
const hasStr = (str) => {
let index = str.indexOf("<");
let index1 = str.indexOf(">");
if (index > 0 && index1 > 0) {
let replaceStr = str.substring(index, index1 + 1);
str = str.replace(replaceStr, "");
hasStr(str);
}
};
hasStr(str);
},
// 处理模型 关键词加#号
replaceFun(str) {
let temp = str;
temp = temp.replace(/<text>\&nbsp\;<\/text>/g, "");
temp = temp.replace(/\&nbsp\;/g, "");
temp = temp.replace(/<text>/g, "");
temp = temp.replace(/<\/text>/g, "");
temp = temp.replace(
/<span contenteditable="false" style="color:red">/g,
" #"
); // 后台返回是这样的,变了,需要也处理一下
temp = temp.replace(
/<span style="color:red" contenteditable="false">/g,
" #"
);
temp = temp.replace(/<\/span>/g, "#");
// console.log(temp);
this.delMark(temp);
return temp;
},
// 模型保存
saveFun() {
let text = document.getElementById("huashuModel");
// console.log(text.innerHTML);
// console.log(text.innerText);
let temp = text.innerHTML;
if (this.form.distance == "") {
this.$message.error("请输入距离");
return;
}
if (text.innerText == "") {
this.$message.error("请输入标签模型");
return;
}

axios({
url: `/autoSR/zk/keymodel/updateKeywordsModel`,
method: "post",
data: {
id: this.form.id,
houseId: this.houseId,
level: this.level,
keywordsId: this.form.keywordsId,
keywordsName: this.form.keywordsName,
answerList: [],
keyType: 2,
formatExpression: this.replaceFun(temp), // 问题表达式
original: temp, // html数据
showFormatExpression: text.innerText,
distance: this.form.distance, // * 距离
},
})
.then((data) => {
this.moxingVisible = false;
if (data.code == 0) {
this.$message.success(data.data);
this.getorgCode();
} else {
selection = window.getSelection ? window.getSelection() : document.selection;
range.collapse(false);
let hasR = range.createContextualFragment(str);
let hasR_lastChild = hasR.lastChild;
while (hasR_lastChild && hasR_lastChild.nodeName.toLowerCase() == "br" && hasR_lastChild.previousSibling && hasR_lastChild.previousSibling.nodeName.toLowerCase() == "br") {
let e = hasR_lastChild;
hasR_lastChild = hasR_lastChild.previousSibling;
hasR.removeChild(e);
}
range.insertNode(hasR);
if (hasR_lastChild) {
range.setEndAfter(hasR_lastChild);
range.setStartAfter(hasR_lastChild);
}
selection.removeAllRanges();
selection.addRange(range);
this.$message.error(data.msg);
}
},
// 失去焦点时保存光标位置
saveRange: () => {
let selection = window.getSelection ? window.getSelection() : document.selection;
if (!selection.rangeCount) return;
let range = selection.createRange ? selection.createRange() : selection.getRangeAt(0);
window._range = range;
},
// 回显模型数据,Dialog 的内容是懒渲染的,即在第一次被打开之前,传入的默认 slot 不会被渲染到 DOM 上,so在 open 事件回调中进行
openModel(){
// this.$nextTick(()=>{
// let huashuModel = document.getElementById('huashuModel')
// huashuModel.innerHTML = this.form.originalExpression
// })
},
//格式化粘贴文本方法
onPaste(event) {
var e = event || window.event
// 阻止默认粘贴
e.preventDefault();
// 粘贴事件有一个clipboardData的属性,提供了对剪贴板的访问
// clipboardData的getData(fomat) 从剪贴板获取指定格式的数据
var text = (e.originalEvent || e).clipboardData.getData('text/plain') || prompt('在这里输入文本');
//清除回车
text = text.replace(/\[\d+\]|\n|\r/ig,"")
// 插入
document.execCommand("insertText", false, text);
},
myeditorenter(e) {
e.preventDefault();
},
// 插入节点
insertHtmlAtCaret(html) {
document.getElementById('huashuModel').focus();
var sel, range;
if (window.getSelection) {
// IE9 and non-IE
sel = window.getSelection();
if (sel.getRangeAt && sel.rangeCount) {
range = sel.getRangeAt(0);
range.deleteContents();
// Range.createContextualFragment() would be useful here but is
// non-standard and not supported in all browsers (IE9, for one)
var el = document.createElement("div");
el.innerHTML = html;
var frag = document.createDocumentFragment(),
node, lastNode;
while ((node = el.firstChild)) {
lastNode = frag.appendChild(node);
}
range.insertNode(frag);
// Preserve the selection
if (lastNode) {
range = range.cloneRange();
range.setStartAfter(lastNode);
range.collapse(true);
sel.removeAllRanges();
sel.addRange(range);
}
})
.catch((e) => {
this.moxingVisible = false;
});
},
moxingEdit(node, data) {
this.level = data.level;
this.form.keywordsName = data.endName
? data.name + "~" + data.endName
: data.name;
this.form.keywordsId = data.keywordsId;
this.form.sceneDesc = data.desc || "";
// 获取模型数据回显
axios({
url: `/autoSR/zk/keymodel/findById`,
method: "get",
params: {
houseId: this.houseId,
level: this.level,
keyType: 2,
keywordsId: data.id,
},
})
.then((res) => {
// console.log(res)
this.moxingVisible = true;
if (res.code == 0) {
let obj = res.data;
if (obj != null) {
this.form.distance = obj.distance || 10;
this.form.originalExpression = obj.originalExpression;
this.form.id = obj.id;
// 回显标签模型数据
if (obj.answerList && obj.answerList.length) {
this.dynamiclist = obj.answerList.map((cont) => {
return {
question: cont.question,
editValue: cont.originalExpression,
};
});
// console.log(this.dynamiclist)
} else {
this.dynamiclist = [];
}
} else if (document.selection && document.selection.type != "Control") {
// IE < 9
document.selection.createRange().pasteHTML(html);
}
},
// 点击插入标签
insertTag(item,index){
if(window._range){
this.insertContent("<span contentEditable='false' style='color:red'>"+item.value+"</span><text>&nbsp;</text>");
}else{
this.insertHtmlAtCaret("<span contentEditable='false' style='color:red'>"+item.value+"</span><text>&nbsp;</text>");
} else {
this.form.distance = 10;
this.form.originalExpression = this.form.keywordsName;
this.form.id = "";
}
},
// 处理标签,删除不需要的标签格式
delMark(str) {
const hasStr = (str) => {
let index = str.indexOf('<')
let index1 = str.indexOf('>')
if(index>0&&index1>0){
let replaceStr= str.substring(index, index1+1)
str= str.replace(replaceStr,'')
hasStr(str)
}
} else {
this.form.distance = 10;
this.form.originalExpression = this.form.keywordsName;
}
hasStr(str)
},
// 处理模型 关键词加#号
replaceFun(str){
let temp = str
temp = temp.replace(/<text>\&nbsp\;<\/text>/g,'');
temp = temp.replace(/\&nbsp\;/g,'');
temp = temp.replace(/<text>/g,'');
temp = temp.replace(/<\/text>/g,'');
temp = temp.replace(/<span contenteditable="false" style="color:red">/g,' #');// 后台返回是这样的,变了,需要也处理一下
temp = temp.replace(/<span style="color:red" contenteditable="false">/g,' #');
temp = temp.replace(/<\/span>/g,'#')
// console.log(temp);
this.delMark(temp);
return temp
},
// 模型保存
saveFun(){
let text = document.getElementById('huashuModel');
// console.log(text.innerHTML);
// console.log(text.innerText);
let temp = text.innerHTML
if(this.form.distance=='') {this.$message.error('请输入距离'); return;}
if(text.innerText=='') {this.$message.error('请输入标签模型'); return;}

axios({
url: `/autoSR/zk/keymodel/updateKeywordsModel`,
method: 'post',
data: {
id: this.form.id,
houseId: this.houseId,
level: this.level,
keywordsId: this.form.keywordsId,
keywordsName: this.form.keywordsName,
answerList: [],
keyType: 2,
formatExpression: this.replaceFun(temp),// 问题表达式
original: temp,// html数据
showFormatExpression: text.innerText,
distance: this.form.distance // * 距离
}
}).then(data => {
this.moxingVisible = false
if(data.code==0){
this.$message.success(data.data)
this.getorgCode()
}else{
this.$message.error(data.msg)
}
}).catch((e)=>{
this.moxingVisible = false
})
},
moxingEdit(node, data){
this.level = data.level
this.form.keywordsName = data.endName?data.name+'~'+data.endName:data.name
this.form.keywordsId = data.keywordsId
this.form.sceneDesc = data.desc ||''
// 获取模型数据回显
axios({
url: `/autoSR/zk/keymodel/findById`,
method: 'get',
params: {
houseId: this.houseId,
level: this.level,
keyType: 2,
keywordsId: data.id
}
}).then(res => {
// console.log(res)
this.moxingVisible = true
if (res.code == 0) {
let obj = res.data
if(obj!=null){
this.form.distance=obj.distance||10
this.form.originalExpression= obj.originalExpression
this.form.id =obj.id
// 回显标签模型数据
if(obj.answerList&&obj.answerList.length){
this.dynamiclist = obj.answerList.map(cont=>{
return {
question: cont.question,
editValue: cont.originalExpression
}
})
// console.log(this.dynamiclist)
}else{
this.dynamiclist = []
}
}else{
this.form.distance=10
this.form.originalExpression= this.form.keywordsName
this.form.id =''
}
}else{
this.form.distance = 10
this.form.originalExpression = this.form.keywordsName
}
this.$nextTick(()=>{
let huashuModel = document.getElementById('huashuModel')
huashuModel.innerHTML = this.form.originalExpression
})
}).catch((e)=>{
this.moxingVisible = true
})
},
addclick(){
var orgCode='';
if(localStorage.getItem("orgType") == 3){
orgCode=localStorage.getItem("orgCode")
}else{
orgCode= this.orgCodes
this.$nextTick(() => {
let huashuModel = document.getElementById("huashuModel");
huashuModel.innerHTML = this.form.originalExpression;
});
})
.catch((e) => {
this.moxingVisible = true;
});
},
addclick() {
var orgCode = "";
if (localStorage.getItem("orgType") == 3) {
orgCode = localStorage.getItem("orgCode");
} else {
orgCode = this.orgCodes;
}
if (this.addForm2.name != "") {
axios({
if (this.addForm2.name != "") {
axios({
url: `/autoSR/zk/keywords/add`,
method: "post",
data: {
pid: 0,
name: this.addForm2.name,
mustSelected: this.addForm2.mustSelected,
level:1,
orgCode:orgCode,
houseId:this.houseId
level: 1,
orgCode: orgCode,
houseId: this.houseId,
},
}).then((res) => {
if(res.code ==0){
this.dialogVisible2=false;
this.getHouse()
}else{
if (res.code == 0) {
this.dialogVisible2 = false;
this.getHouse();
} else {
this.$message({
message: res.msg||'添加失败',
message: res.msg || "添加失败",
type: "error",
});
}
})
}else{
});
} else {
this.$message({
message: "内容不能为空",
type: "warning",
@@ -722,9 +773,9 @@ export default {
return;
}
},
append1(){
this.addForm2.name='';
this.dialogVisible2=true;
append1() {
this.addForm2.name = "";
this.dialogVisible2 = true;
},
// 获取模板数据
getHouse() {
@@ -746,7 +797,7 @@ export default {
this.amountintervalname = data.name;
this.addForm.name = "";
this.addForm.endName = "";
this.addForm.sceneDesc = '';
this.addForm.sceneDesc = "";
this.pid = data.id;
this.level = data.level + 1;
this.orgCode = data.orgCode;
@@ -761,11 +812,11 @@ export default {
this.dialogFormVisible = true;
},
houseChange() {
this.houseList.map(item=>{
if(item.id==this.houseId){
this.orgCodes=item.orgCode;
this.houseList.map((item) => {
if (item.id == this.houseId) {
this.orgCodes = item.orgCode;
}
})
});
console.log(this.orgCodes);
this.getHouse();
},
@@ -810,8 +861,8 @@ export default {
level: this.level,
orgCode: this.orgCode,
isInterval: this.isInterval,
houseId:this.houseId,
desc:this.addForm.sceneDesc,
houseId: this.houseId,
desc: this.addForm.sceneDesc,
},
}).then((res) => {
if (res.code == 0) {
@@ -850,7 +901,7 @@ export default {
});
});
}
this.zkhousePage()
this.zkhousePage();
}
});
},
@@ -878,7 +929,7 @@ export default {
method: "get",
params: {
id: this.deleteId,
houseId:this.houseId
houseId: this.houseId,
},
}).then((res) => {
if (res.code == 0) {
@@ -902,6 +953,7 @@ export default {
},
//编辑
ddeditor(node, data) {
console.log(data, "adjklsajdlk");
this.frosasd = {
name: "",
endName: "",
@@ -911,7 +963,8 @@ export default {
orgCode: "",
sort: "",
level: "",
desc: ''
desc: "",
mustSelected: 1,
};
if (data.isInterval == 0) {
this.frosasd.isInterval = 0;
@@ -926,6 +979,9 @@ export default {
this.frosasd.endName = "";
this.frosasd.isInterval = 1;
}
if (data.level == 1) {
this.frosasd.mustSelected = data.mustSelected;
}
this.frosasd.id = data.id;
this.frosasd.name = data.name;
this.frosasd.pid = data.pid;
@@ -967,7 +1023,7 @@ export default {
this.houseId = localStorage.getItem("houseId");
} else {
this.houseId = res.data[0].id;
this.orgCodes=res.data[0].orgCode;
this.orgCodes = res.data[0].orgCode;
}
// this.houseId = res.data[0].id;
// 列表获取
@@ -979,11 +1035,11 @@ export default {
axios({
url: `/autoSR/zk/keywords/update`,
method: "post",
data: {...this.frosasd,houseId: this.houseId},
data: { ...this.frosasd, houseId: this.houseId },
}).then((res) => {
if (res.code == 0) {
this.getHouse()
that.isshowage=false;
this.getHouse();
that.isshowage = false;
that.treeList.forEach((item, index) => {
item.children.forEach((asd, indexesd) => {
if (asd.id == that.frosasd.id) {
@@ -1031,18 +1087,18 @@ export default {
</script>

<style scoped="scoped" lang="scss" >
/deep/.el-tree-node__content{
overflow: hidden;
/deep/.el-tree-node__content {
overflow: hidden;
}
.editDiv{
width:100%;
min-height:60px;
max-height:120px;
overflow:auto;
margin-bottom:10px;
.editDiv {
width: 100%;
min-height: 60px;
max-height: 120px;
overflow: auto;
margin-bottom: 10px;
padding: 15px;
outline: none;
border:1px solid #409EFF;
border: 1px solid #409eff;
border-radius: 10px;
}
.box-center {
@@ -1059,13 +1115,13 @@ overflow: hidden;
padding-left: 15px;
padding-bottom: 60px;
}
.addlevl{
.addlevl {
width: 100px;
border: 1px solid #2671E2;
color: #2671E2;
border: 1px solid #2671e2;
color: #2671e2;
text-align: center;
line-height: 30rpx;
border-radius:4px ;
border-radius: 4px;
margin-top: 10px;
margin-left: 18px;
}
@@ -1139,21 +1195,20 @@ overflow: hidden;
border: 1px solid #e0e0e0;
}
}
/deep/ .el-dialog--center{
/deep/ .el-dialog--center {
border-radius: 8px;
.el-dialog__title{
.el-dialog__title {
font-weight: bold;
}
}
/deep/ .el-button--primary{
background: #2671E2 !important;
border: 1px solid #2671E2 !important;
/deep/ .el-button--primary {
background: #2671e2 !important;
border: 1px solid #2671e2 !important;
}
/deep/ .el-button--text{
color: #2671E2;
/deep/ .el-button--text {
color: #2671e2;
}


.itemlist {
display: flex;
justify-content: space-between;


+ 6
- 0
src/views/Equipment/equlog.vue Wyświetl plik

@@ -29,7 +29,13 @@
</el-table-column>
<el-table-column prop="signalDevice" label="设备信号">
</el-table-column>
<el-table-column prop="fileCount" label="待上传文件数">
</el-table-column>
<el-table-column prop="stateInterval" label="更新间隔时长">
<template slot-scope="{ row }">
<span v-if="row.timeInterval > 60*11*1000" style="color: red;font-weight: bold;">{{ row.stateInterval }}</span>
<span v-else >{{ row.stateInterval }}</span>
</template>
</el-table-column>
</el-table>
</div>


+ 66
- 25
src/views/ReceivingRecords/index.vue Wyświetl plik

@@ -310,7 +310,6 @@
filterable
collapse-tags
placeholder="请选择"
>
<el-option
v-for="item in templateList"
@@ -321,31 +320,31 @@
</el-option>
</el-select>
</div>
</div>

<div class="app-titel" style="margin-top: 15px">
<div style="margin-left: 110px">
<el-button type="primary" @click="screen">筛选</el-button>
</div>
<div style="margin-left: 20px">
<el-button @click="clearScreen" type="text">清空筛选条件</el-button>
</div>
<el-button style="margin-left: 10px" @click="isSystoleForm" type="text"
>{{ isOpen ? "收起" : "展开"
}}<i
style="margin-left: 5px"
:class="isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
></i
></el-button>

<div
style="margin-left: auto; margin-right: 10px"
v-if="rec_index_downLoad"
>
<el-button @click="downLoad" icon="el-icon-download"> 导出</el-button>
<div class="app-titel" style="margin-top: 15px">
<div style="margin-left: 110px">
<el-button type="primary" @click="screen">筛选</el-button>
</div>
<div style="margin-left: 20px">
<el-button @click="clearScreen" type="text">清空筛选条件</el-button>
</div>
<el-button style="margin-left: 10px" @click="isSystoleForm" type="text"
>{{ isOpen ? "收起" : "展开"
}}<i
style="margin-left: 5px"
:class="isOpen ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
></i
></el-button>

<div
style="margin-left: auto; margin-right: 10px"
v-if="rec_index_downLoad"
>
<el-button @click="downLoad" icon="el-icon-download"> 导出</el-button>
</div>
</div>
</div>
</div>

<!-- 表格 -->
<div class="cen-tab">
@@ -372,6 +371,13 @@
@click="reWriteagain(row)"
>重新转写</el-button
>
<el-button
type="text"
v-if="permissions.rec_index_delete"
@click="deleteCS(row)"
>
删除接待
</el-button>
</template>
</avue-crud>
</div>
@@ -420,6 +426,8 @@
<script>
import { mapGetters } from "vuex";
import { exportMethodPost } from "@/util/util";
import { Loading } from "element-ui";

export default {
data() {
return {
@@ -672,6 +680,9 @@ export default {
if (this.$route.query.houseId) {
this.searchForm.projectId = this.$route.query.houseId;
}
if (this.$route.query.marketingBusiness) {
this.searchForm.marketingBusiness = [this.$route.query.marketingBusiness];
}

if (
this.$route.query.endDate &&
@@ -694,6 +705,26 @@ export default {
},

methods: {
// 删除接待
deleteCS(row) {
console.log(row);
this.$alert("确认删除此条记录吗?", `提示`, {
confirmButtonText: "确定",
cancelButtonText: "取消",
showCancelButton: true,
}).then(() => {
this.$api.http.deleteCS({ cusId: row.id }).then((res) => {
if (res.code == 10000) {
this.$message.success(res.message);
this.page.currentPage = 1;
this.findbypage();
} else {
this.$message.error(res.message);
}
});
});
},

// 获取话术
findQuestionList() {
axios({
@@ -732,7 +763,7 @@ export default {
// 转写方式数据获取
findTransferMethod() {
this.$api.api.findTransferMethod().then((res) => {
console.log(res,' sajdklasjdklasjdklsajkdls')
console.log(res, " sajdklasjdklasjdklsajkdls");
if (res.data) {
this.projectList = res.data || [];
this.languageList = (res.data && res.data[0].list) || [];
@@ -745,6 +776,12 @@ export default {
this.$message.error("请先选择转写方式");
return;
}
Loading.service({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
this.$api.api
.toTransferData({
id: this.currentRow.id,
@@ -755,6 +792,10 @@ export default {
this.dialogVisible = false;
this.getorgCode();
this.$message.success("操作成功");
Loading.close();
})
.catch(() => {
Loading.close();
});
},
reWriteagain(row) {
@@ -850,7 +891,7 @@ export default {
this.$api.api.findbypage(obj).then((res) => {
// console.log(res);
if (res.code == 0) {
this.tableData = res.data.records||[];
this.tableData = res.data.records || [];
this.page.total = res.data.total;
// 表格中设置ref属性,在数据渲染之后或者updated()之后
this.$nextTick(() => {
@@ -945,7 +986,7 @@ export default {
}
this.houseChange();
// 获取转写方式
this.findTransferMethod()
this.findTransferMethod();
// 获取销讲业务
this.getMarketingBusiness();
});


+ 840
- 0
src/views/Statistics/InvalidReceptionAnalysis.vue Wyświetl plik

@@ -0,0 +1,840 @@
<template>
<div class="pages">
<div class="app-titel" style="height: auto; padding: 26px">
<div class="screeningbox" style="display: flex; flex-wrap: wrap">
<div class="screeningbox" style="display: flex; align-items: center">
添加时间:
</div>
<el-radio-group
v-model="pageParams.dateType"
size="small"
@change="tabtimetap"
>
<el-radio-button :label="4">近7天</el-radio-button>
<el-radio-button :label="5">近15天</el-radio-button>
<el-radio-button :label="6">近30天</el-radio-button>
</el-radio-group>
<div style="margin-left: 26px">
<el-date-picker
style="width: 250px; height: 32px; line-height: 32px"
@change="confirmtime()"
v-model="customtime"
type="daterange"
range-separator="至"
value-format="yyyy-MM-dd"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</div>

<div style="width: 100%; display: flex">
<div class="items">
团队:
<el-select
v-model="pageParams.deptId"
clearable
placeholder="请选择"
>
<el-option
v-for="item in deptList"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select>
</div>
<div class="items">
接待顾问:
<el-select
v-model="pageParams.agentId"
clearable
placeholder="请选择"
>
<el-option
v-for="item in accountList"
:key="item.accountId"
:label="item.name"
:value="item.accountId"
>
</el-option>
</el-select>
</div>
<div class="items">
销讲业务:
<el-select
@change="changeSelect"
v-model="pageParams.marketingBusiness"
clearable
placeholder="请选择销讲业务"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.templateName"
:value="item.id"
>
</el-option>
</el-select>
</div>

<div class="items">
<el-button type="primary" @click="employeeUsageStatistics"
>筛选</el-button
>
<el-button type="text" @click="Emptycondition"
>清空筛选条件</el-button
>
</div>
</div>
</div>
</div>
<!-- <%--
<div class="screeningbox" style="margin-top: 20px; background: #fff">
--%> <%--
<button class="button1" @click="employeeUsageStatistics()">筛选</button
>--%> <%--
<button
style="background: #ffffff; color: #606775"
class="button1"
@click="Emptycondition()"
>
清空筛选条件</button
>--%> <%-- <button class="button1" @click="daochu()">导出</button>--%>
<%--
</div>
--%> -->

<div class="box-forhtml" v-for="(item, index) in objList" :key="index">
<div class="conbox">{{ item.name }}</div>
<div class="box-forhtml-flex">
<div class="left">
<div class="left-title">
{{ item.leftTitle }}
<!-- <%--
<el-tooltip :content="item.leftReason" placement="bottom-end"
>--%> <%-- <i class="el-icon-warning-outline"></i>--%> <%-- </el-tooltip
>--%> -->
</div>
<div class="Templatetable">
<div class="table-tit">
<div>排名</div>
<div>无效原因</div>
<div>接待数</div>
<div>占比</div>
<div>操作</div>
</div>
<template v-if="item.total > 0">
<div
class="table-cent"
v-for="(itcen, inde) in item.matchKeywords"
:key="inde"
>
<div
style="
display: flex;
align-items: center;
justify-content: center;
"
>
<img
v-if="inde == 0"
style="width: 30px; height: 30px"
src="https://zkgj.quhouse.com/static/images/system/images/ranking1.png"
alt=""
/>
<img
v-else-if="inde == 1"
style="width: 30px; height: 30px"
src="https://zkgj.quhouse.com/static/images/system/images/ranking2.png"
alt=""
/>
<img
v-else-if="inde == 2"
style="width: 30px; height: 30px"
src="https://zkgj.quhouse.com/static/images/system/images/ranking3.png"
alt=""
/>
<div v-else class="indeclass">{{ inde + 1 }}</div>
</div>
<div>{{ itcen.name }}</div>
<div>{{ itcen.count }}</div>
<div>{{ itcen.percent }}%</div>
<div
style="color: #2671e2; cursor: pointer"
@click="Toview(item, itcen)"
>
明细
</div>
</div>
</template>
<template v-else>
<div
style="
width: 100%;
line-height: 400px;
text-align: center;
color: #999999;
font-size: 16px;
"
>
暂无数据
</div>
</template>
</div>
</div>
<div class="right">
<div class="right-title">
<div>
{{ item.leftTitle }}
</div>

<div class="export">
<el-button type="primary" @click="exportExcel(item.url)"
>导出</el-button
>
</div>
</div>
<div
:id="item.id"
class="container"
style="width: 100%; height: 400px; text-align: center"
>
<img
v-if="item.total == 0"
style="width: 400px; height: 400px"
src="https://zkgj.quhouse.com/static/images/system/images/Elementcircle.png"
alt=""
/>
</div>
</div>
</div>
</div>
</div>
</template>

<script>
import * as echarts from "echarts";
import { exportMethodPost } from "@/util/util";
export default {
data() {
return {
pageParams: {
dateType: 5, // 4 近七天 5 十五天 6 三十天
startTime: "", // 开始时间
endTime: "", // 结束时间
houseId: "", // 项目id
agentId: "", // 顾问id
deptId: "", // 部门id
marketingBusiness: "", // 销讲业务
},
customtime: [], // 时间段选择
tableData: [], // 员工分析列表
loading: false,

deptList: [], // 部门/团队列表
accountList: [], // 顾问列表
objList: [
{
name: "无效接待分布",
title: "接待总数",
matchKeywords: [],
id: "deptName", // echarts渲染的盒子id
total: 0, // 接待总数
leftReason: `原因1:无录音(离线接待).
原因2:无录音(无设备).
原因3:无录音(录音时间小于1分钟).
原因4:选择的无效原因.`, // 左侧原因
rightReason: `1:没电指派无有效录音.
2:离线指派无有效录音.
3:系统测试.
4:非接访场景录音.
5:其它.`, // 右侧原因
leftTitle: "无效原因排名", // 左侧小标题
rightTitle: "无效原因占比", // 右侧小标题
url: "/customer/invalidReceptionRankExport", // 导出接口get请求
},
], // 数据合集包含 无效接待分布
options: [], // 列表
myChart: null, // 图表实例对象
};
},
created() {
this.pageParams.houseId = localStorage.getItem("houseId");
},

mounted() {
// 员工使用统计
this.initPage();
},

methods: {
// 销讲业务模板
getMarketingBusiness() {
this.$api.http
.marketingBusiness({
houseId: this.pageParams.houseId,
})
.then((res) => {
if (res.code == 10000) {
this.options = res.data;
}
});
},
// 初始化页面
initPage() {
this.getAllDeptName();
this.getAllAccountName();
this.employeeUsageStatistics();
this.getMarketingBusiness();
},
changeSelect() {
this.employeeUsageStatistics();
},
// 部门
getAllDeptName() {
this.$api.http
.getAllDeptName({ itemId: this.pageParams.houseId })
.then((res) => {
if (res.code == 10000) {
this.deptList = res.data;
}
});
},

// 顾问
getAllAccountName() {
this.$api.http
.getAllAccountName({ itemId: this.pageParams.houseId })
.then((res) => {
if (res.code == 10000) {
this.accountList = res.data;
}
});
},

// 获取员工使用统计
employeeUsageStatistics() {
this.$api.http.invalidReceptionRank(this.pageParams).then((res) => {
console.log(res, "sadlka;ldkls;");
if (res.code == 10000) {
let result = res.data;
this.objList[0].matchKeywords = result.list;
this.objList[0].total = result.sum;
let isEmpty =
this.objList[0].matchKeywords.filter((item) => item.count != 0)
.length > 0;
if (!isEmpty) this.myChart && this.myChart.clear();
this.myChartinit(this.objList[0], isEmpty);
}
});
},

//导出表格
// TO DO
exportExcel(url) {
exportMethodPost(`/autoSR/audit/reception/invalidReceptionRankExport`,'无效接待分析', this.pageParams)
// let str = "?";
// for (let i in this.pageParams) {
// str += i + "=" + (this.pageParams[i] || "") + "&";
// }
// window.location.href = "${jypath}" + url + str.substr(0, str.length - 1);
},

//清空筛选条件
Emptycondition() {
this.pageParams = {
dateType: 5, // 4 近七天 5 十五天 6 三十天
startTime: "", // 开始时间
endTime: "", // 结束时间
houseId: localStorage.getItem("houseId"), // 项目id
agentId: "", // 顾问id
deptId: "", // 部门id
marketingBusiness: "", // 销讲业务
};
this.customtime = [];
this.employeeUsageStatistics();
},

resetParamsTime() {
this.pageParams.pageNum = 1;
this.pageParams.pageSize = 1;
this.pageParams.startTime = "";
this.pageParams.endTime = "";
},

//时间tab切换
tabtimetap() {
this.resetParamsTime();
this.employeeUsageStatistics();
},

//时间选择
confirmtime() {
if (this.customtime.length) {
this.pageParams.dateType = null;
this.pageParams.startTime = this.customtime[0];
this.pageParams.endTime = this.customtime[1];
this.employeeUsageStatistics();
}
},

// 查看详情
Toview(item, items) {
let obj = {
...this.pageParams,
accountId: this.pageParams.agentId, // 顾问id
invalidReason: items.id,
};
if (this.pageParams.dateType == 4) {
obj.dateType = 2;
} else if (this.pageParams.dateType == 5) {
// 4 近七天 5 十五天 6 三十天
this.customtime = this.getTimeArea(15);
obj.date = this.customtime.join(","); // 筛选时间
} else if (this.pageParams.dateType == 6) {
this.customtime = this.getTimeArea(30);
obj.date = this.customtime.join(","); // 筛选时间
} else {
obj.date = this.customtime.join(","); // 筛选时间
}

this.$router.push({
path: "/ReceivingRecords/index",
query: obj,
});
},

// 获取时间段
getTimeArea(x = 1) {
let starTime = new Date().getTime() - 24 * 60 * 60 * 1000 * x;
let startDate = `${new Date(starTime).getFullYear()}-${
new Date(starTime).getMonth() + 1
}-${new Date(starTime).getDate()}`;
let endTime = new Date().getTime() - 24 * 60 * 60 * 1000;
let endDate = `${new Date(endTime).getFullYear()}-${
new Date(endTime).getMonth() + 1
}-${new Date(endTime).getDate()}`;

return [startDate, endDate];
},

// 初始化表格
myChartinit(item, empity) {
this.myChart = echarts.init(document.getElementById(item.id));
let objoptlis = [];
let option = {};
if (!empity) {
option.title = {
text: "暂无数据",
x: "center",
y: "center",
textStyle: {
fontSize: 14,
fontWeight: "normal",
},
};
} else {
item.matchKeywords.forEach((ice) => {
objoptlis.push({
value: ice.count,
name: ice.name,
percent: ice.percent,
});
});
option = {
color: [
"#66AFF5",
"#FABD2B",
"#6F8EDC",
"#FFCF8F",
"#F98120",
"#1CC99E",
"#9474FB",
"#657292",
"#7A6A99",
"#BF5D52",
"#EE6666",
"#77B7E4",
"#E6A065",
"#9D5139",
"#C1AA88",
"#F87F7A",
"#F6CF74",
"#7F5506",
"#88BB9B",
"#6E99AA",
"#5789D0",
],
tooltip: {
show: true,
trigger: "item",
formatter: (data) => {
console.log(data);
return (
data.data.name +
" " +
data.data.value +
"(" +
data.data.percent +
"%)"
);
},
},
legend: {
type: "scroll",
data: objoptlis,
bottom: 0,
},
graphic: [
{
type: "text",
left: "center",
top: "42%",
style: {
text: item.total,
textAlign: "center",
fill: "#000",
width: 30,
height: 30,
fontSize: 24,
color: "#32363D",
fontFamily: "Microsoft YaHei",
},
},
{
type: "text",
left: "center",
top: "55%",
style: {
text: item.title,
textAlign: "center",
fill: "#000",
width: 30,
height: 30,
fontSize: 16,
color: "#666666",
},
},
],
series: [
{
name: "",
type: "pie",
radius: ["48%", "70%"],
avoidLabelOverlap: true,
data: objoptlis,
label: {
show: true,
},
},
],
};
}
this.myChart.setOption(option);
},
},
};
</script>


<style lang="scss" scoped>
.app-titel {
padding: 20px 24px;
width: 100%;
/*min-height: 80px;*/
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 8px;
display: flex;
flex-wrap: wrap;
}

.app-titel .items {
margin: 20px 24px 0 0;
}

.toptimeqhuan {
width: 190px;
height: 32px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #e0e0e0;
display: flex;
align-items: center;
overflow: hidden;
margin-left: 30px;
cursor: pointer;
}

.toptimeqhuan div {
flex: 1;
text-align: center;
line-height: 32px;
font-size: 16px;
}

.tophove {
color: #ffffff;
background: #2671e2;
}

.app-box {
width: 100%;
padding-bottom: 20px;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 8px;
padding-top: 20px;
padding-left: 30px;
padding-right: 30px;
margin-top: 30px;
}

.conbox {
height: 18px;
font-size: 18px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #32363d;
line-height: 18px;
}

/*.con-bodeer-box{*/
/* width: 100%;height: 113px;*/
/* border-radius: 4px;border: 1px solid #E0E0E0;margin-top: 20px;*/
/*}*/
/*.con-bodeer-box .con-flex{*/
/* width: 100%;height: 56px;display: flex;align-items: center;*/
/*}*/
/*.con-bodeer-box .con-flex div{*/
/* flex: 1;text-align: center;line-height: 56px;font-size: 16px;*/
/*}*/
.box-forhtml {
width: 100%;
min-height: 400px;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 8px;
padding: 20px 30px;
margin-top: 30px;
}

.box-forhtml-flex {
position: relative;
width: 100%;
display: flex;
margin-top: 20px;
}

.box-forhtml-flex .right .right-title {
display: flex;
justify-content: space-between;
}

.box-forhtml-flex .left .left-title,
.box-forhtml-flex .right .right-title {
padding: 12px 0;
width: 100%;
}

.box-forhtml-flex .left {
width: 50%;
min-height: 320px;
}

.box-forhtml-flex .right {
width: 50%;
min-height: 330px;
display: flex;
flex-direction: column;
align-items: center;
}

.Templatetable {
width: 88%;
height: 100%;
margin: 0 auto;
overflow-y: auto;
}

.table-tit {
width: 100%;
height: 20px;
line-height: 20px;
display: flex;
}

.table-tit > div:nth-of-type(1) {
width: 10%;
text-align: center;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #606775;
}

.table-tit > div:nth-of-type(2) {
width: 40%;
text-align: center;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #606775;
}

.table-tit > div:nth-of-type(3) {
width: 20%;
text-align: center;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #606775;
}

.table-tit > div:nth-of-type(4) {
width: 20%;
text-align: center;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #606775;
}

.table-tit > div:nth-of-type(5) {
width: 10%;
text-align: center;
font-size: 16px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #606775;
}

.table-cent {
padding: 5px 0;
width: 100%;
display: flex;
margin-top: 10px;
}

.table-cent > div:nth-of-type(1) {
width: 10%;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #32363d;
}

.table-cent > div:nth-of-type(2) {
width: 40%;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #32363d;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.table-cent > div:nth-of-type(3) {
width: 20%;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #32363d;
}

.table-cent > div:nth-of-type(4) {
width: 20%;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #32363d;
}

.table-cent > div:nth-of-type(5) {
width: 10%;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
color: #32363d;
}

.indeclass {
width: 20px;
height: 20px;
border-radius: 50%;
background: #ecf1ff;
color: #ffffff;
text-align: center;
line-height: 20px;
font-size: 14px;
}

.el-date-editor .el-range__icon {
line-height: 25px;
}

.el-date-editor .el-range-separator {
line-height: 25px;
}

.el-date-editor .el-range-input,
.el-date-editor .el-range-separator {
margin: 3px;
}

.con-bodeer-box {
width: 100%;
height: 113px;
border-radius: 4px;
border: 1px solid #e0e0e0;
margin-top: 20px;
}

.con-bodeer-box .con-flex {
width: 100%;
height: 56px;
display: flex;
align-items: center;
}

.con-bodeer-box .con-flex div {
flex: 1;
text-align: center;
line-height: 56px;
font-size: 16px;
}

.backTopbox {
width: 40px;
height: 40px;
border-radius: 50%;
background: #d0edff;
position: fixed;
bottom: 40px;
right: 40px;
border: none;
display: flex;
align-items: center;
justify-content: center;
}

.backTop {
display: block;
width: 16px;
height: 20px;
}

.btns {
width: 90px;
height: 40px;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
background: #2671e2;
border-radius: 8px;
}
</style>

+ 488
- 0
src/views/Template/invalidReception.vue Wyświetl plik

@@ -0,0 +1,488 @@
<template>
<div class="box-center">
<!-- 头 -->
<div class="app-top">
<div style="margin-left: 20px; display: flex">
<el-button @click="editorinfo()" type="primary">新增 </el-button>
<div style="margin-left: auto; margin-right: 10px"></div>
</div>
</div>

<!-- 表格 -->
<div class="cen-tab">
<el-table
ref="tableSortable"
:data="tableData"
stripe
style="width: 100%; height: 400px"
row-key="id"
>
<el-table-column label="序号" prop="sort" align="center">
</el-table-column>
<el-table-column
prop="name"
label="无效原因"
align="center"
></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="{ row }" style="">
<el-button type="text" @click="bianji(row)">编辑</el-button>
<el-button type="text" @click="del(row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>

<el-dialog
:title="editFlag ? '编辑' : '新增'"
:visible.sync="dialogVisible"
@close="$refs.ruleForm.resetFields()"
>
<el-form
:model="ruleForm"
label-position="labelPosition"
:rules="ruleser"
ref="ruleForm"
label-width="140px"
style="width: 60%; margin: 0 auto"
>
<el-form-item label="无效原因" prop="name">
<el-input v-model="ruleForm.name" maxlength="8" clearable></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取 消</el-button>
<el-button type="primary" :loading="loadingFlag" @click="addForm"
>保存
</el-button>
</div>
</el-dialog>

<el-dialog
title="删除来源"
:visible.sync="delVisible"
@close="$refs.ruleForm.resetFields()"
>
<div style="text-align: center; margin-bottom: 20px">
请将此无效的接待转移到以下无效原因中
</div>
<el-form
:model="ruleForm"
label-position="labelPosition"
:rules="ruleser"
ref="ruleForm"
label-width="140px"
style="width: 60%; margin: 0 auto"
>
<el-form-item label="无效接待移至" prop="moveId">
<el-select v-model="deleteParams.moveId" placeholder="请选择">
<el-option
v-for="item in delIdList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
@click="
delVisible = false;
deleteParams.id = '';
"
>取 消</el-button
>
<el-button type="primary" :loading="loadingFlag" @click="deleteItem"
>保存
</el-button>
</div>
</el-dialog>
</div>
</template>



<script>
import Sortable from "sortablejs";
import { Loading } from "element-ui";
export default {
data() {
return {
currentPage4: 1,
value: "",
input: "",
tableData: [],
multipleSelection: [],
dialogVisible: false,
loadingFlag: false,
delVisible: false,
orgType: localStorage.getItem("orgType"),
ruleForm: {
id: "",
name: "", //
houseId: localStorage.getItem("houseId"), // 项目id
},
houseId: "",
houseList: [],
Page: 1,
size: 10,
words: "",
total: 0,
ruleser: {
name: [{ required: true, message: "请填写客户来源", trigger: "blur" }],
},
editFlag: false,

paramsList: {
// 列表入参
id: "",
name: "", // 资源名称
houseId: localStorage.getItem("houseId"), // 项目id
sort: "", // 顺序
},
deleteParams: {
// 删除入参
id: "",
moveId: "",
sort: "", // 序号
houseId: localStorage.getItem("houseId"), // 项目id
},
delIdList: [], // 要转移的数据位置

editParams: {
// 编辑这一项
id: "", //
name: "", //
houseId: localStorage.getItem("houseId"), // 项目id
},

loadingObj: null,
};
},
mounted() {
this.$nextTick(() => {
this.rowDrop();
});
this.getList();
},
methods: {
/*判断类型选择使用方法*/
addForm() {
if (!this.editFlag) this.addCustomer();
else this.editCustomer();
},

// 初始化提交变量
initRuleForm() {
this.ruleForm = {
id: "",
name: "", //
houseId: localStorage.getItem("houseId"), // 项目id
};
},

// 确认添加
addCustomer() {
this.$refs.ruleForm.validate((valid) => {
if (!valid) return;
this.$api.http
.InvalidReceptionAddInvalid({
name: this.ruleForm.name,
houseId: this.paramsList.houseId,
})
.then((res) => {
if (res.code == 10000) {
this.$message({
message: res.message,
type: "success",
});
this.initRuleForm();
this.getList();
} else {
this.$message({
message: res.message,
type: "error",
});
}
this.dialogVisible = false;
})
.catch(() => {
this.dialogVisible = false;
});
});
},

// 编辑
editCustomer() {
this.$refs.ruleForm.validate((valid) => {
if (!valid) return;
this.$api.http
.InvalidReceptionUpdateInvalid(this.ruleForm)
.then((res) => {
this.dialogVisible = false;
if (res.code == 10000) {
this.$message({
message: res.message,
type: "success",
});
this.initRuleForm();
this.getList();
} else {
this.$message({
message: res.message,
type: "error",
});
}
})
.catch(() => {
this.dialogVisible = false;
});
});
},

// 删除确认删除item
deleteItem() {
if (!this.deleteParams.moveId) {
this.$message({
message: "请将此无效的接待转移到以下无效原因中",
type: "error",
});
return;
}
this.$api.http
.InvalidReceptionDelete(this.deleteParams)
.then((res) => {
console.log(res);
this.delVisible = false;
if (res.code == 10000) {
this.$message({
message: res.message,
type: "success",
});
} else {
this.$message({
message: res.message,
type: "error",
});
}
this.deleteParams.moveId = "";
this.getList();
})
.catch(() => {
this.delVisible = false;
});
},

// 获取列表
getList() {
this.$api.http
.InvalidReceptionReasonList({
houseId: this.paramsList.houseId,
})
.then((res) => {
if (res.code == 10000) {
this.tableData = res.data.filter(
(item) => item.id != 6 && item.id != 7 && item.id != 5
);
}
this.$nextTick(() => {
this.loadingObj.close();
});
})
.catch(() => {
this.$nextTick(() => {
this.loadingObj.close();
});
});
},

//行拖拽
rowDrop() {
const transfer = this.$refs.tableSortable.$el;
const tbody = transfer
.getElementsByClassName("el-table__body-wrapper")[0]
.getElementsByClassName("el-table__body")[0]
.getElementsByTagName("tbody")[0];
console.log(tbody, "tbody");
Sortable.create(tbody, {
animation: 100,
onEnd: ({ newIndex, oldIndex }) => {
console.log(newIndex, oldIndex);
if (newIndex == oldIndex) {
return;
}

this.loadingObj = Loading.service({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});

this.$api.http
.InvalidReceptionUpdateSort({
houseId: this.paramsList.houseId,
id: this.tableData[newIndex].id,
sort: this.tableData[oldIndex].sort,
moveId: this.tableData[oldIndex].id, // 更换的id
moveSort: this.tableData[newIndex].sort, // 更换的序号
})
.then((res) => {
console.log(res);
if (res.code == 10000) {
this.$message({
message: res.message,
type: "success",
});
this.tableData = [];
this.getList();
} else {
this.$message({
message: res.message,
type: "error",
});

this.loadingObj.close();
}
});
},
});
},
//删除
del(item) {
this.delIdList = [];
this.deleteParams.id = item.id;
this.deleteParams.sort = item.sort;
let arr = [];
this.tableData.forEach((items) => {
if (items.id != item.id) {
arr.push({
label: items.name,
value: items.id,
});
}
});
console.log(arr);
this.delIdList = arr;
this.delVisible = true;
},

//编辑
bianji(row) {
this.dialogVisible = true;
this.ruleForm.name = row.name;
this.ruleForm.id = row.id;
this.editFlag = true;
},

editorinfo() {
this.dialogVisible = true;
this.editFlag = false;
this.ruleForm.editFlag = "";
},
},
};
</script>


<style lang="scss" scoped>
.box-center {
width: 100%;
min-height: 100%;
padding: 15px;
min-width: 1000px;
padding-bottom: 100px;
}

.cen-tab {
width: 100%;
padding: 15px;
background: #ffffff;
margin-top: 15px;
min-height: 100%;
}

.tophove {
color: #ffffff;
background: #2671e2;
}

.dtit-box {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
}

.div-lab1 {
display: flex;
align-items: center;
margin: 5px;
}

.label1 {
font-size: 14px;
color: #32363d;
line-height: 32px;
margin-left: 6px;
}

.app-top {
width: 100%;
background: #ffffff;
box-shadow: 0px 0px 12px 0px rgba(0, 0, 0, 0.04);
border-radius: 4px;
padding-top: 15px;
padding-bottom: 15px;
}

.app-titel {
width: 100%;
display: flex;
align-items: center;
flex-wrap: wrap;
}

.label {
font-size: 14px;
font-weight: 400;
color: #32363d;
line-height: 32px;
margin-left: 15px;
min-width: 100px;
text-align: right;
}

.toptimeqhuan {
height: 30px;
background: #ffffff;
display: flex;
align-items: center;
}

.toptimeqhuan div {
padding-left: 20px;
padding-right: 20px;
text-align: center;
line-height: 30px;
font-size: 14px;
margin-right: 15px;
border-radius: 4px;
border: 1px solid #e0e0e0;
}

.div-lab {
display: flex;
margin: 5px;
}

.div-inp {
width: 250px;
}

.el-tooltip__popper {
max-width: 300px;
}
</style>

+ 8
- 0
src/views/building/index.vue Wyświetl plik

@@ -374,6 +374,13 @@
</el-radio-group>
</el-form-item>

<el-form-item label="无效接待审核" prop="auditReception">
<el-radio-group v-model="ruleForm.auditReception">
<el-radio :label="0">审核</el-radio>
<el-radio :label="1">不审核</el-radio>
</el-radio-group>
</el-form-item>

<el-form-item label="联系人" prop="linkman">
<el-input
v-model="ruleForm.linkman"
@@ -892,6 +899,7 @@ export default {
transliterationMethod: '',//转写方式
language:'',//语言
shortRecordingSetting: 0, // 短录音是否转写 是否转写短录音 0 转写(默认) 1 不转写
auditReception: 1, // 无效接待审核 0 审核 1不审核
},
ruleForm1: {},
optionsagentId: [],


Ładowanie…
Anuluj
Zapisz