Merge pull request #61 from dderbentsov/UC-22
WIP поправил mock и отображение данных из него в таблице
This commit is contained in:
414
server.js
414
server.js
@@ -1,41 +1,175 @@
|
|||||||
import { createServer } from "miragejs";
|
import { createServer } from "miragejs";
|
||||||
|
|
||||||
const dataClients = [
|
const dataClients = {
|
||||||
|
count: 4,
|
||||||
|
next: null,
|
||||||
|
previous: null,
|
||||||
|
results: [
|
||||||
{
|
{
|
||||||
id: "1",
|
id: "14ff401c-2b7b-4d9a-9159-720c74d8b23c",
|
||||||
last_name: "Вильгейльм",
|
last_name: "Гагарин",
|
||||||
first_name: "Арнольд",
|
first_name: "Юрий",
|
||||||
patronymic: "Витальевич",
|
patronymic: "Алексеевич",
|
||||||
identity_document_to_person: {
|
birth_date: "1994-12-04",
|
||||||
pass: {
|
priority: 1,
|
||||||
number: {
|
contacts: [
|
||||||
value: "5261 918732",
|
{
|
||||||
copy: true,
|
id: "92d19144-8c1d-4061-a9c4-755ee2d4ead1",
|
||||||
|
kind: "EMAIL",
|
||||||
|
username: "gagarin@yandex.ru",
|
||||||
},
|
},
|
||||||
issuedBy: {
|
{
|
||||||
value: "Отделом УФМС России по рязанской области",
|
id: "92d13223-8c1d-4061-a9c4-8155344eae23",
|
||||||
|
kind: "TELEGRAM",
|
||||||
|
username: "+79309856765",
|
||||||
},
|
},
|
||||||
divisionCode: {
|
],
|
||||||
value: "426–234",
|
identity_documents: [
|
||||||
|
{
|
||||||
|
id: "9023ce5c-4a9a-4c0d-a777-a2d7d2690ec3",
|
||||||
|
created_at: "2022-10-20T22:01:09.201794Z",
|
||||||
|
updated_at: "2022-10-24T15:44:29.235350Z",
|
||||||
|
deleted_flg: false,
|
||||||
|
kind: "Паспорт",
|
||||||
|
numba: "1233 123312",
|
||||||
|
issued_by_org: "Отделом УФМС России по рязанской области",
|
||||||
|
issued_by_date: "2022-10-10",
|
||||||
|
issued_by_org_code: "426–234",
|
||||||
|
created_by: null,
|
||||||
|
updated_by: null,
|
||||||
|
person_id: "14ff401c-2b7b-4d9a-9159-720c74d8b23c",
|
||||||
},
|
},
|
||||||
dateIssue: {
|
],
|
||||||
value: "02.04.2022",
|
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "db831a14-e836-481f-a653-6325de7c311e",
|
||||||
|
last_name: "Жмыхов",
|
||||||
|
first_name: "Егор",
|
||||||
|
patronymic: "Сергеевич",
|
||||||
|
birth_date: "1997-09-03",
|
||||||
|
priority: 3,
|
||||||
|
contacts: [
|
||||||
|
{
|
||||||
|
id: "d2dd7cf2-e4a4-41d7-8987-381ea827da0a",
|
||||||
|
kind: "PHONE",
|
||||||
|
username: "+79991239988",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "dak2b4n4-669e-4c18-8b7e-fsk7261f82m1",
|
||||||
|
kind: "VK",
|
||||||
|
username: "@id13592839",
|
||||||
},
|
},
|
||||||
note_to_person: {
|
],
|
||||||
basic_info: {
|
identity_documents: [
|
||||||
age: "34",
|
{
|
||||||
jobTitle: "Менеджер",
|
id: "np334sw24-4a9a-4c0d-a777-zr348cv4bv",
|
||||||
priority: "Высокий",
|
created_at: "2022-10-20T22:01:09.201794Z",
|
||||||
phone: "+7 (915) 657–21–14",
|
updated_at: "2022-10-24T15:44:29.235350Z",
|
||||||
email: "Superboyband@yandex.ru",
|
deleted_flg: false,
|
||||||
networks: [],
|
kind: "Паспорт",
|
||||||
meeting: {
|
numba: "9543 547021",
|
||||||
date: "02.06.22",
|
issued_by_org: "Отделом УФМС России по владимирской области",
|
||||||
time: "18:30–19:30",
|
issued_by_date: "2014-09-08",
|
||||||
|
issued_by_org_code: "743–126",
|
||||||
|
created_by: null,
|
||||||
|
updated_by: null,
|
||||||
|
person_id: "db831a14-e836-481f-a653-6325de7c311e",
|
||||||
},
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "db8jd58x-e836-481f-a653-oq1m4e7c09e1",
|
||||||
|
last_name: "Калинкин",
|
||||||
|
first_name: "Дмитрий",
|
||||||
|
patronymic: "Александрович",
|
||||||
|
birth_date: "1990-11-05",
|
||||||
|
priority: 2,
|
||||||
|
contacts: [
|
||||||
|
{
|
||||||
|
id: "ds81ncf2-1e3v-41d7-0127-381323n6da0a",
|
||||||
|
kind: "PHONE",
|
||||||
|
username: "+79208324523",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "lc5n7cf2-1m9v-41d7-12z7-kdj5j8821cm7",
|
||||||
|
kind: "EMAIL",
|
||||||
|
username: "kalindm@gmail.com",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "1f0323n2-669e-xzv9-8b7e-dk11nsd882kd",
|
||||||
|
kind: "DISCORD",
|
||||||
|
username: "kalin123",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "ds4323n2-669e-xzv9-8b7e-vkj2mcv05sx2",
|
||||||
|
kind: "TELEGRAM",
|
||||||
|
username: "+79208324523",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
identity_documents: [
|
||||||
|
{
|
||||||
|
id: "ob234uf432-e836-481f-a653-334qq9sdw22",
|
||||||
|
created_at: "2022-10-20T22:01:09.201794Z",
|
||||||
|
updated_at: "2022-10-24T15:44:29.235350Z",
|
||||||
|
deleted_flg: false,
|
||||||
|
kind: "Паспорт",
|
||||||
|
numba: "4308 205732",
|
||||||
|
issued_by_org: "Отделом УФМС России по московской области",
|
||||||
|
issued_by_date: "2018-11-03",
|
||||||
|
issued_by_org_code: "902–571",
|
||||||
|
created_by: null,
|
||||||
|
updated_by: null,
|
||||||
|
person_id: "db8jd58x-e836-481f-a653-oq1m4e7c09e1",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "cs5ms771-e836-kdc4-a653-sc4n567sx123",
|
||||||
|
last_name: "Артышова",
|
||||||
|
first_name: "Юлия",
|
||||||
|
patronymic: "Андреевна",
|
||||||
|
birth_date: "2000-08-17",
|
||||||
|
priority: null,
|
||||||
|
contacts: [
|
||||||
|
{
|
||||||
|
id: "d2dd7cf2-e4a4-41d7-8987-381ea827da0a",
|
||||||
|
kind: "PHONE",
|
||||||
|
username: "+79238433421",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "34cka2k5-669e-4c18-8b7e-34ncv82224mv",
|
||||||
|
kind: "VK",
|
||||||
|
username: "@id382804",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "jdf921nx-669e-4c18-8b7e-cvx722mvu6o2",
|
||||||
|
kind: "DISCORD",
|
||||||
|
username: "artshow23",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
identity_documents: [
|
||||||
|
{
|
||||||
|
id: "3nb4v223-e836-481f-a653-9012nf3b2",
|
||||||
|
created_at: "2022-10-20T22:01:09.201794Z",
|
||||||
|
updated_at: "2022-10-24T15:44:29.235350Z",
|
||||||
|
deleted_flg: false,
|
||||||
|
kind: "Паспорт",
|
||||||
|
numba: "1602 671922",
|
||||||
|
issued_by_org: "Отделом УФМС России по тульской области",
|
||||||
|
issued_by_date: "2017-01-21",
|
||||||
|
issued_by_org_code: "101–238",
|
||||||
|
created_by: null,
|
||||||
|
updated_by: null,
|
||||||
|
person_id: "cs5ms771-e836-kdc4-a653-sc4n567sx123",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
const clientDetail = [
|
||||||
|
{
|
||||||
|
person_id: "14ff401c-2b7b-4d9a-9159-720c74d8b23c",
|
||||||
additional_info: {
|
additional_info: {
|
||||||
snils: {
|
snils: {
|
||||||
number: {
|
number: {
|
||||||
@@ -51,7 +185,7 @@ const dataClients = [
|
|||||||
},
|
},
|
||||||
birthday: {
|
birthday: {
|
||||||
date: {
|
date: {
|
||||||
value: "21.04.1999",
|
value: "1994-12-04",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
addresses: {
|
addresses: {
|
||||||
@@ -118,42 +252,8 @@ const dataClients = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "2",
|
person_id: "db831a14-e836-481f-a653-6325de7c311e",
|
||||||
last_name: "Астафоркина",
|
|
||||||
first_name: "Екатерина",
|
|
||||||
patronymic: "Геннадьевна",
|
|
||||||
identity_document_to_person: {
|
|
||||||
pass: {
|
|
||||||
number: {
|
|
||||||
value: "1324 103496",
|
|
||||||
copy: true,
|
|
||||||
},
|
|
||||||
issuedBy: {
|
|
||||||
value: "Отделом УФМС России по владимирской области",
|
|
||||||
},
|
|
||||||
divisionCode: {
|
|
||||||
value: "675–901",
|
|
||||||
},
|
|
||||||
dateIssue: {
|
|
||||||
value: "01.01.2011",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
note_to_person: {
|
|
||||||
basic_info: {
|
|
||||||
age: "54",
|
|
||||||
jobTitle: "Менеджер",
|
|
||||||
priority: "-",
|
|
||||||
phone: "+7 (574) 364–53–36",
|
|
||||||
email: "antimag@gmail.com",
|
|
||||||
networks: [],
|
|
||||||
meeting: {
|
|
||||||
date: "14.07.22",
|
|
||||||
time: "17:30–21:30",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
additional_info: {
|
additional_info: {
|
||||||
snils: {
|
snils: {
|
||||||
number: {
|
number: {
|
||||||
@@ -169,7 +269,7 @@ const dataClients = [
|
|||||||
},
|
},
|
||||||
birthday: {
|
birthday: {
|
||||||
date: {
|
date: {
|
||||||
value: "07.12.1993",
|
value: "1997-09-03",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
addresses: {
|
addresses: {
|
||||||
@@ -234,19 +334,179 @@ const dataClients = [
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
person_id: "db8jd58x-e836-481f-a653-oq1m4e7c09e1",
|
||||||
|
additional_info: {
|
||||||
|
snils: {
|
||||||
|
number: {
|
||||||
|
value: "812–183–139 21",
|
||||||
|
copy: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inn: {
|
||||||
|
number: {
|
||||||
|
value: "138291382731",
|
||||||
|
copy: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
birthday: {
|
||||||
|
date: {
|
||||||
|
value: "1990-11-05",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
addresses: {
|
||||||
|
registrationPlace: {
|
||||||
|
value:
|
||||||
|
"371311, Московская обл., г. Москва, ул. Комсомольская, д.6, кв. 13",
|
||||||
|
},
|
||||||
|
actualPlace: {
|
||||||
|
value:
|
||||||
|
"371311, Московская обл., г. Москва, ул. Комсомольская, д.6, кв. 13",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
docs: [
|
||||||
|
{
|
||||||
|
name: "Договор оферты.pdf",
|
||||||
|
type: "application/pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Договор о долевом строительстве.pdf",
|
||||||
|
type: "application/pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Какое-то очень очень очень очень длинное название.doc",
|
||||||
|
type: "application/msword",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Договор об оплате.doc",
|
||||||
|
type: "application/msword",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Коммерческое предложение.xls",
|
||||||
|
type: "application/vnd.ms-excel",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Таблица заказов.xls",
|
||||||
|
type: "application/vnd.ms-excel",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
additional: [
|
||||||
|
{
|
||||||
|
header: "Предпочтения",
|
||||||
|
value: "Разговор на “Вы”\nТолько по делу\nТолько официальный стиль",
|
||||||
|
name: "",
|
||||||
|
type: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: "Доп.документы",
|
||||||
|
value: "",
|
||||||
|
name: "Памятка с вопросами на созвоне.pdf",
|
||||||
|
type: "application/pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: "Его должность",
|
||||||
|
value: "Вроде бы важная шишка, пусть будет – Гуру в дизайне",
|
||||||
|
name: "",
|
||||||
|
type: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: "Чтобы не забыть",
|
||||||
|
value: "Не забудь!",
|
||||||
|
name: "",
|
||||||
|
type: "",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
person_id: "cs5ms771-e836-kdc4-a653-sc4n567sx123",
|
||||||
|
additional_info: {
|
||||||
|
snils: {
|
||||||
|
number: {
|
||||||
|
value: "834–001–555 35",
|
||||||
|
copy: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
inn: {
|
||||||
|
number: {
|
||||||
|
value: "371942327342",
|
||||||
|
copy: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
birthday: {
|
||||||
|
date: {
|
||||||
|
value: "2000-08-17",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
addresses: {
|
||||||
|
registrationPlace: {
|
||||||
|
value:
|
||||||
|
"371311, Московская обл., г. Владимир, ул. Гагарина, д.12, кв. 24",
|
||||||
|
},
|
||||||
|
actualPlace: {
|
||||||
|
value:
|
||||||
|
"371311, Московская обл., г. Владимир, ул. Гагарина, д.12, кв. 24",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
docs: [
|
||||||
|
{
|
||||||
|
name: "Договор покупки.pdf",
|
||||||
|
type: "application/pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Договор о оптовых поставках.pdf",
|
||||||
|
type: "application/pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Договор о предоставлении услуг.pdf",
|
||||||
|
type: "application/pdf",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Какое-то очень очень очень очень короткое название.doc",
|
||||||
|
type: "application/msword",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Документация.doc",
|
||||||
|
type: "application/msword",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Отчет.xls",
|
||||||
|
type: "application/vnd.ms-excel",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Заказы.xls",
|
||||||
|
type: "application/vnd.ms-excel",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
additional: [
|
||||||
|
{
|
||||||
|
header: "По каким вопросам обращатся",
|
||||||
|
value: "Обращатся только по вопросам закупок",
|
||||||
|
name: "",
|
||||||
|
type: "",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: "Доп.документы",
|
||||||
|
value: "Ответственные за работу",
|
||||||
|
name: "Список ответсвенных.xls",
|
||||||
|
type: "application/vnd.ms-excel",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
header: "Портфолио",
|
||||||
|
value: "Информация о клиенте",
|
||||||
|
name: "Портфолио.doc",
|
||||||
|
type: "application/msword",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export function clientsServer() {
|
export function clientsServer() {
|
||||||
createServer({
|
createServer({
|
||||||
routes() {
|
routes() {
|
||||||
this.get("/api/clients", () => {
|
this.get("/api/clients", () => {
|
||||||
return dataClients.map((el) => ({
|
return dataClients;
|
||||||
...el.note_to_person.basic_info,
|
|
||||||
id: el.id,
|
|
||||||
last_name: el.last_name,
|
|
||||||
first_name: el.first_name,
|
|
||||||
patronymic: el.patronymic,
|
|
||||||
}));
|
|
||||||
});
|
});
|
||||||
this.get("/registry/event/", () => ({
|
this.get("/registry/event/", () => ({
|
||||||
count: 4,
|
count: 4,
|
||||||
@@ -483,12 +743,12 @@ export function clientsServer() {
|
|||||||
this.passthrough("http://45.84.227.122:8080/**");
|
this.passthrough("http://45.84.227.122:8080/**");
|
||||||
this.get("/api/detail/:id", (schema, request) => {
|
this.get("/api/detail/:id", (schema, request) => {
|
||||||
let id = request.params.id;
|
let id = request.params.id;
|
||||||
let client = dataClients.find((el) => el.id === id);
|
return clientDetail.find((el) => el.person_id === id);
|
||||||
return {
|
});
|
||||||
...client.note_to_person.additional_info,
|
this.get("/api/detail/identity_document/:id", (schema, request) => {
|
||||||
id: client.id,
|
let id = request.params.id;
|
||||||
pass: client.identity_document_to_person.pass,
|
let pass = dataClients.results.find((el) => el.id === id);
|
||||||
};
|
return pass.identity_documents[0];
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
table-adding-new-doc(v-if="section === 'docs' && isOpenAddingWrap" :add-new-doc="addNewDoc" :save-docs="saveDocs" :new-docs="docData")
|
table-adding-new-doc(v-if="section === 'docs' && isOpenAddingWrap" :add-new-doc="addNewDoc" :save-docs="saveDocs" :new-docs="docData")
|
||||||
table-adding-new-additional(v-if="section === 'additional' && isOpenAddingWrap" :new-additional-data="additionalData" :add-new-additional="addDocAdditional" :save-additional="saveDocs" )
|
table-adding-new-additional(v-if="section === 'additional' && isOpenAddingWrap" :new-additional-data="additionalData" :add-new-additional="addDocAdditional" :save-additional="saveDocs" )
|
||||||
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4
|
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4
|
||||||
.flex.flex-col(v-for="(item, key) in sectionInfo" class="gap-y-1.5")
|
.flex.flex-col(v-for="(item, key) in settings[section].options" class="gap-y-1.5")
|
||||||
span.title-section.font-semibold.text-xs(v-if="settings[section].options") {{settings[section].options[key]}}
|
span.title-section.font-semibold.text-xs(v-if="settings[section].options") {{item}}
|
||||||
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
|
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
|
||||||
client-detail-input.text-sm.text-sm.w-max-fit(v-if="isChange && item.value" :style="{fontWeight:item.copy&&600}" v-model:value="item.value" :width="settings[section].width")
|
client-detail-input.text-sm.text-sm.w-max-fit(v-if="isChange && item.value" :style="{fontWeight:item.copy&&600}" v-model:value="sectionInfo[key]" :width="settings[section].width")
|
||||||
.copy.icon-copy.cursor-pointer(v-if="item.copy")
|
.copy.icon-copy.cursor-pointer(v-if="item.copy")
|
||||||
.flex(v-if="item.value && !isChange")
|
.flex(v-if="item.value && !isChange")
|
||||||
span.text-sm.w-fit(:style="{fontWeight:item.copy&&600}") {{item.value}}
|
span.text-sm.w-fit(:style="{fontWeight:item.copy&&600}") {{item.value}}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.w-full.h-fit.pt-4.flex.gap-x-4(class="px-[52px] pb-[30px]")
|
.w-full.h-fit.pt-4.flex.gap-x-4(class="px-[52px] pb-[30px]")
|
||||||
client-detail-info-section(v-model:section-info="dataDetail.pass" section="pass")
|
client-detail-info-section(v-model:section-info="dataDocument" section="pass")
|
||||||
.flex.flex-col.gap-y-2
|
.flex.flex-col.gap-y-2
|
||||||
client-detail-info-section(:section-info="dataDetail.snils" section="snils" )
|
client-detail-info-section(:section-info="dataDetail.snils" section="snils" )
|
||||||
client-detail-info-section(:section-info="dataDetail.inn" section="inn" )
|
client-detail-info-section(:section-info="dataDetail.inn" section="inn" )
|
||||||
@@ -20,6 +20,7 @@ export default {
|
|||||||
dataDetail: Object,
|
dataDetail: Object,
|
||||||
saveNewDoc: Function,
|
saveNewDoc: Function,
|
||||||
deleteDoc: Function,
|
deleteDoc: Function,
|
||||||
|
dataDocument: Object,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -10,14 +10,10 @@
|
|||||||
:id="client.id"
|
:id="client.id"
|
||||||
:is-check="marked.includes(client.id)"
|
:is-check="marked.includes(client.id)"
|
||||||
:check="selectedCheck"
|
:check="selectedCheck"
|
||||||
:full-name="`${client.last_name} ${client.first_name} ${client.patronymic}`"
|
:full-name="[client.last_name, client.first_name, client.patronymic]"
|
||||||
:age="client.age"
|
:age="client.birth_date"
|
||||||
:job-title="client.jobTitle"
|
|
||||||
:priority="client.priority"
|
:priority="client.priority"
|
||||||
:phone="client.phone"
|
:contacts="client.contacts"
|
||||||
:email="client.email"
|
|
||||||
:networks="client.networks"
|
|
||||||
:meeting-time="client.meeting"
|
|
||||||
)
|
)
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -46,7 +42,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
saveDataClients(data) {
|
saveDataClients(data) {
|
||||||
this.dataClients = data;
|
this.dataClients = data.results;
|
||||||
},
|
},
|
||||||
fetchDataClients() {
|
fetchDataClients() {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
|
|||||||
@@ -5,12 +5,10 @@
|
|||||||
clients-table-checkbox(:id="id" :check="check" :is-check="isCheck")
|
clients-table-checkbox(:id="id" :check="check" :is-check="isCheck")
|
||||||
table-cell-body-name(:value="fullName" :width="columnBody.find(el => el.name === 'fullName').width")
|
table-cell-body-name(:value="fullName" :width="columnBody.find(el => el.name === 'fullName').width")
|
||||||
table-cell-body-age(:value="age" :width="columnBody.find(el => el.name === 'age').width")
|
table-cell-body-age(:value="age" :width="columnBody.find(el => el.name === 'age').width")
|
||||||
table-cell-body-job-title(:value="jobTitle" :width="columnBody.find(el => el.name === 'jobTitle').width")
|
|
||||||
table-cell-body-priority(:value="priority" :width="columnBody.find(el => el.name === 'priority').width")
|
table-cell-body-priority(:value="priority" :width="columnBody.find(el => el.name === 'priority').width")
|
||||||
table-cell-body-phone(:value="phone" :width="columnBody.find(el => el.name === 'phone').width")
|
table-cell-body-phone(:value="contacts" :width="columnBody.find(el => el.name === 'phone').width")
|
||||||
table-cell-body-email(:value="email" :width="columnBody.find(el => el.name === 'email').width")
|
table-cell-body-email(:value="contacts" :width="columnBody.find(el => el.name === 'email').width")
|
||||||
table-cell-body-networks(:networks="networks" :width="columnBody.find(el => el.name === 'networks').width")
|
table-cell-body-networks(:networks="contacts" :width="columnBody.find(el => el.name === 'networks').width")
|
||||||
table-cell-body-meeting(:date="meetingTime.date" :time="meetingTime.time" :width="columnBody.find(el => el.name === 'meeting').width")
|
|
||||||
.dots.flex.justify-center.items-center
|
.dots.flex.justify-center.items-center
|
||||||
.relative.dots-button.icon-dots.cursor-pointer.leading-6.text-center(:tabindex="1" @click="(e) => openPopup(e)" @blur="handleUnFocusPopup")
|
.relative.dots-button.icon-dots.cursor-pointer.leading-6.text-center(:tabindex="1" @click="(e) => openPopup(e)" @blur="handleUnFocusPopup")
|
||||||
clients-action-popup(v-if="isOpenPopup")
|
clients-action-popup(v-if="isOpenPopup")
|
||||||
@@ -47,6 +45,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
dataIdentityDocument: {},
|
||||||
dataDetail: {},
|
dataDetail: {},
|
||||||
isOpenDetailInfo: false,
|
isOpenDetailInfo: false,
|
||||||
isOpenPopup: false,
|
isOpenPopup: false,
|
||||||
@@ -57,23 +56,28 @@ export default {
|
|||||||
id: String,
|
id: String,
|
||||||
check: Function,
|
check: Function,
|
||||||
isCheck: Boolean,
|
isCheck: Boolean,
|
||||||
fullName: String,
|
fullName: Array,
|
||||||
age: String,
|
age: String,
|
||||||
jobTitle: String,
|
priority: {
|
||||||
priority: String,
|
default: null,
|
||||||
phone: String,
|
},
|
||||||
email: String,
|
contacts: Array,
|
||||||
networks: Array,
|
|
||||||
meetingTime: Object,
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fetchClientDetail(id) {
|
fetchClientDetail(id) {
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
fetch(`/api/detail/${id}`).then((res) => res.json()).then((data) => this.saveClientDetail(data))
|
fetch(`/api/detail/${id}`).then((res) => res.json()).then((data) => this.saveClientDetail(data))
|
||||||
},
|
},
|
||||||
|
fetchClientIdentityDocument(id) {
|
||||||
|
// eslint-disable-next-line
|
||||||
|
fetch(`/api/detail/identity_document/${id}`).then((res) => res.json()).then((data) => this.saveIdentityDocument(data))
|
||||||
|
},
|
||||||
saveClientDetail(data) {
|
saveClientDetail(data) {
|
||||||
this.dataDetail = data;
|
this.dataDetail = data;
|
||||||
},
|
},
|
||||||
|
saveIdentityDocument(data) {
|
||||||
|
this.dataIdentityDocument = data;
|
||||||
|
},
|
||||||
openPopup(e) {
|
openPopup(e) {
|
||||||
e.target.focus();
|
e.target.focus();
|
||||||
this.isOpenPopup = !this.isOpenPopup;
|
this.isOpenPopup = !this.isOpenPopup;
|
||||||
@@ -81,6 +85,7 @@ export default {
|
|||||||
openDetailInfo(e) {
|
openDetailInfo(e) {
|
||||||
this.isOpenDetailInfo = !this.isOpenDetailInfo;
|
this.isOpenDetailInfo = !this.isOpenDetailInfo;
|
||||||
this.isOpenDetailInfo && this.fetchClientDetail(e.currentTarget.id);
|
this.isOpenDetailInfo && this.fetchClientDetail(e.currentTarget.id);
|
||||||
|
this.isOpenDetailInfo && this.fetchClientIdentityDocument(e.currentTarget.id);
|
||||||
},
|
},
|
||||||
handleUnFocusPopup() {
|
handleUnFocusPopup() {
|
||||||
this.isOpenPopup = false;
|
this.isOpenPopup = false;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.w-full.relative.mx-6
|
.wrapper.flex.w-full.relative.mx-6
|
||||||
clients-table(:open-form-create="openFormCreateClient")
|
clients-table(:open-form-create="openFormCreateClient")
|
||||||
clients-form-create(v-if="isOpenForm" :close-form="closeFormCreateClient")
|
clients-form-create(v-if="isOpenForm" :close-form="closeFormCreateClient")
|
||||||
</template>
|
</template>
|
||||||
@@ -25,3 +25,8 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.wrapper
|
||||||
|
overflow: auto
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
||||||
span.text-sm {{value}}
|
span.text-sm {{new Date().getFullYear() - new Date(value).getFullYear()}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
||||||
span.text-sm {{value}}
|
span.text-sm {{value.some((el) => el.kind === "EMAIL")?value.find((el) => el.kind === "EMAIL").username:''}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "TableCellBodyEmail",
|
name: "TableCellBodyEmail",
|
||||||
props: {
|
props: {
|
||||||
value: String,
|
value: Array,
|
||||||
width: Number,
|
width: Number,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,16 +1,26 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.box-border.px-4.items-center.gap-x-3.w-full(:style="{ minWidth : width + 'px' }")
|
.flex.box-border.px-4.items-center.gap-x-3.w-full(:style="{ minWidth : width + 'px' }")
|
||||||
img(v-if="imgUrl" :src="imgUrl" alt="Avatar")
|
.flex.avatar.justify-center.items-center
|
||||||
span.text-sm.font-semibold {{value}}
|
span {{`${value[0][0]}${value[1][0]}`}}
|
||||||
|
span.text-sm.font-semibold {{value.join(' ')}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "TableCellBodyName",
|
name: "TableCellBodyName",
|
||||||
props: {
|
props: {
|
||||||
value: String,
|
value: Array,
|
||||||
width: Number,
|
width: Number,
|
||||||
imgUrl: String,
|
imgUrl: String,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.avatar
|
||||||
|
width: 36px
|
||||||
|
height: 36px
|
||||||
|
border-radius: 50%
|
||||||
|
background-color: var(--font-grey-color)
|
||||||
|
color: var(--font-dark-blue-color)
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,14 +1,27 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
.network-cell.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
||||||
.w-5.h-5(v-for="network in networks")
|
.text-xl.icon(v-for="network in networks.filter((el) => el.kind !== 'EMAIL' && el.kind !== 'PHONE')" :id="network.id" :class="settings.settings.find((el) => el.network === network.kind).icon")
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { column } from "@/pages/clients/utils/tableConfig";
|
||||||
export default {
|
export default {
|
||||||
name: "TableCellBodyNetworks",
|
name: "TableCellBodyNetworks",
|
||||||
props: {
|
props: {
|
||||||
networks: Array,
|
networks: Array,
|
||||||
width: Number,
|
width: Number,
|
||||||
},
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
settings: column.find((el) => el.name === "networks"),
|
||||||
|
};
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="sass" scoped>
|
||||||
|
.network-cell
|
||||||
|
column-gap: 2px
|
||||||
|
.icon
|
||||||
|
color: var(--btn-blue-color)
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
.flex.box-border.px-4.items-center.w-full(:style="{ minWidth : width + 'px' }")
|
||||||
span.text-sm {{value}}
|
span.text-sm {{value.some((el) => el.kind === "PHONE")?value.find((el) => el.kind === "PHONE").username:''}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "TableCellBodyPhone",
|
name: "TableCellBodyPhone",
|
||||||
props: {
|
props: {
|
||||||
value: String,
|
value: Array,
|
||||||
width: Number,
|
width: Number,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
<template lang="pug">
|
<template lang="pug">
|
||||||
.flex.box-border.px-4.items-center.gap-x-2.w-full(:style="{ minWidth : width + 'px' }")
|
.flex.box-border.px-4.items-center.gap-x-2.w-full(:style="{ minWidth : width + 'px' }")
|
||||||
.dot.w-2.h-2
|
.dot.w-2.h-2(:style="{ backgroundColor : settings.settings.find((el) => el.priority == value).color }")
|
||||||
span.text-sm(:style="{ color : color }") {{value}}
|
span.text-sm(:style="{ color : settings.settings.find((el) => el.priority == value).color }") {{settings.settings.find((el) => el.priority == value).text}}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { column } from "@/pages/clients/utils/tableConfig";
|
||||||
export default {
|
export default {
|
||||||
name: "TableCellBodyPriority",
|
name: "TableCellBodyPriority",
|
||||||
props: {
|
props: ["value", "width"],
|
||||||
value: String,
|
data() {
|
||||||
width: Number,
|
return {
|
||||||
color: {
|
settings: column.find((el) => el.name === "priority"),
|
||||||
default: "#9294A7",
|
};
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -16,15 +16,31 @@ export const column = [
|
|||||||
iconHead: true,
|
iconHead: true,
|
||||||
width: 140,
|
width: 140,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "jobTitle",
|
|
||||||
title: "Должность",
|
|
||||||
iconHead: false,
|
|
||||||
width: 200,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "priority",
|
name: "priority",
|
||||||
title: "Приоритет",
|
title: "Приоритет",
|
||||||
|
settings: [
|
||||||
|
{
|
||||||
|
priority: 1,
|
||||||
|
text: "Высокий",
|
||||||
|
color: "#FF6F6F",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
priority: 2,
|
||||||
|
text: "Средний",
|
||||||
|
color: "#FFC75B",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
priority: 3,
|
||||||
|
text: "Низкий",
|
||||||
|
color: "#81ACFF",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
priority: null,
|
||||||
|
text: "-",
|
||||||
|
color: "#9294A7",
|
||||||
|
},
|
||||||
|
],
|
||||||
iconHead: true,
|
iconHead: true,
|
||||||
width: 124,
|
width: 124,
|
||||||
},
|
},
|
||||||
@@ -43,14 +59,30 @@ export const column = [
|
|||||||
{
|
{
|
||||||
name: "networks",
|
name: "networks",
|
||||||
title: "Сети",
|
title: "Сети",
|
||||||
iconHead: false,
|
settings: [
|
||||||
width: 152,
|
{
|
||||||
|
network: "VK",
|
||||||
|
icon: "icon-vk",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "meeting",
|
network: "TELEGRAM",
|
||||||
title: "Ближайшая встреча",
|
icon: "icon-tg",
|
||||||
iconHead: true,
|
},
|
||||||
width: 220,
|
{
|
||||||
|
network: "GOOGLE",
|
||||||
|
icon: "icon-google",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
network: "SLACK",
|
||||||
|
icon: "icon-slack",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
network: "DISCORD",
|
||||||
|
icon: "icon-discord",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
iconHead: false,
|
||||||
|
width: 152,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "dots",
|
name: "dots",
|
||||||
@@ -64,10 +96,10 @@ export const detail = {
|
|||||||
pass: {
|
pass: {
|
||||||
title: "Паспортные данные",
|
title: "Паспортные данные",
|
||||||
options: {
|
options: {
|
||||||
number: "Серия и номер",
|
numba: "Серия и номер",
|
||||||
issuedBy: "Выдан",
|
issued_by_org: "Выдан",
|
||||||
divisionCode: "Код подразделения",
|
issued_by_org_code: "Код подразделения",
|
||||||
dateIssue: "Дата выдачи",
|
issued_by_date: "Дата выдачи",
|
||||||
},
|
},
|
||||||
width: 280,
|
width: 280,
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user